Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: oembed_default_width

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

Line Code
24       */
25      public function register_routes() {
26           /**
27            * Filters the maxwidth oEmbed parameter.
28            *
29            * @since 4.4.0
30            *
31            * @param int $maxwidth Maximum allowed width. Default 600.
32            */
33           $maxwidth = apply_filters( 'oembed_default_width', 600 );
34
35           register_rest_route( 'oembed/1.0', '/embed', array(
36                array(
37                     'methods'  => WP_REST_Server::READABLE,
38                     'callback' => array( $this, 'get_item' ),
39                     'args'     => array(
40                          'url'      => array(
41                               'required'          => true,
42                               'sanitize_callback' => 'esc_url_raw',