Making WordPress.org

Opened 7 years ago

Closed 7 years ago

#3134 closed enhancement (fixed)

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

Reported by: rushabh4486's profile rushabh4486 Owned by: obenland's profile 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 7 years ago.
3134(1).patch (572 bytes) - added by rushabh4486 7 years ago.

Download all attachments as: .zip

Change History (26)

#1 @rushabh4486
7 years ago

  • Keywords has-patch added

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

  • Keywords reporter-feedback added

#4 @rushabh4486
7 years ago

  • Keywords needs-refresh added

#5 @rushabh4486
7 years ago

  • Keywords reporter-feedback removed

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


7 years ago

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


7 years ago

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

  • Keywords dev-feedback added

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

#12 follow-up: @SergeyBiryukov
7 years ago

#3232 was marked as a duplicate.

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

Replying to SergeyBiryukov:

#3232 was marked as a duplicate.

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

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

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


7 years ago

#15 @rushabh4486
7 years ago

  • Priority changed from normal to highest omg bbq

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

  • Priority changed from lowest to high

#18 @iandunn
7 years ago

  • Priority changed from high to lowest

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

#19 @rushabh4486
7 years ago

  • Priority changed from lowest to normal

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


7 years ago

#21 @iandunn
7 years ago

  • Priority changed from normal to lowest

#22 @rushabh4486
7 years ago

  • Priority changed from lowest to highest omg bbq

#23 @mariovalney
7 years 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
7 years 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.