array(
'id' => 'basic_page_layout',
'value' => 'default',
'label' => __( 'Default', 'basic' )
),
'rightbar' => array(
'id' => 'basic_page_layout',
'value' => 'rightbar',
'label' => __( 'Rightbar', 'basic' )
),
'leftbar' => array(
'id' => 'basic_page_layout',
'value' => 'leftbar',
'label' => __( 'Leftbar', 'basic' )
),
'full' => array(
'id' => 'basic_page_layout',
'value' => 'full',
'label' => __( 'Fullwidth Content', 'basic' )
),
'center' => array(
'id' => 'basic_page_layout',
'value' => 'center',
'label' => __( 'Centered Content', 'basic' )
)
);
return $page_layout;
}
/* ======================================================================== */
/* ========================================================================
*
* Displays metabox to for select layout option
*
* ======================================================================== */
function basic_page_layout() {
global $post;
$page_layout = basic_get_default_page_layouts();
// Use nonce for verification
wp_nonce_field( basename( __FILE__ ), 'custom_meta_box_nonce' );
foreach ( $page_layout as $field ) {
$layout_meta = get_post_meta( $post->ID, $field['id'], true );
if ( empty( $layout_meta ) ) {
$layout_meta = 'default';
}
?>