ID );
$g_external_image = isset( $values['g_external_image'] ) ? esc_attr( $values['g_external_image'][0] ) : "";
wp_nonce_field( 'my_meta_box_nonce', 'meta_box_nonce' );
?>
";
} else if ( function_exists('get_the_image') ) {
get_the_image(array( 'custom_key' => array( 'Thumbnail', 'thumbnail' ), 'default_image' => get_template_directory_uri().'/images/thumb.jpg' ));
} else {
echo "";
}
}
/*FUNCTION TO HIDE /SHOW IMAGE*/
function image_filter($content){
$IS_IMAGE_SHOW=$_COOKIE['is_image_show'];
$post=$content;
if($IS_IMAGE_SHOW=='no'){
preg_match_all('/]+>/i',$post, $result);
$images=$result[0];
foreach($images as $image){
$array = array();
preg_match( "/src='([^']*)'/i", $image,$array) ;
$img="";
if(empty($array)){
preg_match( '/src="([^"]*)"/i', $image, $array ) ;
$src=$array[1];
$img=str_replace('src="','src="" gob_src="',$image);
}else{
$src=$array[1];
$img=str_replace("src='","src='' gob_src='",$image);
}
$post=str_replace($image,$img,$post);
}
}
return $post;
}
//add_filter('the_content', 'image_filter');
//add_filter('the_excerpt', 'image_filter');
?>