Changeset 28846 for trunk/src/wp-includes/class-oembed.php
- Timestamp:
- 06/26/2014 02:29:20 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-oembed.php
r28834 r28846 20 20 class WP_oEmbed { 21 21 public $providers = array(); 22 public static $early_providers = array(); 22 23 23 24 /** … … 66 67 ); 67 68 69 if ( ! empty( self::$early_providers['add'] ) ) { 70 foreach ( self::$early_providers['add'] as $format => $data ) { 71 $providers[ $format ] = $data; 72 } 73 } 74 75 if ( ! empty( self::$early_providers['remove'] ) ) { 76 foreach ( self::$early_providers['remove'] as $format ) { 77 unset( $providers[ $format ] ); 78 } 79 } 80 81 self::$early_providers = array(); 82 68 83 /** 69 84 * Filter the list of oEmbed providers. … … 132 147 133 148 return $provider; 149 } 150 151 public static function _add_provider_early( $format, $provider, $regex = false ) { 152 if ( empty( self::$early_providers['add'] ) ) { 153 self::$early_providers['add'] = array(); 154 } 155 156 self::$early_providers['add'][ $format ] = array( $provider, $regex ); 157 } 158 159 public static function _remove_provider_early( $format ) { 160 if ( empty( self::$early_providers['remove'] ) ) { 161 self::$early_providers['remove'] = array(); 162 } 163 164 self::$early_providers['remove'][] = $format; 134 165 } 135 166
Note: See TracChangeset
for help on using the changeset viewer.