File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -655,26 +655,18 @@ public function recount( $args ) {
655655 *
656656 * [--from=<taxonomy>]
657657 * : Taxonomy slug of the term to migrate.
658- * ---
659- * default: category
660- * ---
661658 *
662659 * [--to=<taxonomy>]
663660 * : Taxonomy slug to migrate to.
664- * ---
665- * default: post_tag
666- * ---
667661 *
668662 * ## EXAMPLES
669663 *
670664 * # Migrate a category's term (video) to tag taxonomy.
671- * $ wp term migrate 9190
665+ * $ wp term migrate 9190 --from=category --to=post_tag
672666 * Post 219060 assigned to new term!
673- * Old Term removed!
674667 * Success: Migration of `9190` term for 1 posts
675668 */
676669 public function migrate ( $ args , $ assoc_args ) {
677- global $ wpdb ;
678670 $ clean_term_cache = $ values = array ();
679671 $ term_reference = $ args [0 ];
680672 $ original_taxonomy = Utils \get_flag_value ( $ assoc_args , 'from ' );
@@ -723,7 +715,7 @@ public function migrate( $args, $assoc_args ) {
723715
724716 WP_CLI ::log ( "Old instance of term ' {$ term ->slug } removed from its original taxonomy. " );
725717 $ post_count = count ( $ posts );
726- $ post_plural = WP_CLI \Utils \pluralize ( 'post ' , $ post_count )
718+ $ post_plural = WP_CLI \Utils \pluralize ( 'post ' , $ post_count );
727719 WP_CLI ::success ( "Migrated the term ' {$ term ->slug }' from taxonomy '{original_taxonomy}' to taxonomy '{destination_taxonomy}' for {$ post_count } {$ post_plural }" );
728720 }
729721
You can’t perform that action at this time.
0 commit comments