Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add / General Command to Remove Featured Image if File Missing #501

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

ronchambers
Copy link
Collaborator

@ronchambers ronchambers commented May 21, 2024

Adds a general command to loop through all posts that have featured images and remove the featured image from the post if the image file does not exist on the hard drive.

Command: wp newspack-content-migrator remove-featured-images-if-file-is-missing

Output log: cmd_remove_featured_images_if_file_is_missing.log


  • confirmed that PHPCS has been run

@ronchambers
Copy link
Collaborator Author

@naxoc - I added a simple general use command to remove featured images if the actual image file does not exist on the hard drive. Please review if/when you can. Thank you!

(fyi @eddiesshop )

@ronchambers ronchambers requested a review from naxoc May 21, 2024 23:48
@naxoc
Copy link
Member

naxoc commented May 22, 2024

Thanks!
Let's wait a little bit with this one – we might not need it, but let's keep the PR open a bit longer in case we end up needing it :)

@ronchambers
Copy link
Collaborator Author

ronchambers commented May 22, 2024

Sounds good. (If we do need it, I'll add --dry-run)

@ronchambers ronchambers marked this pull request as draft May 23, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants