Tag Info

Hot answers tagged


PHP has a function for this purpose: exif_read_data I used this image for testing. Try this code for your purpose: add_action( 'add_attachment', 'create_post_from_image' ); function create_post_from_image( $id ) { if ( wp_attachment_is_image( $id ) ) { $image = get_post( $id ); // Get image height/width for auto inserting the image ...


Instead of removing the shortcode, re-register it with a function that returns an empty string (or something that casts to an empty string). You can use the built in __return_empty_string. This will replace whatever the original callback was with something that just replaces the shortcode with nothing. // sometime after the first call to add_shortcode ...

Only top voted, non community-wiki answers of a minimum length are eligible