ID,'layout',true); $disable_blog99_title = get_post_meta( $post->ID,'disable_blog99_title',true); // We'll use this nonce field later on when saving. wp_nonce_field( 'layout_nonce', 'meta_box_nonce' ); //Image layout $blog99_right_sidebar = trailingslashit ( get_template_directory_uri() ) . 'assets/images/sidebar/right-sidebar.jpg'; $blog99_left_sidebar = trailingslashit ( get_template_directory_uri() ) . 'assets/images/sidebar/left-sidebar.jpg'; $blog99_no_sidebar = trailingslashit ( get_template_directory_uri() ) . 'assets/images/sidebar/full-width.jpg'; $blog99_both_sidebar = trailingslashit ( get_template_directory_uri() ) . 'assets/images/sidebar/both-sidebar.jpg'; ?>


array( // on allow a tags 'href' => array() // and those anchors can only have href attribute ) ); if ( isset( $_POST['layout'] ) ) { $layout = sanitize_text_field( wp_unslash( $_POST['layout'] ) ); // ... } if( $layout ){ update_post_meta( $news_id, 'layout', esc_attr( $layout )); } } } new Blog99_Sidebar_Layout(); /** * aCommerce get layout */ if ( ! function_exists( 'blog99_get_sidebar_layout' ) ) { function blog99_get_sidebar_layout() { global $post; $blog99_layout = get_theme_mod( 'blog99_archiver_sierbar_layout', 'blog99-right-sidebar' ); if($post) { $post_specific_layout = get_post_meta( $post->ID, 'layout', true ); } // Home page if Posts page is assigned if( is_home() && !( is_front_page() ) ) { $queried_id = get_theme_mod( 'blog99_archiver_sierbar_layout', 'blog99-right-sidebar' ); if( !empty($post_specific_layout) && $post_specific_layout != 'default-layout' ) { $blog99_layout = get_post_meta( $post->ID, 'layout', true ); } } elseif( is_page() ) { $blog99_layout = get_theme_mod('blog99_page_sierbar_layout','blog99-right-sidebar'); if( !empty($post_specific_layout) && $post_specific_layout != 'default-layout' ) { $blog99_layout = get_post_meta( $post->ID, 'layout', true ); } } elseif( is_single() ) { $blog99_layout = get_theme_mod('blog99_single_page_sierbar_layout','blog99-right-sidebar'); if( !empty($post_specific_layout) && $post_specific_layout != 'default-layout' ) { $blog99_layout = get_post_meta( $post->ID, 'layout', true ); } } return $blog99_layout; } }