Make WordPress Core


Ignore:
Timestamp:
09/20/2022 10:29:55 AM (22 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r53885 r54248  
    37893789        }
    37903790
    3791         $html = do_shortcode( $parsed );
     3791        $html = apply_shortcodes( $parsed );
    37923792
    37933793        global $wp_scripts;
     
    38623862    }
    38633863
    3864     $parsed = do_shortcode( $shortcode );
     3864    $parsed = apply_shortcodes( $shortcode );
    38653865
    38663866    if ( empty( $parsed ) ) {
Note: See TracChangeset for help on using the changeset viewer.