This refinement can only be done with CSS or JavaScript.
The action is only applied on pages wp-admin/post.php
and wp-admin/post-new.php
.
The global $current_screen
has the Post Type information being displayed.
And the global $post
has the information about the current post where we check the permalink, eg http://site.com/contato
.
add_action( 'admin_footer-post.php', 'metabox_sopt_279492' );
add_action( 'admin_footer-post-new.php', 'metabox_sopt_279492' );
function metabox_sopt_279492() {
global $current_screen, $post;
if ( 'page' != $current_screen->id )
return;
$checkpages = array( 'sobre', 'contato' );
if( in_array( $post->post_name, $checkpages ) )
return;
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('#postimagediv').remove();
});
</script>
<?php
}