Skip to content

Commit

Permalink
Docs: Add a description for the $wp_embed global.
Browse files Browse the repository at this point in the history
Follow-up to [57748].

See #60699.

git-svn-id: https://develop.svn.wordpress.org/trunk@57785 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Mar 6, 2024
1 parent 37f53c0 commit f3e19bf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/wp-admin/includes/ajax-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ function wp_ajax_imgedit_preview() {
*
* @since 3.1.0
*
* @global WP_Embed $wp_embed
* @global WP_Embed $wp_embed WordPress Embed object.
*/
function wp_ajax_oembed_cache() {
$GLOBALS['wp_embed']->cache_oembed( $_GET['post'] );
Expand Down Expand Up @@ -3381,7 +3381,7 @@ function wp_ajax_send_attachment_to_editor() {
* @since 3.5.0
*
* @global WP_Post $post Global post object.
* @global WP_Embed $wp_embed
* @global WP_Embed $wp_embed WordPress Embed object.
*/
function wp_ajax_send_link_to_editor() {
global $post, $wp_embed;
Expand Down Expand Up @@ -3733,8 +3733,8 @@ function wp_ajax_query_themes() {
*
* @since 4.0.0
*
* @global WP_Post $post Global post object.
* @global WP_Embed $wp_embed Embed API instance.
* @global WP_Post $post Global post object.
* @global WP_Embed $wp_embed WordPress Embed object.
* @global WP_Scripts $wp_scripts
* @global int $content_width
*/
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/block-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ function _block_template_render_title_tag() {
*
* @global string $_wp_current_template_id
* @global string $_wp_current_template_content
* @global WP_Embed $wp_embed
* @global WP_Query $wp_query
* @global WP_Embed $wp_embed WordPress Embed object.
* @global WP_Query $wp_query WordPress Query object.
*
* @return string Block template markup.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-oembed-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function get_proxy_item_permissions_check() {
* @since 4.8.0
*
* @see WP_oEmbed::get_html()
* @global WP_Embed $wp_embed
* @global WP_Embed $wp_embed WordPress Embed object.
* @global WP_Scripts $wp_scripts
*
* @param WP_REST_Request $request Full data about the request.
Expand Down
6 changes: 3 additions & 3 deletions src/wp-includes/embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @since 2.9.0
*
* @global WP_Embed $wp_embed
* @global WP_Embed $wp_embed WordPress Embed object.
*
* @param string $id An internal ID/name for the handler. Needs to be unique.
* @param string $regex The regex that will be used to see if this handler should be used for a URL.
Expand All @@ -32,7 +32,7 @@ function wp_embed_register_handler( $id, $regex, $callback, $priority = 10 ) {
*
* @since 2.9.0
*
* @global WP_Embed $wp_embed
* @global WP_Embed $wp_embed WordPress Embed object.
*
* @param string $id The handler ID that should be removed.
* @param int $priority Optional. The priority of the handler to be removed. Default 10.
Expand Down Expand Up @@ -230,7 +230,7 @@ function wp_maybe_load_embeds() {
*
* @since 4.0.0
*
* @global WP_Embed $wp_embed
* @global WP_Embed $wp_embed WordPress Embed object.
*
* @param array $matches The RegEx matches from the provided regex when calling
* wp_embed_register_handler().
Expand Down

0 comments on commit f3e19bf

Please sign in to comment.