Changeset 38361 for trunk/src/wp-includes/embed.php
- Timestamp:
- 08/26/2016 09:48:32 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/embed.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed.php
r38321 r38361 95 95 */ 96 96 function wp_oembed_get( $url, $args = '' ) { 97 require_once( ABSPATH . WPINC . '/class-oembed.php' );98 97 $oembed = _wp_oembed_get_object(); 99 98 return $oembed->get_html( $url, $args ); 99 } 100 101 /** 102 * Returns the initialized WP_oEmbed object. 103 * 104 * @since 2.9.0 105 * @access private 106 * 107 * @staticvar WP_oEmbed $wp_oembed 108 * 109 * @return WP_oEmbed object. 110 */ 111 function _wp_oembed_get_object() { 112 static $wp_oembed = null; 113 114 if ( is_null( $wp_oembed ) ) { 115 $wp_oembed = new WP_oEmbed(); 116 } 117 return $wp_oembed; 100 118 } 101 119 … … 113 131 */ 114 132 function wp_oembed_add_provider( $format, $provider, $regex = false ) { 115 require_once( ABSPATH . WPINC . '/class-oembed.php' );116 117 133 if ( did_action( 'plugins_loaded' ) ) { 118 134 $oembed = _wp_oembed_get_object(); … … 134 150 */ 135 151 function wp_oembed_remove_provider( $format ) { 136 require_once( ABSPATH . WPINC . '/class-oembed.php' );137 138 152 if ( did_action( 'plugins_loaded' ) ) { 139 153 $oembed = _wp_oembed_get_object(); … … 707 721 } 708 722 709 require_once( ABSPATH . WPINC . '/class-oembed.php' );710 723 $wp_oembed = _wp_oembed_get_object(); 711 724
Note: See TracChangeset
for help on using the changeset viewer.