Hide download button from audio player

Hi another simple way is to add the following code to hide the download button. Please adapt width and margin top elements. .wp-block-audio:after { width:35px; background-color:#F1F3F4; color:#F1F3F4; content:’.’; float:right; border-radius:50%; margin-top:-95px; z-index:999; position:relative; }

How to create different media uploader frames / filter library depending on a custom action

You will have to create two different media modals that are fired depending on your click event. Here is some code from a recent project where I added these buttons to the tinyMCE visual editor: jQuery(document).ready(function($){ $(document).on(‘click’, ‘.mce-my_upload_button’, upload_image_tinymce); $(document).on(‘click’, ‘.mce-my_upload_pdf_button’, upload_pdf_tinymce); function upload_image_tinymce(e) { e.preventDefault(); var $input_field = $(‘.mce-my_input_image’); var custom_uploader = wp.media.frames.file_frame = … Read more

wordpress doesnt add media.css file

/css/media.min.css?ver=4.8.1 is not indicative of a “min version”. The filename of this CSS file is LITERALLY: ‘media.min.css’. (Additionally the file is versioned with the ver parameter set to 4.8.1). So atetmpting to enqueue: wp_enqueue_style(‘media’, get_template_directory_uri().’/css/media.css’); Will certainly fail, and should in fact be: wp_enqueue_style(‘media’, get_template_directory_uri().’/css/media.min.css’);

Get the Playlist embedded in Post/Page content

The get_media_embedded_in_content() uses a regex to match the input tags, but the HTML for playlists is not made from a single tag, instead it’s constructed with tags like <div>, <script>, <noscript>, <ol>, <li>. Recently I posted an answer to get post playlist like get_post_gallery() that you can check out, to see if it helps. It … Read more

Disable wordpress gif compression?

There are two main concerns with using animated gifs in WordPress: dimensions and file size. When you upload a gif file to the media library, WordPress stores the original file and additional files for different sizes ( medium, thumbnail ). Gifs of other sizes will be stored with one frame of animation only, so they … Read more