I have the MU Admin Bar plugin, which I have already slightly modified to have a transparent background and have modified my themes to accomidate it.
Right now I am trying to add a new condition to display the edit link. I want it displayed for all posts and pages except the one with ID 23, this is the modified code
# Special case for edit
if (is_single() || is_page()) {
if( $post->post_type == 'page' ) {/* added by drmike to fix page edit */
$file = 'page';
} else {
$file = 'post';
}
if (!$posts[0]->ID == '23') {
$edit_array = array('<strong>'.__('Edit').'</strong>', array('edit_post', $posts[0]->ID), 'post.php?action=edit&post='.$posts[0]->ID, 'edit-link');
}
}
I added the if (!$posts[0]->ID == '23') {
but it seems nothing passes this if statement,the edit link doesn't display on any page or post now. I have echoed $posts[0]->ID and it does hold the correct id.
Any ideas?