Making the Add Media Link URL into a checkbox

You can just replace the html with a checkbox, ensuring the name of the checkbox is the name of the <input> we’re replacing. You can also change the ‘label’ and the ‘help’ text, (see here for there the filter is fired) – just simply uncomment the appropritate lines and replace the text with your own. … Read more

get total number of images from media using xml-rpc

VERSION 1 will query all the images and give you a count by checking the size of the returned array. VERSION 2 is a much faster method introduced by birgire. // VERSION 1 $images = get_posts(array( ‘post_type’ => ‘attachment’, ‘post_status’ => ‘any’, ‘numberposts’ => -1, ‘fields’ => ‘ids’, ‘post_mime_type’ => ‘image/jpeg,image/gif,image/jpg,image/png’, )); echo count($images) . … Read more

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