Only current gallery images with get_attached_media

Found an answer using Shortcode which helped: How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()? My working code now looks like this: // Extract the shortcode arguments from the $page or $post $shortcode_args = shortcode_parse_atts(get_match(‘/\[gallery\s(.*)\]/isU’, $post->post_content)); // get the ids specified in the shortcode call $ids = … Read more

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

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