.epub file blocked despite ALLOW_UNFILTERED_UPLOADS set to true

You probably need to allow the mime types for them to be allowed to upload. https://www.robertwent.com/blog/adding-custom-mime-types-for-wordpress-uploads/ //The following goes in a themes functions file or a custom hooks plugin function so_387865_custom_upload_mimes ( $existing_mimes ) { $existing_mimes[‘epub’] = ‘application/epub+zip’; $existing_mimes[‘mobi’] = ‘application/x-mobipocket-ebook’; return $existing_mimes; } add_filter(‘upload_mimes’, ‘so_387865_custom_upload_mimes’);

Accessing a random image via ajax

There is an error in your src; <img src=”http://example.com//wp-admin/admin-ajax.php?action=random_banner”> Try this one: <img src=”http://example.com/wp-admin/admin-ajax.php?action=random_banner”> or <img src=”https://wordpress.stackexchange.com/questions/215158/<?php echo admin_url(“admin-ajax.php?action=random_banner’ ); ?>”> You can also use a query to get a random image. AJAX add_action( ‘wp_ajax_random_banner’, ‘random_banner’ ); add_action( ‘wp_ajax_nopriv_random_banner’, ‘random_banner’ ); function random_banner() { // search for 1 random image $image_ids = get_posts( array( ‘post_type’ … Read more

File exceeds upload_max_filesize, despite max filesize being large enough

Apparently there’s an upload_size_limit filter in WordPress. To check what your site’s upload limit is set to, add this to your theme’s functions.php: add_action( ‘shutdown’, ‘wpse115322_upload_sizes’, 99 ); function wpse115322_upload_sizes() { $size = wp_max_upload_size(); $kb = $size/1024; $mb = $size/(1024*1024); echo( “$kb KB / $mb MB<br />\n” ); } That’ll print your site’s actual max … Read more

How to change the image size in new Media Uploader (ie use medium vs thumbnail)

Supposing that I’m interpreting your Question correctly… The thumbnails displayed in the new Media Uploader are already the medium sized ones, being constrained on the fly. So, it’s a matter of applying some CSS styling to increase their size. Maybe other style adjustments are necessary, this is just a proof of concept. add_action( ‘admin_head-post-new.php’, ‘style_thumbnails_wpse_81677’ … Read more

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