Filter hook 'oembed_endpoint_url'

in WP Core File wp-includes/embed.php at line 466

View Source

oembed_endpoint_url

Filter Hook
Description
Filters the oEmbed endpoint URL.

Hook Information

File Location wp-includes/embed.php View on GitHub
Hook Type Filter
Line Number 466

Hook Parameters

Type Name Description
string $url The URL to the oEmbed endpoint.
string $permalink The permalink used for the `url` query arg.
string $format The requested response format.

Usage Examples

Basic Usage
<?php
// Hook into oembed_endpoint_url
add_filter('oembed_endpoint_url', 'my_custom_filter', 10, 3);

function my_custom_filter($url, $permalink, $format) {
    // Your custom filtering logic here
    return $url;
}

Source Code Context

wp-includes/embed.php:466 - How this hook is used in WordPress core
<?php
 461  	 *
 462  	 * @param string $url       The URL to the oEmbed endpoint.
 463  	 * @param string $permalink The permalink used for the `url` query arg.
 464  	 * @param string $format    The requested response format.
 465  	 */
 466  	return apply_filters( 'oembed_endpoint_url', $url, $permalink, $format );
 467  }
 468  
 469  /**
 470   * Retrieves the embed code for a specific post.
 471   *

PHP Documentation

<?php
/**
	 * Filters the oEmbed endpoint URL.
	 *
	 * @since 4.4.0
	 *
	 * @param string $url       The URL to the oEmbed endpoint.
	 * @param string $permalink The permalink used for the `url` query arg.
	 * @param string $format    The requested response format.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/embed.php
Related Hooks

Related hooks will be displayed here in future updates.