Make WordPress Core

Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#42783 closed defect (bug) (fixed)

set_query_var should have a helpful inline doc description

Reported by: webdevmattcrom's profile webdevmattcrom Owned by:
Milestone: 5.6 Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch
Focuses: docs Cc:

Description

set_query_var() does not have any description to help developers understand the purpose and/or context of this function. Adding inline docs will also help ensure the DevHub is accurate.

See here: https://core.trac.wordpress.org/browser/tags/4.9/src/wp-includes/query.php#L73

Suggested Description:
"set_query_var is a wrapper function to the global $wp_query that uses the method set."

Attachments (1)

ticket#42783.patch (375 bytes) - added by webdevmattcrom 7 years ago.
Patch for ticket #42783 -- adds inline doc per suggestion

Download all attachments as: .zip

Change History (8)

@webdevmattcrom
7 years ago

Patch for ticket #42783 -- adds inline doc per suggestion

#1 @stevenlinx
7 years ago

  • Keywords has-patch added

#2 @pento
5 years ago

  • Version trunk deleted

This ticket was mentioned in Slack in #core by noisysocks. View the logs.


4 years ago

#4 @noisysocks
4 years ago

In 49094:

Docs: Improve set_query_var() inline docs.

Makes the inline docs for set_query_var() consistent with the inline docs for
get_query_var().

See #42783.
Props stevenlinx, markparnell.

#5 @noisysocks
4 years ago

  • Milestone changed from Awaiting Review to 5.6
  • Resolution set to fixed
  • Status changed from new to closed

#6 @SergeyBiryukov
4 years ago

In 49095:

Docs: Synchronize descriptions of some query functions and their counterpart methods in WP and WP_Query classes:

  • set_query_var()
  • get_query_var()
  • get_queried_object()
  • get_queried_object_id()

Switch to third-person singular verbs, per the documentation standards.

See #50768, #42783.

#7 @SergeyBiryukov
4 years ago

  • Component changed from General to Query
Note: See TracTickets for help on using tickets.