Can i add custom meta box (Media Uploader) at Category Description
This can be achieved using the plugin Advanced Custom Fields. Config Result
This can be achieved using the plugin Advanced Custom Fields. Config Result
White screen is a PHP error. Check your server’s error_log and see if there’s anything helpful, but you may not have permissions on PHP set up correctly to upload. (Also you should try doing this on 3.2.1 and not a two-major-release back version)
Here’s a function you can put in your theme’s functions.php file to force your own default avatar. Update the $myavatar line to point to your image path/name: // Adds a new default avatar to the list in WordPress admin add_filter( ‘avatar_defaults’, ‘mytheme_addgravatar’ ); function mytheme_addgravatar( $avatar_defaults ) { $myavatar = get_bloginfo(‘stylesheet_directory’) . ‘/images/my-avatar.gif’; $avatar_defaults[$myavatar] = … Read more
Check closely on your line: With the $path = $upload[‘file’] call I get that $path contains “C:\xampp\htdocs\wordpress/wp-content/uploads/2011/12/ReSharper-6.1-License18.txt” ‘\’ changes to “https://wordpress.stackexchange.com/” just after the ‘wordpress’ i.e. \wordpress/, hence invalidating your path. But when you use a hard coded path (which is not invalid), you get the answer. Try fixing your path first.
Iterate over all posts, find the attached images … $images =& get_children( array ( ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’ ); … and for each image use wp_update_post() to set the date from the parent post.
WordPress does not allow uploads of .xml files but you can add it by adding a mime type for it. This worked for me: function addUploadXML($mimes) { $mimes = array_merge($mimes, array(‘xml’ => ‘text/xml’));. return $mimes; } add_filter(‘upload_mimes’, ‘addUploadXML’); Also, when I researched the mime type, I came up with a number of different suggestions for … Read more
You can do an untrailingslashit() also.
Not sure if I’ve understand this correctly but you should be able to check which tab is currently open by looking at $_GET[‘tab’] upload new tab = type from url = type_url gallery = gallery media library = library So you could wrap your code inside if ( $_GET[‘tab’] != ‘type’ ) // do stuff
Check the [Get The Image][1] plugin by Justin Tadlock, it offer many options and fallbacks for getting images.
I recommend this plugin all of the time even though I have no association whatsoever with the plugin or the author of it. It’s free and allows you to add custom upload fields and all kinds of goodies to your edit screens without touching code. It’s called Advanced Custom Fields. Some developers would frown upon … Read more