Summery Summery
Find the oEmbed cache post ID for a given cache key.
Syntax Syntax
Parameters Parameters
- $cache_key
-
(Required) oEmbed cache key.
Return Return
(int|null) Post ID on success, null on failure.
Source Source
File: wp-includes/class-wp-embed.php
}
/**
* Conditionally makes a hyperlink based on an internal class variable.
*
* @param string $url URL to potentially be linked.
* @return string|false Linked URL or the original URL. False if 'return_false_on_fail' is true.
*/
public function maybe_make_link( $url ) {
if ( $this->return_false_on_fail ) {
return false;
}
$output = ( $this->linkifunknown ) ? '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>' : $url;
/**
* 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.
*/
return apply_filters( 'embed_maybe_make_link', $output, $url );
}
/**
* Find the oEmbed cache post ID for a given cache key.
*
* @since 4.9.0
*
* @param string $cache_key oEmbed cache key.
Advertisement
Changelog Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |