Change behavior of the “ADD Media” buttom

Js file (function() { tinymce.PluginManager.add( ‘custom_class’, function( editor, url ) { // Add Button to Visual Editor Toolbar editor.addButton(‘custom_class’, { title: ‘Insert PDF Tag’, cmd: ‘custom_class’, image: url + ‘/icon.png’, }); // Add Command when Button Clicked editor.addCommand(‘custom_class’, function() { var text = editor.selection.getNode(); if ( text.length === 0 ) { alert( ‘Please select some … Read more

Media and all images disappeared from my wordpress site

Go into your document root, then locate your media folder (default wp-include/media) and raw files (jpgs etc) should be there. If not, check your trash bin, if not, your hosting provider is your last resort. Edit: after this, download all your files as backup into your local machine, including media and settings etc and reinstall … Read more

MP4 file links download instead of playing

I suggest you to make updates on your web-server instead of WordPress. You can set mime type for mp4 files to application/octet-stream. Using .htaccess (Apache): AddType application/octet-stream .mp4 For nginx check documentation If you need to change mp4 mime type on upload, you can use this hook: add_filter(‘upload_mimes’, ‘wpse_320375_remove_mime_types’); function wpse_320375_remove_mime_types($mimes){ $mimes[‘mp4’] = ‘application/octet-stream’; }