Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: embed_oembed_html

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
282                      * @since 2.9.0
283                      *
284                      * @see WP_Embed::shortcode()
285                      *
286                      * @param string|false $cache   The cached HTML result, stored in post meta.
287                      * @param string       $url     The attempted embed URL.
288                      * @param array        $attr    An array of shortcode attributes.
289                      * @param int          $post_id Post ID.
290                      */
291                     return apply_filters( 'embed_oembed_html', $cache, $url, $attr, $post_id );
292                }
293           }
294
295           /**
296            * Filters whether to inspect the given URL for discoverable link tags.
297            *
298            * @since 2.9.0
299            * @since 4.4.0 The default value changed to true.
300            *
 
Line Code
365
366                if ( $has_kses ) {
367                     kses_init_filters();
368                }
369           }
370
371           // If there was a result, return it.
372           if ( $html ) {
373                /** This filter is documented in wp-includes/class-wp-embed.php */
374                return apply_filters( 'embed_oembed_html', $html, $url, $attr, $post_id );
375           }
376
377           // Still unknown.
378           return $this->maybe_make_link( $url );
379      }
380
381      /**
382       * Deletes all oEmbed caches. Unused by core as of 4.0.0.
383       *