mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Shortcodes: Reverse wrapping of apply_shortcodes() and do_shortcode().
This changeset reverses the wrapping of `apply_shortcodes()` and `do_shortcode()` such that `apply_shortcodes()` is now the recommended function. In addition: - Calls to `do_shortcode()` have been changed to `apply_shortcodes()`. - Some default filter callbacks have been changed from `'do_shortcode'` to `'apply_shortcodes'`. - Applicable documentation has been updated to refer to `apply_shortcodes()` instead. Follow-up to [47004]. Props SergeyBiryukov, rafiahmedd, namithjawahar, peterwilsoncc, costdev. Fixes #55883. git-svn-id: https://develop.svn.wordpress.org/trunk@54248 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2296,7 +2296,7 @@ function img_caption_shortcode( $attr, $content = '' ) {
|
||||
$describedby,
|
||||
$style,
|
||||
esc_attr( $class ),
|
||||
do_shortcode( $content ),
|
||||
apply_shortcodes( $content ),
|
||||
sprintf(
|
||||
'<figcaption %sclass="wp-caption-text">%s</figcaption>',
|
||||
$caption_id,
|
||||
@@ -2309,7 +2309,7 @@ function img_caption_shortcode( $attr, $content = '' ) {
|
||||
$id,
|
||||
$style,
|
||||
esc_attr( $class ),
|
||||
str_replace( '<img ', '<img ' . $describedby, do_shortcode( $content ) ),
|
||||
str_replace( '<img ', '<img ' . $describedby, apply_shortcodes( $content ) ),
|
||||
sprintf(
|
||||
'<p %sclass="wp-caption-text">%s</p>',
|
||||
$caption_id,
|
||||
|
||||
Reference in New Issue
Block a user