Gocodebox_Banner_Notifier::notification_test_site_url_match( bool $value, string $string )

Site URL test.


Parameters Parameters

$value

(bool) (Required) The current test value.

$string

(string) (Required) String or array of strings to look for in the site URL


Top ↑

Source Source

File: libraries/banner-notifications/src/notifications.php

	function notification_test_site_url_match( $value, $string ) {
		if ( ! empty( $string ) ) {
			$strings_to_check = (array) $string;
			foreach ( $strings_to_check as $check ) {
				if ( strpos( get_bloginfo( 'url' ), $check ) !== false ) {
					return true;
				}
			}
		}

		return false;
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.