Skip to content

Commit

Permalink
excluding CMB2s from post-new
Browse files Browse the repository at this point in the history
  • Loading branch information
mae829 committed Aug 9, 2017
1 parent 320cd06 commit 64f01ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion includes/show-on-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,12 @@ function metabox_exclude_on_slug( $display, $meta_box ) {
}
}

?>
// for excluding CMB2s from post-new
function cmb2_exclude_from_new( $display, $meta_box ) {
if ( !isset($_GET['post']) ) {
return;
}

return $display;
}
add_filter( 'cmb2_show_on', 'cmb2_exclude_from_new', 10, 2 );

0 comments on commit 64f01ba

Please sign in to comment.