Filter hook 'embed_maybe_make_link'

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

View Source

embed_maybe_make_link

Filter Hook
Description
Filters the returned, maybe-linked embed URL.

Hook Information

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

Hook Parameters

Type Name Description
string $output The linked or original URL.
string $url The original URL.

Usage Examples

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

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

Source Code Context

wp-includes/class-wp-embed.php:493 - How this hook is used in WordPress core
<?php
 488  		 * @since 2.9.0
 489  		 *
 490  		 * @param string $output The linked or original URL.
 491  		 * @param string $url    The original URL.
 492  		 */
 493  		return apply_filters( 'embed_maybe_make_link', $output, $url );
 494  	}
 495  
 496  	/**
 497  	 * Finds the oEmbed cache post ID for a given cache key.
 498  	 *

PHP Documentation

<?php
/**
		 * Filters the returned, maybe-linked embed URL.
		 *
		 * @since 2.9.0
		 *
		 * @param string $output The linked or original URL.
		 * @param string $url    The original URL.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/class-wp-embed.php
Related Hooks

Related hooks will be displayed here in future updates.