array( 'value' => 'default-sidebar', 'thumbnail' => get_template_directory_uri() . '/paragonthemes/metabox/images/default-sidebar.png' ), 'left-sidebar' => array( 'value' => 'left-sidebar', 'thumbnail' => get_template_directory_uri() . '/paragonthemes/metabox/images/left-sidebar.png' ), 'right-sidebar' => array( 'value' => 'right-sidebar', 'thumbnail' => get_template_directory_uri() . '/paragonthemes/metabox/images/right-sidebar.png' ), 'no-sidebar' => array( 'value' => 'no-sidebar', 'thumbnail' => get_template_directory_uri() . '/paragonthemes/metabox/images/no-sidebar.png' ) ); return apply_filters('nexas_sidebar_layout_options', $nexas_sidebar_layout_options); } endif; /** * Custom Metabox * * @since Nexas 1.0.0 * * @param null * @return void * */ if (!function_exists('nexas__add_metabox')): function nexas_add_metabox() { add_meta_box( 'nexas_sidebar_layout', // $id esc_html__('Sidebar Layout', 'nexas'), // $title 'nexas_sidebar_layout_callback', // $callback 'post', // $page 'normal', // $context 'low' ); // $priority add_meta_box( 'nexas_sidebar_layout', // $id __('Sidebar Layout', 'nexas'), // $title 'nexas_sidebar_layout_callback', // $callback 'page', // $page 'normal', // $context 'low' ); // $priority } endif; add_action('add_meta_boxes', 'nexas_add_metabox'); /** * Callback function for metabox * * @since Nexas 1.0.0 * * @param null * @return void * */ if (!function_exists('nexas_sidebar_layout_callback')) : function nexas_sidebar_layout_callback() { global $post; $nexas_sidebar_layout_options = nexas_sidebar_layout_options(); $nexas_sidebar_layout = 'default-sidebar'; $nexas_sidebar_meta_layout = get_post_meta( $post->ID, 'nexas_sidebar_layout', true); if ( !empty( $nexas_sidebar_meta_layout ) ) { $nexas_sidebar_layout = $nexas_sidebar_meta_layout; } wp_nonce_field(basename(__FILE__), 'nexas_sidebar_layout_nonce'); ?>

/>