2.5 Image Post ID using Thickbox
-
Hi, I just upgraded to the new version of wordpress 2.5 from 2.3 and it now seems I have a problem calling the $post->id variable.
In particular it is in the media.php file in the wp-admin folder around line 100 where the function get_image_tag creates the “image html” and since I use thickbox, I like to update this so the class is thickbox and the rel tag can then be used to group them together by using the post id. Well, for the life of me I can’t get the post id variable to show anything. I’ve tried calling global $post first, I have done echo $post->ID and just $post and nothing seems to work, here is the code for the line in question, everything else works btw.
$html = '<img src="'.attribute_escape($img_src).'" alt="'.attribute_escape($title).'" title="'.attribute_escape($title).'" '.$hwstring.'class="thickbox" rel="'.$post->ID.'" />';Any help would be GREATLY appreciated! Thanks in advance…
The topic ‘2.5 Image Post ID using Thickbox’ is closed to new replies.