Articles of media modal

Open Media Uploader Link in single post or page

I want to open the media Upload Window like in a single post or page. It is important for me, to have that menu on top, which filters the media Library: This is my current code, which allows only to filter by date: $(‘.tc_upload_img_btn’).live(‘click’, function( event ){ var parent_wrapper = $(this).parent(‘td’).parent().parent().parent().parent(); var field = $(this).parent(‘td’).parent(‘tr’).find(‘input[type=”text”]’); […]

What's the best way to add taxonomy's image in 2017?

Need to build image upload for custom taxonomies. I used Categories Images plugin before, but now I need 2 images and this plugin doesn’t fit anymore. I’m looking for a best solution. Does anybody knows it in 2017?

admin notice on Insert Media popup screen

I want an admin notice box on all media upload pages. I did that for media library page by code add_action( ‘load-upload.php’, array( $this, ‘media_library_message_load’ ) ); public function media_library_message_load(){ add_action( ‘admin_notices’, array( $this, ‘media_library_message_display’ ) ); } public function wpb_media_library_message_display() { echo ‘<div class=”notice update-nag”> <strong>Note: my message </strong> </div>’; } But i want […]

3.8 Media Upload and Custom Meta Box

I’ve been using Tammy Hart’s Reusable Custom MetaBox code for some time now but with the recent 3.8 update the media upload seems to be no longer functioning, and the code is no longer supported. The console is highlighting this area as being Uncaught TypeError: Object #<Object> has no method ‘media’. Which I assume has […]

Keeping CSS model open after form submission

Using a simple CSS modal popup to display a form ( gravity form ) which works as expected but id like to make the user experience better. Currently when the modal button is pressed <label class=”button success tiny” for=”modal-1″>Email this user</label> The modal pop’s up and shows the contact form in the modal box. However […]

Media Manager (since 3.5): How to show an empty Media Library when creating a media frame?

Is there a way to make sure the “Media Library” tab does not show any images until I start uploading some in the “Upload Files” tab? I am creating a wp.media frame with the following code: var myframe = wp.media({ title : ‘Bla Bla’, frame : ‘select’, library: { //query : false, // not working […]

Capability to prevent upload of files

I need the ability to allow users to insert media (images) into a page / post, but not allow them to upload the files. The only capability I can see is ‘upload_files’, which allows a user to upload / insert files. Is there a way to prevent upload of files but still show the media […]

Show error, when selecting image in WordPress media uploader if params mismatch

Good day ! My question is following: I know how to show errors while uploading image from WordPress media uploader by using WordPress filter hook: But how to show same error box when user select an image and hit “select” button. I want to add size check of selected image, before inserting. Any ideas how […]

Passing jQuery into the WordPress media uploader

In a WordPress plugin that I am working on, I am using the built-in WordPress media uploader function ( wp.media ) to add photos. I am using the selection option to pre-select images in the media library once the modal opens. I thought it would be a cool idea to attach a new CSS class […]

Media Modal not updating with file upload

I’m looking for a solution with the media modal. Here is the code that I’m using to create one that allows me to select files: this._frame = wp.media( { className: ‘media-frame rwmb-media-frame’, multiple : true, title : ‘Select Media’, library : { type : this.props.mimeType, exclude: ids }, } ); The problem I’m running into […]