Retrieve postID in a image_send_to_editor hook function
-
Hi all!
please, maybe anyone knows how to retrieve de postID in a “image_send_to_editor” hook function???
:::sample code:::
add_filter(‘image_send_to_editor’, array($this,’w3f_crop_upload’));
function w3f_crop_upload($metadata) {
//global $wp_query;
//$thePostID = $wp_query->post->ID; ??? I don’t kwow why, but this doesn’t work ???// need the POST_ID!!
$thumb1 = get_post_meta($this->postid, ‘w3f-Img1’);
return $metadata;
}Thank you for the help!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Retrieve postID in a image_send_to_editor hook function’ is closed to new replies.