wp/wp-includes/class-wp-embed.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-includes/class-wp-embed.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-includes/class-wp-embed.php	Tue Sep 27 16:37:53 2022 +0200
@@ -47,7 +47,7 @@
 	}
 
 	/**
-	 * Process the [embed] shortcode.
+	 * Processes the [embed] shortcode.
 	 *
 	 * Since the [embed] shortcode needs to be run earlier than other shortcodes,
 	 * this function removes all existing shortcodes, registers the [embed] shortcode,
@@ -55,8 +55,8 @@
 	 *
 	 * @global array $shortcode_tags
 	 *
-	 * @param string $content Content to parse
-	 * @return string Content with shortcode parsed
+	 * @param string $content Content to parse.
+	 * @return string Content with shortcode parsed.
 	 */
 	public function run_shortcode( $content ) {
 		global $shortcode_tags;
@@ -88,9 +88,9 @@
 		}
 		?>
 <script type="text/javascript">
-	jQuery(document).ready(function($){
+	jQuery( function($) {
 		$.get("<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ) . '?action=oembed-cache&post=' . $post->ID; ?>");
-	});
+	} );
 </script>
 		<?php
 	}
@@ -376,7 +376,7 @@
 	}
 
 	/**
-	 * Delete all oEmbed caches. Unused by core as of 4.0.0.
+	 * Deletes all oEmbed caches. Unused by core as of 4.0.0.
 	 *
 	 * @param int $post_ID Post ID to delete the caches for.
 	 */
@@ -454,16 +454,16 @@
 	/**
 	 * Callback function for WP_Embed::autoembed().
 	 *
-	 * @param array $match A regex match array.
+	 * @param array $matches A regex match array.
 	 * @return string The embed HTML on success, otherwise the original URL.
 	 */
-	public function autoembed_callback( $match ) {
+	public function autoembed_callback( $matches ) {
 		$oldval              = $this->linkifunknown;
 		$this->linkifunknown = false;
-		$return              = $this->shortcode( array(), $match[2] );
+		$return              = $this->shortcode( array(), $matches[2] );
 		$this->linkifunknown = $oldval;
 
-		return $match[1] . $return . $match[3];
+		return $matches[1] . $return . $matches[3];
 	}
 
 	/**
@@ -491,7 +491,7 @@
 	}
 
 	/**
-	 * Find the oEmbed cache post ID for a given cache key.
+	 * Finds the oEmbed cache post ID for a given cache key.
 	 *
 	 * @since 4.9.0
 	 *