-
Notifications
You must be signed in to change notification settings - Fork 1
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 icw
cli command to fix insecure content URLs
#39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add some args to filter the get post query. Some of them may be:
- post_type
- limit
- offset
Besides, instead of passing multiple ids as arguments now, I think we should use --include
with a comma-separated list to pass multiple ids.
@dinhtungdu please check again and let me know if something needs change, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great update @thrijith! Just one more issue and this PR is ready to merge.
Running the default command on my test site with 20 posts, the counter doesn't look correct. Also, I expect the summary to be printed after the batch finished only, not during the process.
❯❯❯ wp icw fix
Checking post content...
No insecure content URL found in post 169
No insecure content URL found in post 157
Success: 0/1 insecure URLs fixed in post 140.
No insecure content URL found in post 126
No insecure content URL found in post 113
No insecure content URL found in post 108
No insecure content URL found in post 105
No insecure content URL found in post 100
No insecure content URL found in post 94
No insecure content URL found in post 90
No insecure content URL found in post 78
No insecure content URL found in post 76
No insecure content URL found in post 73
No insecure content URL found in post 71
No insecure content URL found in post 69
No insecure content URL found in post 54
Success: 0/1 insecure URLs fixed in post 25.
No insecure content URL found in post 1
Keep individual reports in debug mode
Hi @dinhtungdu, have updated the command result display, please check again and let me know if it looks ok, thank you! |
Description of the Change
Adds support for fixing insecure content URLs via WP-CLI
Benefits
Verification Process
Checklist:
Applicable Issues
Fixes #16
Changelog Entry
Add wp-cli command to fix insecure content in posts