-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Docs: Replace incorrect @see usage with @link #10804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Docs: Replace incorrect @see usage with @link #10804
Conversation
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
@huzaifaalmesbah Thanks for working on this cleanup! The conversion from @see to @link for external URLs is correct and follows the WordPress documentation standards. However, for better consistency within this PR, I suggest adding a brief description after each @link URL, similar to what was done in src/wp-includes/html-api/class-wp-html-decoder.php For example: * @link [URL] [Brief Description] This would make the documentation more descriptive and maintain a uniform style across all the modified files in this PR. |
shail-mehta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
|
I had wondered about this, but |
|
Thanks for pointing this out @westonruter ! However, according to the WordPress PHP Documentation Standards for DocBlocks: 👉 URLs should be added with the Specifically, the handbook states:
And:
So, while generic phpDocumentor allows linking URLs with Otherwise… I guess we might need to update the WordPress PHP Documentation Standards too 😄 |
Trac Ticket: https://core.trac.wordpress.org/ticket/64224
Why this change?
This change aligns the codebase with the WordPress PHP Documentation Standards, which clearly distinguish between the intended usage of the
@seeand@linktags:@seeis meant for referencing internal structural elements of the WordPress codebase, such as classes, functions, methods, or hooks.@linkis meant for referencing external resources, including URLs, specifications, and tickets hosted outside the codebase.Currently, there are several instances in WordPress core where
@seeis incorrectly used to reference:This PR corrects those cases by replacing
@seewith@linkwhere the reference points to an external resource.When to use
@linkExternal URLs
Always use
@linkwhen referencing an external URLExample:
@link https://html.spec.whatwg.orgExternal resources
Use
@linkfor documentation, specifications, or tickets that live outside the WordPress codebaseContrast with
@seeUse
@seewhen referring to:@see wp_remote_get())@see WP_Query)Detailed changes
This PR applies targeted fixes across 15 specific files in
src/wp-adminandsrc/wp-includes, replacing incorrect@seetags with@linkwhere appropriate.src/wp-adminedit-form-blocks.phpsite-editor.phpsrc/wp-includeshtml-api/class-wp-html-active-formatting-elements.phphtml-api/class-wp-html-doctype-info.phphtml-api/class-wp-html-tag-processor.phphtml-api/class-wp-html-decoder.phpclass-wp-url-pattern-prefixer.phpnav-menu-template.phppluggable.phpmedia.phprest-api/endpoints/class-wp-rest-controller.phprest-api/endpoints/class-wp-rest-templates-controller.phpscript-loader.phpspeculative-loading.phpdeprecated.php