[wp-trac] [WordPress Trac] #60783: plugins_api() and parameters
WordPress Trac
noreply at wordpress.org
Sat May 17 23:09:59 UTC 2025
#60783: plugins_api() and parameters
-------------------------------------------------+-------------------------
Reporter: juliobox | Owner: audrasjb
Type: enhancement | Status: closed
Priority: normal | Milestone: Future
| Release
Component: Plugins | Version:
Severity: normal | Resolution: reported-
Keywords: good-first-bug has-patch changes- | upstream
requested | Focuses:
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: good-first-bug has-patch needs-testing changes-requested =>
good-first-bug has-patch changes-requested
* status: accepted => closed
* focuses: docs =>
* resolution: => reported-upstream
Comment:
This report doesn't belong to this Core trac but to
[https://meta.trac.wordpress.org/ Meta trac].
Although [https://github.com/WordPress/wordpress-develop/pull/6611.diff
the patch] "solves" the issue, this is not an issue that must be solved in
WP client but in the API endpoint… The user can always develop a
workaround like the exhibited by this patch in his code. After all, it's
client code (but the whole parameters are still being received by the
client which is not what it is expected).
Replying to [ticket:60783 juliobox]:
> There is. Same for those params that are "false" by default but still
included: "sections", "versions", "reviews", "banners", "active_installs"
(I don't know for "group", can't get the thing).
Most fields, are not defaulted `false`, for example,
[https://github.com/WordPress/wordpress.org/blob/0da845425e77183308f99f6a4e5c095be5d91233/wordpress.org/public_html
/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-
request.php#L103 sections],
[https://github.com/WordPress/wordpress.org/blob/0da845425e77183308f99f6a4e5c095be5d91233/wordpress.org/public_html
/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-
request.php#L107 versions],
[https://github.com/WordPress/wordpress.org/blob/0da845425e77183308f99f6a4e5c095be5d91233/wordpress.org/public_html
/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-
request.php#L79 reviews],
[https://github.com/WordPress/wordpress.org/blob/0da845425e77183308f99f6a4e5c095be5d91233/wordpress.org/public_html
/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-
request.php#L81 contributors], etc… But the big list in the beginning can
be a little confusing, making you think they are defaulted to `false`
wrongly. Maybe they should rework it to leave things clearer.
> Finally there is some fields that are always returned where the doc
can't help, I tried to use they array keys to cancel them, no chance, this
is : "author', "author_profile" (those 2 may be forced, that's ok),
"support_threads", "support_threads_resolved", "upgrade_notice", and
"requires_plugin" (I know it's new, but don't forget it)
This must be reported on Meta trac because I cannot even see them
filterable in the remote API request code.
This said, given that this report is a little old, I've done the report
upstream already [https://meta.trac.wordpress.org/ticket/7979 #7979], so
this can be closed and continue the discussion there.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60783#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list