Created
February 24, 2017 09:17
-
-
Save ilicfilip/4d0544fe83600296bcf95b4678b90edc to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
add_filter('avada_metabox_tabs', 'avada_child_metabox_tabs', 10, 2); | |
function avada_child_metabox_tabs( $tabs, $post_type ){ | |
$screen = get_current_screen(); | |
if( 'avada_portfolio' == $screen->post_type ) { | |
$tab_key = 'avada_child_portfolio'; | |
$tab_name = esc_html__('Child Portfolio', 'textdomain'); | |
$tabs['requested_tabs'][] = $tab_key; | |
$tabs['tabs_names'][$tab_key] = $tab_name; | |
$tabs['tabs_path'][$tab_key] = get_stylesheet_directory() .'/tabs/tab_'. $tab_key .'.php'; | |
} | |
return $tabs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment