classes/fields/oembed.php
public function get_provider( $url ) {

		$provider = false;

		foreach ( $this->providers as $matchmask => $data ) {
			if ( isset( $data['host'] ) ) {
				unset( $data['host'] );
			}
			reset( $data );

			list( $providerurl, $regex ) = $data;

			$match = $matchmask;

			// Turn the asterisk-type provider URLs into regex
			if ( ! $regex ) {
				$matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i';
				$matchmask = preg_replace( '|^#http\\\://|', '#https?\://', $matchmask );
			}

			if ( preg_match( $matchmask, $url ) ) {
				$provider = $match;

				break;
			}
		}//end foreach

		return $provider;
	}
public function get_provider( $url ) {

		$provider = false;

		foreach ( $this->providers as $matchmask => $data ) {
			if ( isset( $data['host'] ) ) {
				unset( $data['host'] );
			}
			reset( $data );

			list( $providerurl, $regex ) = $data;

			$match = $matchmask;

			// Turn the asterisk-type provider URLs into regex
			if ( ! $regex ) {
				$matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i';
				$matchmask = preg_replace( '|^#http\\\://|', '#https?\://', $matchmask );
			}

			if ( preg_match( $matchmask, $url ) ) {
				$provider = $match;

				break;
			}
		}//end foreach

		return $provider;
	}
public function get_provider ( $ url ) { $ provider = false ; foreach ( $ this -> providers as $ matchmask => $ data ) { if ( isset ( $ data [ 'host' ] ) ) { unset ( $ data [ 'host' ] ) ; } reset ( $ data ) ; list ( $ providerurl , $ regex ) = $ data ; $ match = $ matchmask ; // Turn the asterisk-type provider URLs into regex if ( ! $ regex ) { $ matchmask = '#' . str_replace ( '___wildcard___' , '(.+)' , preg_quote ( str_replace ( '*' , '___wildcard___' , $ matchmask ) , '#' ) ) . '#i' ; $ matchmask = preg_replace ( '|^#http\\\://|' , '#https?\://' , $ matchmask ) ; } if ( preg_match ( $ matchmask , $ url ) ) { $ provider = $ match ; break ; } } //end foreach return $ provider ; }
Takes a URL and returns the corresponding oEmbed provider's URL, if there is one.
This function is ripped from WP since Pods has support from 3.8 and in the WP core this function is 4.0+
We've stripped the autodiscover part from this function to keep it basic

@since 2.7.0
@access public

@see    WP_oEmbed::get_provider()

@param string $url The URL to the content.

@return false|string False on failure, otherwise the oEmbed provider URL.
Takes a URL and returns the corresponding oEmbed provider s URL if there is one . This function is ripped from WP since Pods has support from 3 . 8 and in the WP core this function is 4 . 0 + We ve stripped the autodiscover part from this function to keep it basic