WordPress.org

Making WordPress.org

Opened 10 months ago

Closed 6 months ago

#3134 closed enhancement (fixed)

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

Reported by: rushabh4486 Owned by: obenland
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 10 months ago.
3134(1).patch (572 bytes) - added by rushabh4486 9 months ago.

Download all attachments as: .zip

Change History (26)

#1 @rushabh4486
10 months ago

  • Keywords has-patch added

#2 @SergeyBiryukov
10 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
10 months ago

  • Keywords reporter-feedback added

#4 @rushabh4486
10 months ago

  • Keywords needs-refresh added

#5 @rushabh4486
10 months ago

  • Keywords reporter-feedback removed

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


10 months ago

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


10 months ago

#8 follow-up: @SergeyBiryukov
10 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
10 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
10 months ago

  • Keywords dev-feedback added

#11 in reply to: ↑ 9 @SergeyBiryukov
9 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.

#12 follow-up: @SergeyBiryukov
9 months ago

#3232 was marked as a duplicate.

#13 in reply to: ↑ 12 @rushabh4486
9 months ago

Replying to SergeyBiryukov:

#3232 was marked as a duplicate.

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

Last edited 9 months ago by rushabh4486 (previous) (diff)

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


9 months ago

#15 @rushabh4486
9 months ago

  • Priority changed from normal to highest omg bbq

#16 @iandunn
9 months 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
9 months ago

  • Priority changed from lowest to high

#18 @iandunn
9 months ago

  • Priority changed from high to lowest

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

#19 @rushabh4486
9 months ago

  • Priority changed from lowest to normal

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


8 months ago

#21 @iandunn
8 months ago

  • Priority changed from normal to lowest

#22 @rushabh4486
8 months ago

  • Priority changed from lowest to highest omg bbq

#23 @mariovalney
8 months 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. :)

#24 @obenland
6 months ago

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

In 6374:

WP.tv: Add docs for globals.

Also updates some existing docs.

Props rushabh4486 for initial patch.
Fixes #3134.

Note: See TracTickets for help on using tickets.