Organizing media uploads

First, I assume the problem isn’t as much 1M files, but your server unable to handle it? Logically it worked elsewhere, right? My opinion is that presenting is as a “problem” to the client might be a little one sided. It’s in realm of technical possibility, but it won’t be a smooth process. WP stores … Read more

Disable mouse image resizing in editor

I use a lot of CSS to manipulate things in the WP UI. I have this in a plugin – should work as expected. If you are already hooked into the admin CSS then bypass the filter. PHP add_filter (‘admin_enqueue_scripts’, array(&$this, ‘load_custom_wp_admin_style’ )); function load_custom_wp_admin_style() { echo ‘<style type=”text/css” rel=”stylesheet-default-admin”> @import url(‘.WPMSGC_URL.’/assets/css/default-admin.css);’ . $this->options[‘default_admin_css’] . … Read more

add_image_size landscape or portrait

What you’re asking for is functionally equivalent to scaling images to fit within a bounding square of each size, so could be achieved with this: add_image_size(‘big_xxl’, 4500, 4500); add_image_size(‘big_xl’, 3300, 3300); add_image_size(‘big’, 2100, 2100); add_image_size(‘medium’, 1250, 1250); Consider a landscape image that is 5000×500. These rules will generate images scaled to 4500, 3300, 2100 and … Read more

Can’t edit media details in new role

As mentioned in my comment(s), below the code as it imho should be.(tested and working) /** * Add new role: Writer * This role allows to: Add/Edit/Delete Posts and Uploads * * Read more: {@link https://codex.wordpress.org/Roles_and_Capabilities} * * Works with @version WP4.8.1 and below */ add_role( ‘writer’, ‘Writer’, array( ‘delete_posts’ => true, ‘delete_published_posts’ => true, … Read more

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