ID == $frontpage_id ){ return; } global $thebusiness_post_types; foreach ( $thebusiness_post_types as $post_type ) { add_meta_box( 'thebusiness_layout_options', // $id __( 'Layout options', 'thebusiness' ), // $title 'thebusiness_layout_options_callback', // $callback $post_type, // $page 'normal', // $context 'high'// $priority ); } } /* thebusiness sidebar layout */ $thebusiness_default_layout_options = array( 'left-sidebar' => array( 'value' => 'left-sidebar', 'thumbnail' => get_template_directory_uri() . '/inc/images/left-sidebar.png' ), 'right-sidebar' => array( 'value' => 'right-sidebar', 'thumbnail' => get_template_directory_uri() . '/inc/images/right-sidebar.png' ), 'no-sidebar' => array( 'value' => 'no-sidebar', 'thumbnail' => get_template_directory_uri() . '/inc/images/no-sidebar.png' ) ); /* thebusiness featured layout */ $thebusiness_single_post_image_align_options = array( 'full' => array( 'value' => 'full', 'label' => __( 'Full', 'thebusiness' ) ), 'right' => array( 'value' => 'right', 'label' => __( 'Right ', 'thebusiness' ), ), 'left' => array( 'value' => 'left', 'label' => __( 'Left', 'thebusiness' ), ), 'no-image' => array( 'value' => 'no-image', 'label' => __( 'No Image', 'thebusiness' ) ) ); function thebusiness_layout_options_callback() { global $post , $thebusiness_default_layout_options, $thebusiness_single_post_image_align_options; $thebusiness_customizer_saved_values = thebusiness_get_all_options(1); /*thebusiness-single-post-image-align*/ $thebusiness_single_post_image_align = $thebusiness_customizer_saved_values['thebusiness-single-post-image-align']; /*thebusiness default layout*/ $thebusiness_single_sidebar_layout = $thebusiness_customizer_saved_values['thebusiness-default-layout']; wp_nonce_field( basename( __FILE__ ), 'thebusiness_layout_options_nonce' ); ?>
ID, 'thebusiness-default-layout', true ); if( false != $thebusiness_single_sidebar_layout_meta ){ $thebusiness_single_sidebar_layout = $thebusiness_single_sidebar_layout_meta; } foreach ($thebusiness_default_layout_options as $field) { ?>
/>
ID, 'thebusiness-single-post-image-align', true ); if( false != $thebusiness_single_post_image_align_meta ){ $thebusiness_single_post_image_align = $thebusiness_single_post_image_align_meta; } foreach ($thebusiness_single_post_image_align_options as $field) { ?> />