Skip to content

Commit

Permalink
Remove oembed_dataparse filters for performance reasons (raw mode).
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlost committed Jan 14, 2018
1 parent 6c27099 commit d598de5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Fetch_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function __invoke( $args, $assoc_args ) {
$oembed_args['discover'] = $discover;

// Make 'oembed_dataparse' filter a no-op so get raw unsanitized data.
remove_all_filters( 'oembed_dataparse' ); // Save a few cycles.
add_filter( 'oembed_dataparse', function ( $return, $data, $url ) {
return $data;
}, PHP_INT_MAX, 3 );
Expand Down

0 comments on commit d598de5

Please sign in to comment.