While Ajax is working well, media upload isn’t showing the imagines
adding the following code to your .htaccess can resolve! PHP_value default_charset none PHP_value output_handler none Note: comment out the others code having utf-8
adding the following code to your .htaccess can resolve! PHP_value default_charset none PHP_value output_handler none Note: comment out the others code having utf-8
I was asking the same question in the comments of another question. The solution is (thanks to Кирилл-Меркушев), to get another URL from the onSelect Callback. Before I had this: function onSelectImage( media ) { props.setAttributes( { mediaURL: media.url } ); props.setAttributes( { mediaID: media.id } ); } Then I console logged the media parameter, … Read more
Deleting the files out of the uploads folder is almost certainly the culprit here. Your theme may have custom code that affects the Media Library, but since you wrote it and you don’t think there is you’re probably right 🙂 So we can assume it’s the uploads folder. There is a database entry per file, … Read more
Why don’t you use Duplicator – WordPress Migration Plugin for migration?. I have also used same plugin used by you for migration but Duplicator is far better then other migration plugins. I think this problem can be resolve by using above plugin.
Something like this should work : $args = array ( ‘post_type’ => array( ‘post’, ‘attachment’), ‘category’ => ARTICLE_CATID ); $query = new WP_Query( $args );
You’re right…the figcaptions are encoded as html in $block[‘innerHTML’]. You could do sth. like $tmpArray = explode(‘</li>’,$block[‘innerHTML’]); before your foreach loop to split the HTML string into an array that matches your gallery items and inside the loop strip_tags($tmpArray[i]); to strip away all html tags and only get the text string inside <figcaption></figcaption>. You’ll only … Read more
I did a googles of the issue (using ‘wordpress restrict media access’) and got this link on the first page https://www.wpbeginner.com/plugins/how-to-restrict-media-library-access-to-users-own-uploads-in-wordpress/ Which has this code // Limit media library access add_filter( ‘ajax_query_attachments_args’, ‘wpb_show_current_user_attachments’ ); function wpb_show_current_user_attachments( $query ) { $user_id = get_current_user_id(); if ( $user_id && !current_user_can(‘activate_plugins’) && !current_user_can(‘edit_others_posts ‘) ) { $query[‘author’] = $user_id; … Read more
That issue is not due to WordPress but due to your server configuration. Try increasing the PHP memory on the server as well as the max upload filesize. If you do not know how to do that please contact your hosting provider. Each server is different for that configuration therefore you won’t be able to … Read more
It looks like a plugin/theme conflict. First of all, I would recommend you to deactivate all your plugins, and then to install or activate default theme, like TwentyNineteen or TwentySeventeen. Do you still have your problem ? If you don’t, we have found the solution (and then activate your plugin, one by one, to see … Read more
gordie Here is an example of meta box for bellow possible mime types ‘image/jpeg’,’image/gif’,’image/png’,’image/bmp’,’image/tiff’,’image/x-icon’ //add meta_box for image mime types only function add_our_attachment_meta(){ $attachment_id = $_REQUEST[‘post’]; $attachment_mime_type = get_post_mime_type($attachment_id); $possible_mime_types = array(‘image/jpeg’,’image/gif’,’image/png’,’image/bmp’,’image/tiff’,’image/x-icon’); if(in_array($attachment_mime_type, $possible_mime_types)){ add_meta_box( ‘custom-attachment-meta-box’, ‘Attachment Extra Details’, ‘our_attachment_meta_box_callback’, ‘attachment’, ‘normal’, ‘low’); } } add_action( ‘admin_init’, ‘add_our_attachment_meta’ ); //callback function of custom metabox function … Read more