[wp-meta] [Making WordPress.org] #7979: Plugins API: Fields filtering doesn't remove all fields. (was: REST API: Fields filtering is not working as expect)
Making WordPress.org
noreply at wordpress.org
Mon May 19 00:49:41 UTC 2025
#7979: Plugins API: Fields filtering doesn't remove all fields.
------------------------------+---------------------
Reporter: SirLouen | Owner: (none)
Type: defect (bug) | Status: new
Priority: lowest | Milestone:
Component: Plugin Directory | Resolution:
Keywords: |
------------------------------+---------------------
Changes (by dd32):
* priority: normal => lowest
Old description:
> This is a follow-up for [https://core.trac.wordpress.org/ticket/60783
> #60783]
>
> Executing a query towards the Plugins Directory API
> `http://api.wordpress.org/plugins/info/1.2/`
>
> Headers: `User.Agent = "WordPress/6.9-alpha-60093-src;
> http://localhost:8889/"`
> Params:
> ```
> {
> "action": "plugin_information",
> "request%5Bslug%5D": "secupress",
> "request%5Bfields%5D%5Bcontributors%5D": "0",
> "request%5Bfields%5D%5Bauthor%5D": "0",
> "request%5Bfields%5D%5Bsupport_threads%5D": "0",
> "request%5Blocale%5D": "en_US",
> "request%5Bwp_version%5D": "6.9"
> }
> ```
>
> Despite explicitly asking to not include, resulting response is
> including:
> 1. Author
> 2. Support Threads
>
> Also
> [https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
> /wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-
> request.php according to docs], some of those fields like:
> - `author`
> - `author_profile`
> - `support_threads`
> - `support_threads_resolved`
> - `upgrade_notice`
> - `requires_plugin`
>
> Are not even being handled there, so it's impossible to decide to filter
> them out even manually.
New description:
This is a follow-up for [https://core.trac.wordpress.org/ticket/60783
#60783]
Executing a query towards the Plugins Directory API
`http://api.wordpress.org/plugins/info/1.2/`
Headers: `User.Agent = "WordPress/6.9-alpha-60093-src;
http://localhost:8889/"`
Params:
{{{
{
"action": "plugin_information",
"request[slug]": "secupress",
"request[fields][contributors]": "0",
"request[fields][author]": "0",
"request[fields][support_threads]": "0",
"request[locale]": "en_US",
"request[wp_version]": "6.9"
}
}}}
Despite explicitly asking to not include, resulting response is including:
1. Author
2. Support Threads
Also
[https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api-
request.php according to docs], some of those fields like:
- `author`
- `author_profile`
- `support_threads`
- `support_threads_resolved`
- `upgrade_notice`
- `requires_plugin`
Are not even being handled there, so it's impossible to decide to filter
them out even manually.
--
Comment:
reformatted report for readability.
Realistically the `remove fields` functionality is included/supported for
historical reasons, but is likely to be removed in a future API revision
(or the client-specified list to be deprecated)
But correct, certain fields can't be removed from the output, that
includes, but is not limited to, `author`, and `support_threads`. There's
a whole bunch of others that likely aren't supported.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7979#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list