Skip to content

Commit

Permalink
Merge pull request #156 from PRX/cleanup_tags
Browse files Browse the repository at this point in the history
Cleanup Post Tags
  • Loading branch information
rpeterman-gp authored Feb 5, 2024
2 parents ac45399 + c1df5f1 commit e481473
Show file tree
Hide file tree
Showing 3 changed files with 462 additions and 0 deletions.
22 changes: 22 additions & 0 deletions wp-content/plugins/pri-migration-helper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# WP CLI module.
**Example:**
`wp tw-fix command_to_run arg1 arg2 ... argN`
## Commands:
**`(base) tw-fix`**
###
`wp tw-fix get_unprocessed_images`
###
`wp tw-fix get_images_count`
### Fix image size values in all images imported
`wp tw-fix image_fix [all|new limit]`
Command used to fix the img sizes (width and height) using drupal metadata for all images imported.
### Fix media element in all posts
`wp tw-fix posts_content_media_fix [limit comma_separated_post_ids(optional)]`
Command used to replace img tags by image blocks in a all posts.
### Fix media element in a single post content
`wp tw-fix single_post_content_media_fix [post_id]`
Used to test the code used to replace img tags by image blocks in a single post.
### Cleanup Post Tags
`wp tw-fix post_tags_fix_duplicate [start_page_number post_per_page]`
Command to loop through all post_tags, check each term if it is duplicated in other custom taxonomies.
If it is duplicated, add posts related to the post_tag to the custom taxonomy term.
1 change: 1 addition & 0 deletions wp-content/plugins/pri-migration-helper/cli/cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* 3. image_fix [all|new, limit]
* 4. posts_content_media_fix [limit, comma_separated_post_ids(optional)]
* 5. single_post_content_media_fix [post_id]
* 6. post_tags_fix_duplicate [start_page_number post_per_page]
*/

// Add 'tw-media-fix-all' command to wp-cli.
Expand Down
Loading

0 comments on commit e481473

Please sign in to comment.