Directory

Code Reference: need More Information on WP_Filesystem · Issue #405 · WordPress/Documentation-Issue-Tracker · GitHub
Skip to content
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

Code Reference: need More Information on WP_Filesystem #405

Closed
joyously opened this issue Aug 13, 2022 · 2 comments
Closed

Code Reference: need More Information on WP_Filesystem #405

joyously opened this issue Aug 13, 2022 · 2 comments
Assignees
Labels
code reference Issues for Code Reference portal of DevHub developer documentation (DevHub) Improvements or additions to developer documentation

Comments

@joyously
Copy link

Issue Description

There are a few confusing things regarding WP_Filesystem docs.

  1. The code in the function WP_Filesystem uses a variable to instantiate a class, so the docs parser doesn't link the pages.
$method = "WP_Filesystem_$method";
$wp_filesystem = new $method( $args );

There is no link to the base class mentioned in the summary.
2. The return value is not really explained. Basically, the More Information section needs to say what happens using the defaults.
3. The More Information section needs to link to the API page so the full explanation can be found on how to use this function.
https://developer.wordpress.org/apis/handbook/filesystem/
4. The contributed code examples on this function and on WP_Filesystem_Base all call the function with defaults and no getting credentials, which is how it is explained on the API page.
5. The More Information section should mention the earliest available hook of admin_init like the API page does.

URL of the Page with the Issue

https://developer.wordpress.org/reference/functions/wp_filesystem/
and feedback on https://developer.wordpress.org/reference/classes/wp_filesystem_base/

Section of Page with the issue

missing More Information section

Why is this a problem?

A developer can't find the information needed to use the function.

Suggested Fix

Add a More Information section with links to the classes and the API page, with the details needed to use the function.

@joyously joyously added the tracking issue Use to track a series of related issues. label Aug 13, 2022
@stevenlinx
Copy link
Member

1.) This item is not the domain of the Docs team to fix. This is the domain of the Meta team. If you want to see the class methods linked, you 'll want to ask Meta. At best, we can manually add the links to the More Information section, which is what I've done.

2.) & 4.) I assume the "direct" method is used if no parameters are specified.

3.) I've added the link from the Common APIs Handbook to the More Information section.

5.) I've added content about admin_init from the Common APIs Handbook to the More Information section.

@stevenlinx stevenlinx added developer documentation (DevHub) Improvements or additions to developer documentation code reference Issues for Code Reference portal of DevHub and removed tracking issue Use to track a series of related issues. labels Sep 22, 2022
@github-actions
Copy link

Heads up @zzap @lucprincen - the "code reference" label was applied to this issue.

@stevenlinx stevenlinx self-assigned this Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code reference Issues for Code Reference portal of DevHub developer documentation (DevHub) Improvements or additions to developer documentation
Projects
None yet
Development

No branches or pull requests

2 participants