Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bigdigital/a7523a1365877d064967ff24cef8afa2 to your computer and use it in GitHub Desktop.
Save bigdigital/a7523a1365877d064967ff24cef8afa2 to your computer and use it in GitHub Desktop.
change default portfolio metaboxed in The7
function dt_change_default_metabox() {
global $DT_META_BOXES;
if ( $DT_META_BOXES ) {
foreach ( $DT_META_BOXES as $key => $DT_META_BOX ) {
if (key_exists('id',$DT_META_BOX ) && ($DT_META_BOX['id'] === 'dt_page_box-portfolio_post_media_options') )
{
$DT_META_BOXES[ $key ]['fields']['0']['std'] = 'before';
$DT_META_BOXES[ $key ]['fields']['2']['std'] = 'gallery';
}
}
}
}
add_action( 'admin_init', 'dt_change_default_metabox', 30);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment