oembed_dataparse
The WordPress Core oembed dataparse hook.
Description
Parameters (3)
- 0. $wp_filter_oembed_result (string) =>
'wp_filter_oembed_result'
- The
wp
filter oembed result. - 1. $int (int) =>
10
- The int.
- 2. $int (int) =>
3
- The int.
Usage
- To run the hook, copy the example below.
- $wp_filter_oembed_result = apply_filters( 'oembed_dataparse', $wp_filter_oembed_result, $int, $int );
- if ( !empty( $wp_filter_oembed_result ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the oembed_dataparse callback
- function filter_oembed_dataparse( $wp_filter_oembed_result, $int, $int ) {
- // make filter magic happen here...
- return $wp_filter_oembed_result;
- };
- // add the filter
- add_filter( 'oembed_dataparse', 'filter_oembed_dataparse', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'oembed_dataparse', 'filter_oembed_dataparse', 10, 3 );
Defined (2)
The filter is defined in the following location(s).
- /wp-includes/default-filters.php
- add_filter( 'oembed_dataparse', 'wp_filter_oembed_result', 10, 3 );
- /wp-includes/class-oembed.php
- add_filter( 'oembed_dataparse', array($this, '_strip_newlines'), 10, 3 );