WordPress Media manager select file button, how to prevent hiding?

Sorry for format of my code. Please any one help me to edit this code format. ” Use below code in function file in your theme. After that it will display an option in Admin> appearance>Homepage below image 1 . From there you can upload image.” function register_my_logo(){ register_setting(‘logo_options_group’,’logo_options_group’); }add_action( ‘admin_init’, ‘register_my_logo’ ); function add_logo_page_to_settings() … Read more

Removing delete permanently button in uploading files media

This might do the trick! css: .media-sidebar .details .edit-attachment { display: none; } .media-sidebar .details .delete-attachment { display: none; } And this: foreach( array( ‘post.php’, ‘post-new.php’ ) as $hook ) add_action( “admin_print_styles-$hook”, ‘admin_styles_so_25894288’); function admin_styles_so_25894288() { global $typenow; if( ‘post’ !== $typenow ) return; ?> <style> .media-sidebar .details .delete-attachment { display: block; } .media-sidebar .details … Read more

WP Media Uploader modal conflicts with Bootstrap modal

Just proxy the modal-open class for Bootstrap like this: .bs-modal-open { overflow: hidden; } .bs-modal-open .modal { overflow-x: hidden; overflow-y: auto; } // or using sass … .bs-modal-open { @extend .modal-open; } Add/remove the bs-modal-open class to the body when opening/closing a BS modal: $(‘.bs-modal’) .on(‘show.bs.modal’, function (e) { $(‘body’).addClass(‘bs-modal-open’); }) .on(‘hidden.bs.modal’, function (e) { … Read more

wp_enqueue_media(); in multiple widgets

Your actual issue is that you are using $(‘.custom_media_url’).val(attachment.url); without selecting the exact field you need. This selects every .custom_media_url field on the page, e.g. each field within each widget. Since you are using jQuery, you can replace this line: $(‘.custom_media_url’).val(attachment.url); with $( e.target ).siblings( ‘.custom_media_url’ ).val( attachment.url ) However, using wp.media.editor is not the … Read more

update_user_meta inside a popup/modal

From what I can tell, it sounds like you need to be using AJAX to update that user meta. Also you might need to retrieve the “content” with AJAX as well, so as to get the updated information if the popup modal is called again. There is a lot of documentation on AJAX in wordpress, … Read more