[wp-trac] [WordPress Trac] #60076: 200 tags maximum
WordPress Trac
noreply at wordpress.org
Thu Dec 14 21:10:01 UTC 2023
#60076: 200 tags maximum
--------------------------------------+------------------------------
Reporter: motk88 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 6.4.2
Severity: normal | Resolution:
Keywords: 2nd-opinion dev-feedback | Focuses:
--------------------------------------+------------------------------
Changes (by sebastienserre):
* keywords: => 2nd-opinion dev-feedback
Comment:
So I have added 210 terms to the `post_tag`and assign the to a test post
with ID 863:
{{{#!php
<?php
add_action( 'plugins_loaded', function(){
$i = 1;
$tags = array();
while( $i <= 210 ){
$term_id = wp_insert_term( 'tag_' . $i, 'post_tag');
if ( is_wp_error( $term_id ) ){
return;
}
$tags[]=$term_id[ 'term_id' ];
$i++;
}
wp_set_post_terms( 863, $tags );
});
}}}
Then, I have just count the number of terms to be sure :
{{{#!php
<?php
add_action( 'plugins_loaded', function (){
$terms = wp_get_post_terms( 863, 'post_tag' );
$terms_count = count ( $terms );
var_dump( $terms_count ); die;
});
}}}
I do not reproduce your issue.
I'm attaching 2 screenshots (list-of-tags.jpg & count-of-tags.jpg)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60076#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list