[wp-meta] [Making WordPress.org] #8060: Plugins missing when querying by author in Plugin Info API
Making WordPress.org
noreply at wordpress.org
Mon Sep 1 03:37:18 UTC 2025
#8060: Plugins missing when querying by author in Plugin Info API
------------------------------+---------------------
Reporter: gazchap | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Plugin Directory | Resolution:
Keywords: |
------------------------------+---------------------
Changes (by dd32):
* component: API => Plugin Directory
Comment:
This is indeed caused by the `Contributors:` line in the readme not
containing the plugin author.
Elsewhere on WordPress.org we include plugins that are '''owned''' by the
queried user, but in this particular search we're only looking at the
contributors taxonomy:
{{{
WP_Query excerpt:
public 'tax_query' =>
object(WP_Tax_Query)[1305]
public 'queries' =>
array (size=1)
0 =>
array (size=2)
0 =>
array (size=5)
'taxonomy' => string 'plugin_contributors' (length=19)
'terms' =>
array (size=1)
0 => string 'woocommerce' (length=11)
'field' => string 'slug' (length=4)
'operator' => string 'IN' (length=2)
'include_children' => boolean true
'relation' => string 'OR' (length=2)
public 'relation' => string 'AND' (length=3)
protected 'table_aliases' =>
array (size=1)
0 => string 'wp_term_relationships' (length=28)
public 'queried_terms' =>
array (size=1)
'plugin_contributors' =>
array (size=2)
'terms' =>
array (size=1)
0 => string 'woocommerce' (length=11)
'field' => string 'slug' (length=4)
public 'primary_table' => string 'wp_posts' (length=15)
public 'primary_id_column' => string 'ID' (length=2)
}}}
WP_Query doesn't have a good way to do a `post_author = 123 OR taxonomy
has AUTHORNAME slug`, so this is kinda hard to query purely as a union of
two data-sources.
In [14396] I forced the primary owner of the plugin to always show as a
contributor, instead of doing it at runtime like I did there, it should
probably happen at plugin import time / author change time so that the
taxonomy always has the plugin author listed.. which would then solve this
problem.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/8060#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list