WordPress.org

Making WordPress.org

Opened 3 months ago

Last modified 3 weeks ago

#3134 new enhancement

WordPress.tv: Add @param and @global keywords for some variables

Reported by: rushabh4486 Owned by:
Milestone: Priority: lowest
Component: WordPress.tv Keywords: has-patch needs-refresh
Cc:

Description

Documents need to improve.

Attachments (2)

3134 wordpress.tv.diff (5.0 KB) - added by rushabh4486 3 months ago.
3134(1).patch (572 bytes) - added by rushabh4486 7 weeks ago.

Download all attachments as: .zip

Change History (25)

#1 @rushabh4486
3 months ago

  • Keywords has-patch added

#2 @SergeyBiryukov
3 months ago

  • Summary changed from Missing to define @param and @global some variable in wordpress.tv's theme wptv2. to WordPress.tv: Add @param and @global keywords for some variables

#3 @rushabh4486
3 months ago

  • Keywords reporter-feedback added

#4 @rushabh4486
3 months ago

  • Keywords needs-refresh added

#5 @rushabh4486
3 months ago

  • Keywords reporter-feedback removed

This ticket was mentioned in Slack in #meta by rushabhshah. View the logs.


3 months ago

This ticket was mentioned in Slack in #wptv by rushabhshah. View the logs.


3 months ago

#8 follow-up: @SergeyBiryukov
3 months ago

Hi @rushabh4486, welcome to WordPress Meta Trac! Thanks for the patch.

Per WordPress' PHP Documentation Standards, @global tags are used to document globals in functions or methods. What's the benefit of adding @global tags right next to the global declarations in theme templates? Seems redundant, and none of the bundled themes do that.

#9 in reply to: ↑ 8 ; follow-up: @rushabh4486
3 months ago

Replying to SergeyBiryukov:

Hi @rushabh4486, welcome to WordPress Meta Trac! Thanks for the patch.

Per WordPress' PHP Documentation Standards, @global tags are used to document globals in functions or methods. What's the benefit of adding @global tags right next to the global declarations in theme templates? Seems redundant, and none of the bundled themes do that.

What about @param tag?

@SergeyBiryukov

#10 @rushabh4486
3 months ago

  • Keywords dev-feedback added

#11 in reply to: ↑ 9 @SergeyBiryukov
2 months ago

Replying to rushabh4486:

What about @param tag?

The change in functions.php looks good, though it would also be helpful to add a description, something like:

@param WP_Query $query Current query object.

@rushabh4486
7 weeks ago

#12 follow-up: @SergeyBiryukov
7 weeks ago

#3232 was marked as a duplicate.

#13 in reply to: ↑ 12 @rushabh4486
7 weeks ago

Replying to SergeyBiryukov:

#3232 was marked as a duplicate.

Hello @SergeyBiryukov
What about 3134(1).patch?

Last edited 7 weeks ago by rushabh4486 (previous) (diff)

This ticket was mentioned in Slack in #wptv by rushabhshah. View the logs.


7 weeks ago

#15 @rushabh4486
7 weeks ago

  • Priority changed from normal to highest omg bbq

#16 @iandunn
7 weeks ago

  • Priority changed from highest omg bbq to lowest

Hi @rushabh4486, thanks for your contribution here. Conforming to PHPDoc is a good thing to do. Compared to other tickets, though, this is a very low priority.

That doesn't mean that it won't be accepted one day, but properly prioritizing tickets helps us focus our time on what will make the biggest impact.

#17 @rushabh4486
7 weeks ago

  • Priority changed from lowest to high

#18 @iandunn
7 weeks ago

  • Priority changed from high to lowest

Hi @rushabh4486, this should remain at lowest, per comment:16. Thanks :)

#19 @rushabh4486
6 weeks ago

  • Priority changed from lowest to normal

This ticket was mentioned in Slack in #wptv by rushabhshah. View the logs.


6 weeks ago

#21 @iandunn
6 weeks ago

  • Priority changed from normal to lowest

#22 @rushabh4486
4 weeks ago

  • Priority changed from lowest to highest omg bbq

#23 @mariovalney
3 weeks ago

  • Keywords dev-feedback removed
  • Priority changed from highest omg bbq to lowest
  • Type changed from defect to enhancement

Hi @rushabh4486, this should remain at lowest because this is just documentation. And I guess it's better as a enhancement because the same reason.

You can check more information about Ticket Properties here. :)

Note: See TracTickets for help on using tickets.