Review Utils::get_page_on_front() returns bool
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 66
- Forks
- 36
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 16
Description
Is your request related to a problem?
We have this Utils::get_page_on_front() function, which is used by our Metadata->construct_metadata() function.
The Utils::get_page_on_front() name gives the impression that it could return a string (e.g. a page URL or slug) or an int (e.g. page ID). However, this function actually returns a bool. As such, it is either named inappropriately, or there is a better way to do things.
Describe the solution you'd like
Investigate if anything needs to be changed there.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Utils::get_page_on_front() and its use in Metadata->construct_metadata(), then inspect other callers and any related tests. Determine whether the current boolean behavior or the function name should change; done means the required change, if any, is clearly scoped and covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100