Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51825 closed defect (bug) (fixed)

Spelling error on category-template.php

Reported by: princeahmed's profile princeahmed Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.7 Priority: normal
Severity: normal Version: 5.7
Component: Taxonomy Keywords: has-patch
Focuses: docs Cc:

Description

On wp-includes/category-template.php file there is a spelling error in the documentation of the in_category function.

It is saying array of said instead of array of IDs.

Attachments (1)

51825.patch (1.0 KB) - added by princeahmed 4 years ago.
Created Patch

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
4 years ago

  • Component changed from General to Taxonomy
  • Milestone changed from Awaiting Review to 5.7

Hi there, welcome to WordPress Trac! Thanks for the ticket.

Just to clarify, the documentation means that the function accepts not only an array of category IDs, but also an array of category names or slugs. I agree this could be described better though :)

#2 follow-up: @SergeyBiryukov
4 years ago

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

In 49669:

Docs: Use more specific type in parameter descriptions for in_category() and is_object_in_term().

This better aligns with is_category() and other conditional tags and their WP_Query counterpart methods.

Follow-up to [47402].

Props princeahmed.
Fixes #51825.

@princeahmed
4 years ago

Created Patch

This ticket was mentioned in PR #752 on WordPress/wordpress-develop by princeahmed.


4 years ago
#3

  • Keywords has-patch added

On wp-includes/category-template.php file there is a spelling error in the documentation of the in_category function.
It is saying array of said instead of array of IDs.

Trac ticket: https://core.trac.wordpress.org/ticket/51825

github-actions[bot] commented on PR #752:


4 years ago
#4

Hi @princeahmed! 👋

Thank you for your contribution to WordPress! 💖

It looks like this is your first pull request to wordpress-develop. Here are a few things to be aware of that may help you out!

No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description.

Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making.

More information about how GitHub pull requests can be used to contribute to WordPress can be found in this blog post.

Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook.

If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook.

The Developer Hub also documents the various coding standards that are followed:

Thank you,
The WordPress Project

#5 in reply to: ↑ 2 ; follow-up: @princeahmed
4 years ago

Should I submit another new ticket by improving the parameter descriptions for in_category() and is_object_in_term()?

Replying to SergeyBiryukov:

In 49669:

Docs: Use more specific type in parameter descriptions for in_category() and is_object_in_term().

This better aligns with is_category() and other conditional tags and their WP_Query counterpart methods.

Follow-up to [47402].

Props princeahmed.
Fixes #51825.

#6 in reply to: ↑ 5 @SergeyBiryukov
4 years ago

Replying to princeahmed:

Should I submit another new ticket by improving the parameter descriptions for in_category() and is_object_in_term()?

Thanks for the patch! Just to clarify, as previously noted in comment:1, the function accepts not only an array of category IDs, but also an array of category names or slugs, so 51825.patch is not quite correct.

This is now changed in [49669] to "Category ID, name, slug, or array of such to check against", for consistency with other conditional tags and WP_Query methods, see also [47401] and [47402].

If you have any further ideas on improving the descriptions, please share :)

Note: See TracTickets for help on using tickets.