[wp-meta] [Making WordPress.org] #6160: Filter the list of theme tags before attempting to update
Making WordPress.org
noreply at wordpress.org
Thu Mar 3 08:48:23 UTC 2022
#6160: Filter the list of theme tags before attempting to update
-----------------------------+----------------------
Reporter: dd32 | Owner: dd32
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: Theme Directory | Keywords:
-----------------------------+----------------------
When a theme submits an update, if it has a tag in it's list that's
unknown by WordPress.org/themes, it'll fail to update the tags.
For example:
- Theme v1 has `one-column, green` (all allowed)
- Theme v2 changes it to `one-column, blue, sillytag` (First two allowed,
last not)
The theme in the above example will continue to show as being tagged `one-
column, green` despite the following version changed to `blue`.
It should diff the tags to the expected tags first, in this case,
attempting to set it to `one-column, blue` excluding the `sillytag` tag.
In this case, the error is something like this:
{{{
wp> wp_set_post_tags( 12345, [ 'one-column', 'blue', 'sillytag' ] );
class WP_Error#5234 (3) {
public $errors =>
array(1) {
'not-allowed' =>
array(1) {
[0] =>
string(33) "You are not allowed to add terms."
}}}
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/6160>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list