diff --git a/e2e-tests/specs/customizer/layout/single-post-settings.spec.ts b/e2e-tests/specs/customizer/layout/single-post-settings.spec.ts index c54f39ab82..ad616214de 100644 --- a/e2e-tests/specs/customizer/layout/single-post-settings.spec.ts +++ b/e2e-tests/specs/customizer/layout/single-post-settings.spec.ts @@ -89,6 +89,7 @@ test.describe('Single Post Check', function () { baseURL, }); const HIDDEN = [ + '.entry-header', '.nv-thumb-wrap', '.entry-content', '.nv-tags-list', diff --git a/inc/customizer/defaults/single_post.php b/inc/customizer/defaults/single_post.php index 89b0d0a8e6..202bd1d04b 100644 --- a/inc/customizer/defaults/single_post.php +++ b/inc/customizer/defaults/single_post.php @@ -128,10 +128,7 @@ public function get_cpt_context( $allowed = [ 'post', 'page' ] ) { */ $allowed_context = apply_filters( 'neve_allowed_custom_post_types', $allowed, 10, 1 ); $context = get_post_type(); - if ( ! has_filter( 'neve_context_filter' ) && ! in_array( get_post_type(), $allowed_context, true ) ) { - $context = 'post'; - } - $context = apply_filters( 'neve_context_filter', $context, 10, 1 ); + $context = apply_filters( 'neve_context_filter', $context, 10, 1 ); return [ $context, $allowed_context ]; } diff --git a/inc/customizer/options/layout_single_page.php b/inc/customizer/options/layout_single_page.php index 57f0868e6f..3dd94c1d8d 100644 --- a/inc/customizer/options/layout_single_page.php +++ b/inc/customizer/options/layout_single_page.php @@ -61,6 +61,6 @@ public function add_controls() { * @return bool */ public static function is_cover_layout() { - return class_exists( '\Neve_Pro\Admin\Custom_Layouts_Cpt' ) && get_theme_mod( 'neve_page_header_layout' ) === 'cover'; + return get_theme_mod( 'neve_page_header_layout' ) === 'cover'; } } diff --git a/inc/customizer/options/layout_single_post.php b/inc/customizer/options/layout_single_post.php index 1cb3f6791e..5f78414944 100644 --- a/inc/customizer/options/layout_single_post.php +++ b/inc/customizer/options/layout_single_post.php @@ -658,7 +658,7 @@ public function sanitize_post_elements_ordering( $value ) { * @return bool */ public static function is_cover_layout() { - return class_exists( '\Neve_Pro\Admin\Custom_Layouts_Cpt' ) && get_theme_mod( 'neve_post_header_layout' ) === 'cover'; + return get_theme_mod( 'neve_post_header_layout' ) === 'cover'; } /** diff --git a/inc/views/cover_header.php b/inc/views/cover_header.php index 451fb907b3..75be4dcdab 100644 --- a/inc/views/cover_header.php +++ b/inc/views/cover_header.php @@ -33,10 +33,6 @@ public function render_cover_header() { return; } - if ( ! class_exists( '\Neve_Pro\Admin\Custom_Layouts_Cpt' ) && get_post_type() !== $context ) { - return; - } - $header_layout = get_theme_mod( 'neve_' . $context . '_header_layout', 'normal' ); if ( $header_layout !== 'cover' ) { return; diff --git a/inc/views/post_layout.php b/inc/views/post_layout.php index 095e9a264b..513b31a494 100644 --- a/inc/views/post_layout.php +++ b/inc/views/post_layout.php @@ -232,11 +232,6 @@ private function get_content_order() { } } - list( $context ) = $this->get_cpt_context(); - if ( ! Layout_Single_Post::is_cover_layout() && get_post_type() !== $context ) { - $content_order = array_unique( array_merge( array( 'title-meta' ), $content_order ) ); - } - return apply_filters( 'neve_layout_single_post_elements_order', $content_order ); } }