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
23       */
24      public function register_routes() {
25           /**
26            * Filters the maxwidth oEmbed parameter.
27            *
28            * @since 4.4.0
29            *
30            * @param int $maxwidth Maximum allowed width. Default 600.
31            */
32           $maxwidth = apply_filters( 'oembed_default_width', 600 );
33
34           register_rest_route(
35                'oembed/1.0',
36                '/embed',
37                array(
38                     array(
39                          'methods'             => WP_REST_Server::READABLE,
40                          'callback'            => array( $this, 'get_item' ),
41                          'permission_callback' => '__return_true',