Adding or replacing image size

It seems that this regex does the trick: wp search-replace ‘(<!– wp:image\s{(?!.*”sizeSlug”)[^}]*)’ ‘$1,\”sizeSlug\”:\”full\”‘ wp_posts –regex –regex-delimiter=”https://wordpress.stackexchange.com/” –precise EDIT: I added correction, double quotes must be escaped in replacement string in order for this to work properly. It seems that everything is first encoded in json, hence the reason. ANOTHER EDIT: This did the trick by … Read more

How to load only a certain type of image (functions.php)

You can use some JavaScript to add a quick validation that checks the file type when someone tries to add an image. Place this script in your theme’s main JS file or inline in your functions.php. Here’s a snippet of JavaScript to give you an idea: jQuery(document).ready(function($) { wp.customize.control(‘themeslug_logo’, function(control) { control.uploader.params.allowed_extensions = [‘png’]; control.container.on(‘click … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)