WordPress.org

Make WordPress Core

Ticket #16327: 16327.diff

File 16327.diff, 837 bytes (added by ryan, 6 years ago)
  • wp-includes/media.php

     
    14201420}
    14211421
    14221422/**
     1423 * Removes an oEmbed provider.
     1424 *
     1425 * @since 3.5
     1426 * @see WP_oEmbed
     1427 *
     1428 * @uses _wp_oembed_get_object()
     1429 *
     1430 * @param string $format The URL format for the oEmbed provider to remove.
     1431 */
     1432function wp_oembed_remove_provider( $format ) {
     1433        require_once( ABSPATH . WPINC . '/class-oembed.php' );
     1434
     1435        $oembed = _wp_oembed_get_object();
     1436
     1437        if ( isset( $oembed->providers[ $format ] ) ) {
     1438                unset( $oembed->providers[ $format ] );
     1439                return true;
     1440        }
     1441
     1442        return false;
     1443}
     1444
     1445/**
    14231446 * Determines if default embed handlers should be loaded.
    14241447 *
    14251448 * Checks to make sure that the embeds library hasn't already been loaded. If