devgeniem / wp-sanitize-accented-uploads Goto Github PK
View Code? Open in Web Editor NEWReplaces accents from future uploads and includes wp-cli command which you can use to sanitize current content.
License: MIT License
Replaces accents from future uploads and includes wp-cli command which you can use to sanitize current content.
License: MIT License
This plugin should test wp-cli integration more thoroughly. In order to have better unittests Sanitize_Command::replace_content()
should be factored into smaller parts for example:
site_replace_content()
replace_attachments()
replace_attachment()
$ wp sanitize all
will change the metadata of your files incorrectly in some cases.
Here's example of metadata from my site:
wp eval "var_dump(wp_get_attachment_metadata(9));"
array(5) {
["width"]=>
int(418)
["height"]=>
int(280)
["file"]=>
string(17) "2014/11/test1.jpg"
["sizes"]=>
array(5) {
["thumbnail"]=>
array(4) {
["file"]=>
string(17) "test1-150x150.jpg"
["width"]=>
int(150)
["height"]=>
int(150)
["mime-type"]=>
string(10) "image/jpeg"
}
["medium"]=>
array(4) {
["file"]=>
string(17) "test1-280x160.jpg"
["width"]=>
int(280)
["height"]=>
int(160)
["mime-type"]=>
string(10) "image/jpeg"
}
["small"]=>
array(4) {
["file"]=>
string(16) "test1-107x75.jpg"
["width"]=>
int(107)
["height"]=>
int(75)
["mime-type"]=>
string(10) "image/jpeg"
}
["map-img"]=>
array(4) {
["file"]=>
string(17) "test1-152x108.jpg"
["width"]=>
int(152)
["height"]=>
int(108)
["mime-type"]=>
string(10) "image/jpeg"
}
["custom-size"]=>
array(4) {
["file"]=>
string(17) "test1-418x200.jpg"
["width"]=>
int(418)
["height"]=>
int(200)
["mime-type"]=>
string(10) "image/jpeg"
}
}
["image_meta"]=>
array(11) {
["aperture"]=>
int(0)
["credit"]=>
string(0) ""
["camera"]=>
string(0) ""
["caption"]=>
string(0) ""
["created_timestamp"]=>
int(0)
["copyright"]=>
string(0) ""
["focal_length"]=>
int(0)
["iso"]=>
int(0)
["shutter_speed"]=>
int(0)
["title"]=>
string(0) ""
["orientation"]=>
int(1)
}
}
I want to use visually plugin from the wp-admin wordpress, how do I do?
PS: No I have access to WP-CLI
I tried to fix existing files with the command line tool but the tool ran into some error on a PDF file. The file didn't have any special characters. 21 characters, with one uppercase character and an underscore.
Unfortunately I was quite busy at the time and didn't have time to troubleshoot, so I don't have any more details to tell about this possible bug. I didn't even save the error message anywhere ๐ I just renamed that file manually and after that the command line tool worked well.
This ticket is only a small reminder that there might be a problem with PDF files. I will report more if I ever run into the problem again or have time to recreate the problem somehow.
used the CLI command to process old files, and for some reason all uploaded mp4 files broke miserably and were deleted.
Thank god for backups.
I have a larger site and for some reason wp sanitize all
didn't go through as expected, so I have everything right in Media Library, but in articles the images are in the old format, capitalized and with wrong letters - so lots of 404s. Any way to force sanitize all db entries?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.