WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#31048 closed defect (bug) (fixed)

Missing PHPDoc $content param text in shortcode.php

Reported by: cais Owned by: DrewAPicture
Milestone: 4.2 Priority: normal
Severity: normal Version: 3.6
Component: Shortcodes Keywords:
Focuses: docs Cc:

Description

There appears to be no PHPDoc param text for the $content variable being passed to has_shortcode(). The attached patch uses the same text for $content as used in do_shortcode().

Attachments (2)

31048.patch (473 bytes) - added by cais 3 years ago.
31048.2.patch (1.2 KB) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (8)

@cais
3 years ago

#1 follow-up: @DrewAPicture
3 years ago

  • Milestone changed from Awaiting Review to 4.2

Hi cais, thanks for the patch.

I think if we're in there adding a missing parameter and description, we should probably also cover the description for $tag and the return value. Would you care to include those in your patch?

#2 @SergeyBiryukov
3 years ago

Noticed some other inconsistencies, see 31048.2.patch.

Last edited 3 years ago by SergeyBiryukov (previous) (diff)

#3 in reply to: ↑ 1 @cais
3 years ago

Replying to DrewAPicture:

Hi cais, thanks for the patch.

I think if we're in there adding a missing parameter and description, we should probably also cover the description for $tag and the return value. Would you care to include those in your patch?

... looks like I wasn't quick enough. Sergey appears to have covered those.

#4 @DrewAPicture
3 years ago

In 31242:

Ensure both parameters and the return for has_shortcode() are fully documented.

Props cais, SergeyBiryukov
See #31048.

#5 @DrewAPicture
3 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 31243:

Add more complete documentation for parameters, globals, and return values to the DocBlocks for remove_shortcode(), shortcode_exists(), and do_shortcode().

Props SergeyBiryukov.
Fixes #31048.

#6 @DrewAPicture
3 years ago

In 31245:

Remove a stray period introduced in [31242].

Props SergeyBiryukov.
See #31048.

Note: See TracTickets for help on using tickets.