Make WordPress Core


Ignore:
Timestamp:
06/30/2014 05:48:16 AM (12 years ago)
Author:
azaozz
Message:

Secure embeds in the editor (first run):

  • When the user pastes an embeddable http URL, try to get the https embed.
  • If an embed provider doesn't support ssl embeds, show a placeholder/error message.
  • Revise the way we return error messages.

See #28195, #28507.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-embed.php

    r28559 r28919  
    1212        public $usecache = true;
    1313        public $linkifunknown = true;
     14
     15        /**
     16         * When an URL cannot be embedded, return false instead of returning a link
     17         * or the URL. Bypasses the 'embed_maybe_make_link' filter.
     18         */                     
     19        public $return_false_on_fail = false;
    1420
    1521        /**
     
    323329         */
    324330        public function maybe_make_link( $url ) {
     331                if ( $this->return_false_on_fail ) {
     332                        return false;
     333                }
     334
    325335                $output = ( $this->linkifunknown ) ? '<a href="' . esc_url($url) . '">' . esc_html($url) . '</a>' : $url;
    326336
Note: See TracChangeset for help on using the changeset viewer.