/** * Metabox output for managing page sidebars * * @since 1.3.0 * @access private */ function jc_page_mb_sidebar_settings() { wp_nonce_field(basename(__FILE__), 'jc-save-page-sidebars'); $sidebars = get_post_meta(get_the_ID(), 'jc_page_sidebars', true); // Post default sidebar setting if (get_current_screen()->id == 'post' && !$sidebars && ($default_single_sidebars = get_option('_rbm_jc_news_default_sidebars'))) { $sidebars = get_option('_rbm_jc_news_default_sidebars'); } // Default if still not set if (!$sidebars) { /** * Allows changing the default sidebar setting. * * @since 1.3.0 */ $sidebars = apply_filters('jc_admin_sidebars_settings_default', 'left'); } jc_admin_sidebars_settings_field('jc_page_sidebars', $sidebars); }
?> <table class="form-table"> <tr valign="top"> <th scope="row"> News Pages Banner </th> <td> <?php rbm_do_field_image('jc_news_banner_image', false, get_option('_rbm_jc_news_banner_image'), array('preview_size' => 'page-header')); ?> </td> </tr> <tr valign="top"> <th scope="row"> News Default Sidebars </th> <td> <?php jc_admin_sidebars_settings_field('_rbm_jc_news_default_sidebars', get_option('_rbm_jc_news_default_sidebars')); ?> </td> </tr> </table> <?php submit_button(); ?> </form> </div>