Skip to content

Follow the WordPress documentation standards in functions.php docblocks - #161

Merged
MaggieCabrera merged 1 commit into
WordPress:trunkfrom
mukeshpanchal27:fix/docblock-standards
Oct 21, 2026
Merged

MaggieCabrera merged 1 commit into
WordPress:trunkfrom
mukeshpanchal27:fix/docblock-standards

Conversation

@mukeshpanchal27

Copy link
Copy Markdown
Member

Description

Brings the function docblocks in functions.php in line with the WordPress PHP documentation standards. PHPCS does not flag these, so they passed composer run lint.

  • Adds a blank line between @since and the @param or @return tags in all 9 function docblocks.
  • Describes the return value of ipsum_sidebar_template_types() and ipsum_search_aria_label_support(), which had a bare @return array.
  • Uses a third-person verb in the ipsum_styles() summary: "Enqueues styles." instead of "Enqueue styles.", like the other docblocks in the file.

Only comments change. There is no open issue for this change.

Screenshots

None. The change has no visible effect.

Testing Instructions

  1. Run composer run lint and confirm it reports no errors.
  2. Run php -l functions.php and confirm it reports no syntax errors.
  3. Read the diff and confirm that only docblock comments changed.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Finding the docblock issues and writing the fix; I reviewed the changes.

🤖 Generated with Claude Code

Adds a blank line after `@since` in every function docblock, describes the two `@return array` values, and uses a third-person verb in the `ipsum_styles()` summary. Only comments change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the [Area] Theme Functions Issues or PRs that touch functions.php. label Oct 21, 2026
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@MaggieCabrera
MaggieCabrera merged commit 044a2e1 into WordPress:trunk Oct 21, 2026
8 checks passed
MaggieCabrera added a commit to MaggieCabrera/wordpress-develop that referenced this pull request Oct 21, 2026
…n images.

The hooked functions now start with what they do, such as `ipsum_enqueue_styles()` and `ipsum_register_block_styles()`. Pattern image URLs end in `?ver=` and the theme version, so sites with long static file caches get a changed image after an update. The function docblocks also follow the documentation standards.

Synced from WordPress/ipsum#163, which includes WordPress/ipsum#161.

See #66352.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Theme Functions Issues or PRs that touch functions.php.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants