ID, 'cosmoswp_site_layout', true); $default_layout = array( "default-layout" => esc_html__('Default layout', 'cosmoswp'), ); $cosmoswp_site_layout_options = cosmoswp_site_main_general_layout_option(); $cosmoswp_site_layout_options = array_merge($default_layout, $cosmoswp_site_layout_options); $cosmoswp_site_layout = 'default-layout'; if( !cosmoswp_is_null_or_empty($cosmoswp_site_layout_value) ){ $cosmoswp_site_layout = $cosmoswp_site_layout_value; } //true ensures you get just one value instead of an array wp_nonce_field( basename( __FILE__ ), 'cosmoswp_meta_nonce' ); //sidebar $sidebar_layout = get_post_meta($post->ID, 'cosmoswp_sidebar_options', true); $cosmoswp_sidebar_options_options = cosmoswp_sidebar_options(); $cosmoswp_sidebar_options = 'default'; if( !cosmoswp_is_null_or_empty($sidebar_layout) ){ $cosmoswp_sidebar_options = $sidebar_layout; } //header layout $header_layout = get_post_meta($post->ID, 'cosmoswp_header_layout', true); $header_default_layout = array( "default-header" => esc_html__('Default layout', 'cosmoswp'), ); $cosmoswp_header_layout_options = cosmoswp_site_general_layout_option(true); $cosmoswp_header_layout_options = array_merge($header_default_layout, $cosmoswp_header_layout_options); $cosmoswp_header_layout = 'default-header'; if( !cosmoswp_is_null_or_empty($header_layout) ){ $cosmoswp_header_layout = $header_layout; } //Footer layout $footer_layout = get_post_meta($post->ID, 'cosmoswp_footer_layout', true); $footer_default_layout = array( "default-footer" => esc_html__('Default layout', 'cosmoswp'), ); $cosmoswp_footer_layout_options = cosmoswp_site_footer_layout_option(true); $cosmoswp_footer_layout_options = array_merge($footer_default_layout, $cosmoswp_footer_layout_options); $cosmoswp_footer_layout = 'default-footer'; if( !cosmoswp_is_null_or_empty($footer_layout) ){ $cosmoswp_footer_layout = $footer_layout; } ?>
run(); }