Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#44691 closed defect (bug) (fixed)

Comment variable is wrong for shortcode tags

Reported by: uttam007 Owned by: SergeyBiryukov
Priority: normal Milestone: 5.1
Component: Shortcodes Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Filters the list of shortcode tags to remove from the content comment variable is not correct. It should be $tags_to_remove instead of $tag_array.

Attachments (2)

strip_shortcode_comment.7361.diff (574 bytes ) - added by uttam007 8 years ago.
Updated the comment parameter name in the comment.
44691.diff (572 bytes ) - added by uttam007 8 years ago.

Download all attachments as: .zip

Change History (7)

@uttam007
8 years ago

Updated the comment parameter name in the comment.

#1 @netweb
8 years ago

  • Keywords has-patch needs-refresh added
  • Milestone Awaiting Review5.0

Hi @uttam007, welcome to Trac and thanks for creating his ticket :)

Could you refresh the patch please so that the @param's descriptions are aligned:

  • src/wp-includes/shortcodes.php

    function strip_shortcodes( $content ) {  
    609609         *
    610610         * @since 4.7.0
    611611         *
    612          * @param array  $tag_array Array of shortcode tags to remove.
    613          * @param string $content   Content shortcodes are being removed from.
     612         * @param array  $tags_to_remove Array of shortcode tags to remove.
     613         * @param string $content        Content shortcodes are being removed from.
    614614         */
    615615        $tags_to_remove = apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content );}}}

#2 follow-up: @subrataemfluence
8 years ago

  • Component GeneralShortcodes

Please mention your version of WordPress where you found the issue.

Version 0, edited 8 years ago by subrataemfluence (next)

@uttam007
8 years ago

#3 in reply to: ↑ 2 @uttam007
8 years ago

Replying to subrataemfluence:

I have uploaded another attachment with the ticket number and the Wordpress version is 4.9.7.

#4 @SergeyBiryukov
8 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 43549:

Docs: Correct parameter name in strip_shortcodes_tagnames filter DocBlock.

Props uttam007.
Fixes #44691.

#5 @SergeyBiryukov
8 years ago

  • Keywords needs-refresh removed
  • Milestone 5.05.1

Switching milestone due to the focus on the new editor (Gutenberg) for WordPress 5.0.

Note: See TracTickets for help on using tickets.