$matchmask = '#' .
str_replace( '___wildcard___', '(.+)',
preg_quote( str_replace( '*', '___wildcard___',
$matchmask ), '#'
) ) . '#i';
$matchmask =
preg_replace( '|^#http\\\://|', '#https?\://',
$matchmask );
} if ( preg_match( $matchmask,
$url ) ) { $provider =
str_replace( '{format}', 'json',
$providerurl ); // JSON is easier to deal with than XML.
break;
} } if ( !
$provider &&
$args['discover'
] ) { $provider =
$this->
discover( $url );
} return $provider;
} /**
* Adds an oEmbed provider.
*
* The provider is added just-in-time when wp_oembed_add_provider() is called before
* the {@see 'plugins_loaded'} hook.
*
* The just-in-time addition is for the benefit of the {@see 'oembed_providers'} filter.
*
* @since 4.0.0
*
* @see wp_oembed_add_provider()
*
* @param string $format Format of URL that this provider can handle. You can use
* asterisks as wildcards.
* @param string $provider The URL to the oEmbed provider..
* @param bool $regex Optional. Whether the $format parameter is in a regex format.
* Default false.
*/