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

How to make programmatic image upload generate thumbnail and sizes?

In order for wp_generate_attachment_metadata() to work properly in that it creates a thumbnail and other intermediate/image sizes like medium and large, the image attachment/post data must have the proper MIME type (post_mime_type), and despite you did set it in your $attachment array (the post data), there’s a problem with this part in your code: $wp_filetype … Read more

How do I go straight to “Edit More Details” when clicking on an item in the media library?

From /wp-includes/script-loader.php: $scripts->add( ‘media-grid’, “/wp-includes/js/media-grid$suffix.js”, array( ‘media-editor’ ), false, 1 ); From wp-admin/upload.php: wp_enqueue_script( ‘media-grid’ ); wp_enqueue_script( ‘media’ ); wp_localize_script( ‘media-grid’, ‘_wpMediaGridSettings’, array( ‘adminUrl’ => parse_url( self_admin_url(), PHP_URL_PATH ), ) ); So, we can try to unregister the initial media-grid.js file and load our own version. This can be done via a plugin: <?php /** … Read more

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