wp_enqueue_media() and upload_mimes problem

I think, first of all you should move following filter outside the function and then check – add_filter( ‘upload_mimes’, array( ‘JBLAB_Utils’, ‘images_upload_mimes’ ) ); Even if it does not work, try changing the priority of the filter.

wp_generate_attachment_metadata for non-images files

wp_generate_metatadata() should create metadata for image, video, and audio file types. There is and if/elseif conditional in the source that limits the function to those three. However, the last line is: return apply_filters( ‘wp_generate_attachment_metadata’, $metadata, $attachment_id ); So you could use the wp_generate_attachment_metadata filter to generate the metadata you want. There are plenty of answers … Read more

limit media upload to once a day

You will need to create a meta field for users identifying that user when he already uploaded something in that day (or in the last 24 hours). After you do that, you will need to create a function to trigger in some upload action, like wp_handle_upload_prefilter or wp_handle_upload to check if user can upload something … Read more

Dynamically determine the width and height of a image file to be cropped & uploaded AFTER form submission given fixed aspect ratio

Here is my resolution: Download and unzip JCrop and unzip jquery.Jcrop.min.js & jquery.Jcrop.css to the js & css sub-directory respectively under the theme template directory. Place the following code in header.php just before </head> (you need to comment out the first line if you’ve already include the jquery.min.js in the other place): <script src=”https://wordpress.stackexchange.com/questions/209358/<?php echo … Read more

How to make picture appear on wordpress site shared link? [closed]

You need to use Open Graph meta markup to have this type of sharing on Facebook .There are so many plugins available in the WordPress repository for this. For example: <meta property=”og:url” content=”http://sharing/url” /> <meta property=”og:type” content=”article” /> <meta property=”og:title” content=”Title of the post” /> <meta property=”og:description” content=”Description or excerpt of the post” /> <meta … Read more

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