mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-07 22:24:36 +00:00
Shortcodes: Revert recent apply_shortcodes and do_shortcode changes.
[54248] reversed the wrapping of `do_shortcode` and `apply_shortcodes` and updated all direct internal calls of `do_shortcode` to `apply_shortcodes` after [47004]. After further consideration, the long history of `do_shortcodes` should be favored over any subjective semantic improvements. This change reverts the remaining changes from #55883 not already reverted in [54278]. Follow-up to [47004], [54248], and [54278]. Props azaozz, jorbin. See #55883. git-svn-id: https://develop.svn.wordpress.org/trunk@54319 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -52,7 +52,7 @@ class WP_Embed {
|
||||
*
|
||||
* Since the [embed] shortcode needs to be run earlier than other shortcodes,
|
||||
* this function removes all existing shortcodes, registers the [embed] shortcode,
|
||||
* calls apply_shortcodes(), and then re-registers the old shortcodes.
|
||||
* calls do_shortcode(), and then re-registers the old shortcodes.
|
||||
*
|
||||
* @global array $shortcode_tags
|
||||
*
|
||||
@@ -69,7 +69,7 @@ class WP_Embed {
|
||||
add_shortcode( 'embed', array( $this, 'shortcode' ) );
|
||||
|
||||
// Do the shortcode (only the [embed] one is registered).
|
||||
$content = apply_shortcodes( $content, true );
|
||||
$content = do_shortcode( $content, true );
|
||||
|
||||
// Put the original shortcodes back.
|
||||
$shortcode_tags = $orig_shortcode_tags;
|
||||
@@ -177,7 +177,7 @@ class WP_Embed {
|
||||
}
|
||||
|
||||
/**
|
||||
* The apply_shortcodes() callback function.
|
||||
* The do_shortcode() callback function.
|
||||
*
|
||||
* Attempts to convert a URL into embed HTML. Starts by checking the URL against the regex of
|
||||
* the registered embed handlers. If none of the regex matches and it's enabled, then the URL
|
||||
|
||||
Reference in New Issue
Block a user