Created
July 11, 2017 14:04
-
-
Save bigdigital/a7523a1365877d064967ff24cef8afa2 to your computer and use it in GitHub Desktop.
change default portfolio metaboxed in The7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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