WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
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( |
36 | 'oembed/1.0', |
37 | '/embed', |
38 | array( |
39 | array( |
40 | 'methods' => WP_REST_Server::READABLE, |
41 | 'callback' => array( $this, 'get_item' ), |
42 | 'permission_callback' => '__return_true', |