diff --git a/assets/scss/elements/blog/_comments.scss b/assets/scss/elements/blog/_comments.scss index 13625a4732..1173e2a078 100644 --- a/assets/scss/elements/blog/_comments.scss +++ b/assets/scss/elements/blog/_comments.scss @@ -99,10 +99,6 @@ float: right; } } - - input[type=submit] { - @extend %nv-button-secondary; - } } .comment-form { diff --git a/assets/scss/elements/blog/_single-new.scss b/assets/scss/elements/blog/_single-new.scss index f16aef2d17..b6ed0540aa 100644 --- a/assets/scss/elements/blog/_single-new.scss +++ b/assets/scss/elements/blog/_single-new.scss @@ -20,6 +20,11 @@ } } +.nv-comments-wrap.is-boxed .nv-comments-list { + padding: 0; +} + + .mobile-top { align-self: flex-start; } diff --git a/globals/sanitize-functions.php b/globals/sanitize-functions.php index a5a300181b..b7a466402b 100644 --- a/globals/sanitize-functions.php +++ b/globals/sanitize-functions.php @@ -289,3 +289,49 @@ function sanitize_meta_ordering( $value ) { return $value; } + +/** + * Sanitize blend mode option. + * + * @param string $input Control input. + * + * @return string + */ +function sanitize_blend_mode( $input ) { + $blend_mode_options = [ 'normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'saturation', 'color', 'difference', 'exclusion', 'hue', 'luminosity' ]; + if ( ! in_array( $input, $blend_mode_options, true ) ) { + return 'normal'; + } + return $input; +} + +/** + * Sanitize the container layout value + * + * @param string $value value from the control. + * + * @return bool + */ +function sanitize_container_layout( $value ) { + $allowed_values = array( 'contained', 'full-width' ); + if ( ! in_array( $value, $allowed_values, true ) ) { + return 'contained'; + } + + return esc_html( $value ); +} + +/** + * Sanitize Button Type option. + * + * @param string $value the control value. + * + * @return string + */ +function sanitize_button_type( $value ) { + if ( ! in_array( $value, [ 'primary', 'secondary' ], true ) ) { + return 'primary'; + } + + return $value; +} diff --git a/inc/admin/metabox/manager.php b/inc/admin/metabox/manager.php index 7729907c1c..7c72d50a2c 100755 --- a/inc/admin/metabox/manager.php +++ b/inc/admin/metabox/manager.php @@ -9,6 +9,7 @@ use Neve\Core\Settings\Config; use Neve\Core\Settings\Mods; +use Neve\Customizer\Defaults\Single_Post; use Neve\Customizer\Options\Layout_Single_Post; use Neve\Views\Post_Layout; @@ -18,6 +19,7 @@ * @package Neve\Admin\Metabox */ final class Manager { + use Single_Post; /** * Control instances. @@ -412,7 +414,7 @@ public function meta_sidebar_script_enqueue() { * @return string */ private function get_post_elements_default_order() { - $default_order = Layout_Single_Post::ordering_default(); + $default_order = $this->post_ordering(); $content_order = get_theme_mod( 'neve_layout_single_post_elements_order', wp_json_encode( $default_order ) ); if ( ! is_string( $content_order ) ) { diff --git a/inc/core/settings/config.php b/inc/core/settings/config.php index 575ef5581a..65413a0933 100644 --- a/inc/core/settings/config.php +++ b/inc/core/settings/config.php @@ -88,8 +88,15 @@ class Config { const MODS_POST_COVER_OVERLAY_OPACITY = 'neve_post_cover_overlay_opacity'; const MODS_POST_COVER_TEXT_COLOR = 'neve_post_cover_text_color'; const MODS_POST_COVER_BLEND_MODE = 'neve_post_cover_blend_mode'; - const MODS_POST_COVER_BOXED_TITLE_PADDING = 'neve_post_cover_boxed_title_padding'; - const MODS_POST_COVER_BOXED_TITLE_BACKGROUND = 'neve_post_cover_boxed_title_background'; + const MODS_POST_COVER_BOXED_TITLE_PADDING = 'neve_post_cover_title_boxed_padding'; + const MODS_POST_COVER_BOXED_TITLE_BACKGROUND = 'neve_post_cover_title_boxed_background'; + + const MODS_POST_COMMENTS_PADDING = 'neve_comments_boxed_padding'; + const MODS_POST_COMMENTS_BACKGROUND_COLOR = 'neve_comments_boxed_background_color'; + const MODS_POST_COMMENTS_TEXT_COLOR = 'neve_comments_boxed_text_color'; + const MODS_POST_COMMENTS_FORM_PADDING = 'neve_comments_form_boxed_padding'; + const MODS_POST_COMMENTS_FORM_BACKGROUND_COLOR = 'neve_comments_form_boxed_background_color'; + const MODS_POST_COMMENTS_FORM_TEXT_COLOR = 'neve_comments_form_boxed_text_color'; const CSS_PROP_BORDER_COLOR = 'border-color'; const CSS_PROP_BACKGROUND_COLOR = 'background-color'; diff --git a/inc/core/styles/frontend.php b/inc/core/styles/frontend.php index 865c3e915c..1358ed5668 100644 --- a/inc/core/styles/frontend.php +++ b/inc/core/styles/frontend.php @@ -9,6 +9,7 @@ use Neve\Core\Settings\Config; use Neve\Core\Settings\Mods; +use Neve\Customizer\Defaults\Single_Post; use Neve\Customizer\Options\Layout_Single_Post; /** @@ -17,6 +18,8 @@ * @package Neve\Core\Styles */ class Frontend extends Generator { + use Single_Post; + /** * Generator constructor. */ @@ -764,8 +767,8 @@ private function setup_form_fields_style() { */ private function setup_single_post_style() { - $cover_padding_default = Layout_Single_Post::cover_padding_default(); - $this->_subscribers['body.single-post .nv-post-cover'] = [ + $cover_padding_default = $this->padding_default( 'cover' ); + $this->_subscribers['.nv-post-cover'] = [ Config::CSS_PROP_MIN_HEIGHT => [ Dynamic_Selector::META_KEY => Config::MODS_POST_COVER_HEIGHT, Dynamic_Selector::META_IS_RESPONSIVE => true, @@ -779,7 +782,7 @@ private function setup_single_post_style() { ], ]; - $this->_subscribers['body.single-post .nv-post-cover .nv-overlay'] = [ + $this->_subscribers['.nv-post-cover .nv-overlay'] = [ Config::CSS_PROP_BACKGROUND_COLOR => [ Dynamic_Selector::META_KEY => Config::MODS_POST_COVER_BACKGROUND_COLOR, Dynamic_Selector::META_DEFAULT => 'var(--nv-dark-bg)', @@ -796,7 +799,7 @@ private function setup_single_post_style() { ]; - $this->_subscribers['body.single-post .nv-post-cover .nv-meta-list li, body.single-post .nv-post-cover .nv-meta-list a'] = [ + $this->_subscribers['.nv-post-cover .nv-meta-list li, .nv-post-cover .nv-meta-list a'] = [ Config::CSS_PROP_COLOR => [ Dynamic_Selector::META_KEY => Config::MODS_POST_COVER_TEXT_COLOR, Dynamic_Selector::META_DEFAULT => 'var(--nv-text-dark-bg)', @@ -808,7 +811,7 @@ private function setup_single_post_style() { Dynamic_Selector::META_KEY => Config::MODS_POST_COVER_BOXED_TITLE_PADDING, Dynamic_Selector::META_IS_RESPONSIVE => true, Dynamic_Selector::META_SUFFIX => 'responsive_unit', - Dynamic_Selector::META_DEFAULT => $cover_padding_default, + Dynamic_Selector::META_DEFAULT => $this->padding_default( 'cover' ), ], Config::CSS_PROP_BACKGROUND_COLOR => [ Dynamic_Selector::META_KEY => Config::MODS_POST_COVER_BOXED_TITLE_BACKGROUND, @@ -816,14 +819,59 @@ private function setup_single_post_style() { ], ]; - $this->_subscribers['body.single-post .nv-post-cover .nv-cover-container'] = [ + $this->_subscribers['.nv-post-cover .nv-cover-container'] = [ Config::CSS_PROP_PADDING => [ Dynamic_Selector::META_KEY => Config::MODS_POST_COVER_PADDING, Dynamic_Selector::META_IS_RESPONSIVE => true, Dynamic_Selector::META_SUFFIX => 'responsive_unit', - Dynamic_Selector::META_DEFAULT => $cover_padding_default, + Dynamic_Selector::META_DEFAULT => $this->padding_default( 'cover' ), + ], + ]; + + $this->_subscribers['.nv-comments-wrap.is-boxed'] = [ + Config::CSS_PROP_PADDING => [ + Dynamic_Selector::META_KEY => Config::MODS_POST_COMMENTS_PADDING, + Dynamic_Selector::META_IS_RESPONSIVE => true, + Dynamic_Selector::META_SUFFIX => 'responsive_unit', + Dynamic_Selector::META_DEFAULT => $this->padding_default(), + ], + Config::CSS_PROP_BACKGROUND_COLOR => [ + Dynamic_Selector::META_KEY => Config::MODS_POST_COMMENTS_BACKGROUND_COLOR, + Dynamic_Selector::META_DEFAULT => 'var(--nv-dark-bg)', + ], + ]; + + $this->_subscribers['.nv-comments-wrap.is-boxed, .nv-comments-wrap.is-boxed a'] = [ + Config::CSS_PROP_COLOR => [ + Dynamic_Selector::META_KEY => Config::MODS_POST_COMMENTS_TEXT_COLOR, + Dynamic_Selector::META_DEFAULT => 'var(--nv-text-dark-bg)', + ], + ]; + + + + + $this->_subscribers['.comment-respond.is-boxed'] = [ + Config::CSS_PROP_PADDING => [ + Dynamic_Selector::META_KEY => Config::MODS_POST_COMMENTS_PADDING, + Dynamic_Selector::META_IS_RESPONSIVE => true, + Dynamic_Selector::META_SUFFIX => 'responsive_unit', + Dynamic_Selector::META_DEFAULT => $this->padding_default(), + ], + Config::CSS_PROP_BACKGROUND_COLOR => [ + Dynamic_Selector::META_KEY => Config::MODS_POST_COMMENTS_BACKGROUND_COLOR, + Dynamic_Selector::META_DEFAULT => 'var(--nv-dark-bg)', + ], + ]; + + $this->_subscribers['.comment-respond.is-boxed, .comment-respond.is-boxed a'] = [ + Config::CSS_PROP_COLOR => [ + Dynamic_Selector::META_KEY => Config::MODS_POST_COMMENTS_TEXT_COLOR, + Dynamic_Selector::META_DEFAULT => 'var(--nv-text-dark-bg)', ], ]; + + } /** @@ -834,7 +882,7 @@ private function setup_single_post_style() { * @return string */ public function add_form_buttons( $selector ) { - return ( $selector . ', form input[type="submit"], form button[type="submit"], #comments input[type="submit"]' ); + return ( $selector . ', form input[type="submit"], form button[type="submit"]' ); } /** @@ -845,6 +893,6 @@ public function add_form_buttons( $selector ) { * @return string */ public function add_form_buttons_hover( $selector ) { - return ( $selector . ', form input[type="submit"]:hover, form button[type="submit"]:hover, #comments input[type="submit"]:hover' ); + return ( $selector . ', form input[type="submit"]:hover, form button[type="submit"]:hover' ); } } diff --git a/inc/customizer/defaults/Single_Post.php b/inc/customizer/defaults/Single_Post.php new file mode 100644 index 0000000000..986a1d0baf --- /dev/null +++ b/inc/customizer/defaults/Single_Post.php @@ -0,0 +1,108 @@ + [ + 'top' => $m_t, + 'right' => $m_r, + 'bottom' => $m_b, + 'left' => $m_l, + ], + 'tablet' => [ + 'top' => $t_t, + 'right' => $t_r, + 'bottom' => $t_b, + 'left' => $t_l, + ], + 'desktop' => [ + 'top' => $d_t, + 'right' => $d_r, + 'bottom' => $d_b, + 'left' => $d_l, + ], + 'mobile-unit' => 'px', + 'tablet-unit' => 'px', + 'desktop-unit' => 'px', + ]; + } + + /** + * Get the default value for title alignment. + * + * @return array + */ + public static function post_title_alignment() { + $default_position = is_rtl() ? 'right' : 'left'; + return [ + 'mobile' => $default_position, + 'tablet' => $default_position, + 'desktop' => $default_position, + ]; + } + + /** + * Get the default value for title vertical position. + * + * @return array + */ + public function post_title_position() { + return [ + 'mobile' => 'bottom', + 'tablet' => 'bottom', + 'desktop' => 'bottom', + ]; + } + + /** + * Get default values for ordering control + * + * @return array + */ + public function post_ordering() { + $default_components = [ + 'title-meta', + 'thumbnail', + 'content', + 'tags', + 'comments', + ]; + + if ( get_theme_mod( 'neve_post_header_layout' ) === 'cover' ) { + $default_components = [ + 'content', + 'tags', + 'comments', + ]; + } + + return apply_filters( 'neve_single_post_elements_default_order', $default_components ); + } +} diff --git a/inc/customizer/options/form_fields.php b/inc/customizer/options/form_fields.php index bbf110826f..a0c00e7fc8 100644 --- a/inc/customizer/options/form_fields.php +++ b/inc/customizer/options/form_fields.php @@ -584,7 +584,7 @@ private function add_button_controls() { new Control( 'neve_form_button_type', [ - 'sanitize_callback' => [ $this, 'sanitize_button_type' ], + 'sanitize_callback' => 'sanitize_button_type', 'default' => 'primary', ], [ @@ -606,19 +606,4 @@ private function add_button_controls() { ) ); } - - /** - * Sanitize Button Type option. - * - * @param string $value the control value. - * - * @return string - */ - public function sanitize_button_type( $value ) { - if ( ! in_array( $value, [ 'primary', 'secondary' ], true ) ) { - return 'primary'; - } - - return $value; - } } diff --git a/inc/customizer/options/layout_container.php b/inc/customizer/options/layout_container.php index 20882a06c0..1c64246ce1 100644 --- a/inc/customizer/options/layout_container.php +++ b/inc/customizer/options/layout_container.php @@ -120,7 +120,7 @@ private function control_container_style() { new Control( $control_id, array( - 'sanitize_callback' => array( $this, 'sanitize_container_layout' ), + 'sanitize_callback' => 'sanitize_container_layout', 'transport' => $this->selective_refresh, 'default' => 'contained', ), @@ -138,20 +138,4 @@ private function control_container_style() { ); } } - - /** - * Sanitize the container layout value - * - * @param string $value value from the control. - * - * @return bool - */ - public function sanitize_container_layout( $value ) { - $allowed_values = array( 'contained', 'full-width' ); - if ( ! in_array( $value, $allowed_values, true ) ) { - return 'contained'; - } - - return esc_html( $value ); - } } diff --git a/inc/customizer/options/layout_single_post.php b/inc/customizer/options/layout_single_post.php index 6cebc33d3f..a4551e6b8c 100644 --- a/inc/customizer/options/layout_single_post.php +++ b/inc/customizer/options/layout_single_post.php @@ -12,9 +12,9 @@ use HFG\Traits\Core; use Neve\Customizer\Base_Customizer; +use Neve\Customizer\Defaults\Single_Post; use Neve\Customizer\Types\Control; use Neve\Customizer\Types\Section; -use function Clue\StreamFilter\fun; /** * Class Layout_Single_Post @@ -23,6 +23,7 @@ */ class Layout_Single_Post extends Base_Customizer { use Core; + use Single_Post; /** * Customizer section id. @@ -66,42 +67,47 @@ private function section_single_post() { */ private function add_subsections() { $headings = [ - 'header_layout' => [ + 'header_layout' => [ 'title' => esc_html__( 'Header Layout', 'neve' ), 'priority' => 5, - 'controls_to_wrap' => 16, + 'controls_to_wrap' => 15, ], - 'page_elements' => [ + 'page_elements' => [ 'title' => esc_html__( 'Page Elements', 'neve' ), 'priority' => 85, 'controls_to_wrap' => 1, 'expanded' => false, ], - 'meta' => [ + 'meta' => [ 'title' => esc_html__( 'Post Meta', 'neve' ), 'priority' => 95, 'controls_to_wrap' => 5, 'expanded' => false, ], - 'comments' => [ + 'comments' => [ 'title' => esc_html__( 'Comments', 'neve' ), 'priority' => 125, - 'controls_to_wrap' => 11, + 'controls_to_wrap' => 14, 'expanded' => false, ], 'comments_section' => [ - 'title' => esc_html__( 'Comments Section', 'neve' ), - 'priority' => 135, - 'controls_to_wrap' => 4, - 'expanded' => true, - 'accordion' => false, - ] + 'title' => esc_html__( 'Comments Section', 'neve' ), + 'priority' => 135, + 'expanded' => true, + 'accordion' => false, + ], + 'comments_form' => [ + 'title' => esc_html__( 'Submit Form Section', 'neve' ), + 'priority' => 165, + 'expanded' => true, + 'accordion' => false, + ], ]; foreach ( $headings as $heading_id => $heading_data ) { $this->add_control( new Control( - 'neve_post_' . $heading_id . '_headeing', + 'neve_post_' . $heading_id . '_heading', [ 'sanitize_callback' => 'sanitize_text_field', ], @@ -112,7 +118,7 @@ private function add_subsections() { 'class' => $heading_id . '-accordion', 'expanded' => array_key_exists( 'expanded', $heading_data ) ? $heading_data['expanded'] : true, 'accordion' => array_key_exists( 'accordion', $heading_data ) ? $heading_data['accordion'] : true, - 'controls_to_wrap' => $heading_data['controls_to_wrap'], + 'controls_to_wrap' => array_key_exists( 'controls_to_wrap', $heading_data ) ? $heading_data['controls_to_wrap'] : 0, ], 'Neve\Customizer\Controls\Heading' ) @@ -185,7 +191,7 @@ private function header_layout() { 'desktop' => 'px', 'tablet' => 'px', ], - 'template' => 'body.single-post .nv-post-cover{ + 'template' => '.nv-post-cover{ min-height: {{value}}; }', ], @@ -201,7 +207,7 @@ private function header_layout() { [ 'sanitize_callback' => [ $this, 'sanitize_spacing_array' ], 'transport' => $this->selective_refresh, - 'default' => self::cover_padding_default(), + 'default' => $this->padding_default( 'cover' ), ], [ 'label' => esc_html__( 'Cover padding', 'neve' ), @@ -216,7 +222,7 @@ private function header_layout() { 'responsive' => true, 'directional' => true, 'template' => - 'body.single-post .nv-post-cover .nv-cover-container { + '.nv-post-cover .nv-cover-container { padding-top: {{value.top}}; padding-right: {{value.right}}; padding-bottom: {{value.bottom}}; @@ -235,7 +241,7 @@ private function header_layout() { [ 'sanitize_callback' => 'sanitize_alignment', 'transport' => $this->selective_refresh, - 'default' => self::post_title_alignment_default(), + 'default' => $this->post_title_alignment(), ], [ 'label' => esc_html__( 'Title Alignment', 'neve' ), @@ -256,7 +262,7 @@ private function header_layout() { ], ], 'show_labels' => true, - 'live_refresh_selector' => 'body.single-post .nv-post-cover .nv-cover-container, .entry-header .entry-title', + 'live_refresh_selector' => '.nv-post-cover .nv-cover-container, .entry-header .entry-title', 'live_refresh_css_prop' => [ 'remove_classes' => [ 'mobile-left', @@ -281,7 +287,7 @@ private function header_layout() { [ 'sanitize_callback' => 'sanitize_position', 'transport' => $this->selective_refresh, - 'default' => self::post_title_position_default(), + 'default' => $this->post_title_position(), ], [ 'label' => esc_html__( 'Title Position', 'neve' ), @@ -301,7 +307,7 @@ private function header_layout() { 'icon' => 'arrow-down', ], ], - 'live_refresh_selector' => 'body.single-post .nv-post-cover .nv-title-meta-wrap', + 'live_refresh_selector' => '.nv-post-cover .nv-title-meta-wrap', 'live_refresh_css_prop' => [ 'remove_classes' => [ 'mobile-top', @@ -355,7 +361,7 @@ private function header_layout() { 'live_refresh_selector' => true, 'live_refresh_css_prop' => [ 'template' => ' - body.single-post .nv-post-cover .nv-overlay { + .nv-post-cover .nv-overlay { background-color: {{value}}; }', @@ -381,9 +387,9 @@ private function header_layout() { 'live_refresh_selector' => true, 'live_refresh_css_prop' => [ 'template' => ' - body.single-post .nv-post-cover, - body.single-post .nv-post-cover .nv-meta-list li, - body.single-post .nv-post-cover .nv-meta-list a{ + .nv-post-cover, + .nv-post-cover .nv-meta-list li, + .nv-post-cover .nv-meta-list a{ color: {{value}}; }', ], @@ -420,7 +426,7 @@ private function header_layout() { 'live_refresh_css_prop' => [ 'responsive' => true, 'prop' => 'opacity', - 'template' => 'body.single-post .nv-post-cover .nv-overlay { + 'template' => '.nv-post-cover .nv-overlay { opacity: {{value}}; }', ], @@ -453,7 +459,7 @@ private function header_layout() { 'neve_post_cover_blend_mode', [ 'default' => 'normal', - 'sanitize_callback' => [ $this, 'sanitize_blend_mode' ], + 'sanitize_callback' => 'sanitize_blend_mode', 'transport' => $this->selective_refresh, ], [ @@ -479,7 +485,7 @@ private function header_layout() { 'live_refresh_selector' => true, 'live_refresh_css_prop' => [ 'template' => ' - body.single-post .nv-post-cover .nv-overlay{ + .nv-post-cover .nv-overlay{ mix-blend-mode: {{value}}; }', @@ -494,7 +500,7 @@ private function header_layout() { 'neve_post_cover_container', [ 'default' => 'contained', - 'sanitize_callback' => [ $this, 'sanitize_container' ], + 'sanitize_callback' => 'sanitize_container_layout', ], [ 'label' => esc_html__( 'Cover container', 'neve' ), @@ -510,82 +516,19 @@ private function header_layout() { ) ); - $this->add_control( - new Control( - 'neve_post_cover_boxed_title', - [ - 'sanitize_callback' => 'neve_sanitize_checkbox', - 'default' => false, - ], - [ - 'label' => esc_html__( 'Boxed title', 'neve' ), - 'section' => $this->section, - 'type' => 'neve_toggle_control', - 'priority' => 70, - 'active_callback' => [ get_called_class(), 'is_cover_layout' ], - ], - 'Neve\Customizer\Controls\Checkbox' - ) - ); - - $this->add_control( - new Control( - 'neve_post_cover_boxed_title_padding', - [ - 'sanitize_callback' => [ $this, 'sanitize_spacing_array' ], - 'transport' => $this->selective_refresh, - 'default' => self::cover_padding_default(), - ], - [ - 'label' => esc_html__( 'Section padding', 'neve' ), - 'section' => $this->section, - 'input_attrs' => [ - 'units' => [ 'em', 'px' ], - ], - - 'priority' => 75, - 'live_refresh_selector' => true, - 'live_refresh_css_prop' => [ - 'responsive' => true, - 'directional' => true, - 'template' => - 'body.single-post .nv-post-cover .nv-title-meta-wrap.is-boxed { - padding-top: {{value.top}}; - padding-right: {{value.right}}; - padding-bottom: {{value.bottom}}; - padding-left: {{value.left}}; - }', - ], - 'active_callback' => [ $this, 'is_boxed_title' ], - ], - '\Neve\Customizer\Controls\React\Spacing' - ) - ); - - $this->add_control( - new Control( - 'neve_post_cover_boxed_title_background', - [ - 'sanitize_callback' => 'neve_sanitize_colors', - 'default' => 'var(--nv-dark-bg)', - 'transport' => $this->selective_refresh, - ], - [ - 'label' => esc_html__( 'Section background', 'neve' ), - 'section' => $this->section, - 'priority' => 80, - 'live_refresh_selector' => true, - 'live_refresh_css_prop' => [ - 'template' => ' - .nv-title-meta-wrap.is-boxed { - background-color: {{value}}; - }', - - ], - 'active_callback' => [ $this, 'is_boxed_title' ], - ], - 'Neve\Customizer\Controls\React\Color' - ) + $this->add_boxed_layout_controls( + [ + 'id' => 'post_cover_title', + 'priority' => 70, + 'has_text_color' => false, + 'padding_default' => $this->padding_default( 'cover' ), + 'background_default' => 'var(--nv-dark-bg)', + 'boxed_selector' => '.nv-title-meta-wrap.is-boxed', + 'toggle_active_callback' => function() { + get_theme_mod( 'neve_post_header_layout' ) === 'cover'; + }, + 'active_callback' => [ $this, 'is_boxed_title' ], + ] ); } @@ -612,8 +555,16 @@ private function control_content_order() { ]; } - $order_default_components = self::ordering_default(); - $components = apply_filters( 'neve_single_post_elements', $all_components ); + $order_default_components = $this->post_ordering(); + + /** + * Filters the elements on the single post page. + * + * @param array $all_components Single post page components. + * + * @since 2.11.4 + */ + $components = apply_filters( 'neve_single_post_elements', $all_components ); $this->add_control( new Control( @@ -639,7 +590,15 @@ private function control_content_order() { private function post_meta() { $order_default_components = get_theme_mod( 'neve_post_meta_ordering', wp_json_encode( [ 'author', 'date', 'comments' ] ) ); - $components = apply_filters( + + /** + * Filters the elements that appears in meta. + * + * @param array $elements Array of meta elements. + * + * @since 2.11.4 + */ + $components = apply_filters( 'neve_meta_filter', [ 'author' => __( 'Author', 'neve' ), @@ -648,6 +607,7 @@ private function post_meta() { 'comments' => __( 'Comments', 'neve' ), ] ); + $this->add_control( new Control( 'neve_single_post_meta_ordering', @@ -762,13 +722,13 @@ private function post_meta() { ) ); - $show_updated_time_default = get_theme_mod( 'neve_show_last_updated_date', false ); + $last_updated_default = get_theme_mod( 'neve_show_last_updated_date', false ); $this->add_control( new Control( 'neve_single_post_show_last_updated_date', [ 'sanitize_callback' => 'neve_sanitize_checkbox', - 'default' => $show_updated_time_default, + 'default' => $last_updated_default, ], [ 'label' => esc_html__( 'Use last updated date instead of the published one', 'neve' ), @@ -788,37 +748,107 @@ private function comments() { $this->add_control( new Control( 'neve_post_comment_section_title', - array( + [ 'sanitize_callback' => 'sanitize_text_field', - ), - array( + ], + [ 'label' => esc_html__( 'Section title', 'neve' ), 'description' => esc_html__( 'The following magic tags are available for this field: {title} and {comments_number}. Leave this field empty for default behavior.', 'neve' ), 'priority' => 140, 'section' => $this->section, 'type' => 'text', - ) + ] ) ); - $this->add_boxed_layout_controls( array( - 'id' => 'comments', - 'priority' => 145, - 'padding_css_selector' => '', - 'background_color_css_selector' => 'body.single-post .nv-comments-wrap.is-boxed', - 'text_color_css_selector' => '', - 'active_callback' => function() { - return get_theme_mod( 'neve_comments_boxed_layout', false ); - } - ) ); + $this->add_boxed_layout_controls( + [ + 'id' => 'comments', + 'priority' => 145, + 'padding_default' => $this->padding_default(), + 'background_default' => 'var(--nv-dark-bg)', + 'color_default' => 'var(--nv-text-dark-bg)', + 'boxed_selector' => '.nv-comments-wrap.is-boxed', + 'text_color_css_selector' => '.nv-comments-wrap.is-boxed, .nv-comments-wrap.is-boxed a', + 'border_color_css_selector' => '.nv-comments-wrap.is-boxed .nv-comment-article', + 'active_callback' => function() { + return get_theme_mod( 'neve_comments_boxed_layout', false ); + }, + ] + ); + + $this->add_control( + new Control( + 'neve_post_comment_form_title', + [ + 'sanitize_callback' => 'sanitize_text_field', + ], + [ + 'label' => esc_html__( 'Section title', 'neve' ), + 'priority' => 170, + 'section' => $this->section, + 'type' => 'text', + ] + ) + ); + + $this->add_control( + new Control( + 'neve_post_comment_form_button_style', + [ + 'default' => 'primary', + 'sanitize_callback' => 'sanitize_button_type', + ], + [ + 'label' => esc_html__( 'Button style', 'neve' ), + 'section' => $this->section, + 'priority' => 175, + 'type' => 'select', + 'choices' => [ + 'primary' => esc_html__( 'Primary', 'neve' ), + 'secondary' => esc_html__( 'Secondary', 'neve' ), + ], + ] + ) + ); + $this->add_control( + new Control( + 'neve_post_comment_form_button_text', + [ + 'sanitize_callback' => 'sanitize_text_field', + ], + [ + 'label' => esc_html__( 'Button text', 'neve' ), + 'priority' => 180, + 'section' => $this->section, + 'type' => 'text', + ] + ) + ); + + $this->add_boxed_layout_controls( + [ + 'id' => 'comments_form', + 'priority' => 185, + 'padding_default' => $this->padding_default(), + 'background_default' => 'var(--nv-dark-bg)', + 'color_default' => 'var(--nv-text-dark-bg)', + 'boxed_selector' => '.comment-respond.is-boxed', + 'text_color_css_selector' => '.comment-respond.is-boxed, .comment-respond.is-boxed a', + 'active_callback' => function() { + return get_theme_mod( 'neve_comments_form_boxed_layout', false ); + }, + ] + ); } /** - * @param $settings + * Function to add controls that form the boxed layout. + * + * @param array $settings Controls settings. */ private function add_boxed_layout_controls( $settings ) { - $this->add_control( new Control( 'neve_' . $settings['id'] . '_boxed_layout', @@ -831,6 +861,7 @@ private function add_boxed_layout_controls( $settings ) { 'section' => $this->section, 'type' => 'neve_toggle_control', 'priority' => $settings['priority'], + 'active_callback' => array_key_exists( 'toggle_active_callback', $settings ) ? $settings['toggle_active_callback'] : '__return_true', ], 'Neve\Customizer\Controls\Checkbox' ) @@ -842,7 +873,7 @@ private function add_boxed_layout_controls( $settings ) { [ 'sanitize_callback' => [ $this, 'sanitize_spacing_array' ], 'transport' => $this->selective_refresh, - 'default' => self::cover_padding_default(), + 'default' => array_key_exists( 'padding_default', $settings ) ? $settings['padding_default'] : false, ], [ 'label' => esc_html__( 'Section padding', 'neve' ), @@ -857,14 +888,14 @@ private function add_boxed_layout_controls( $settings ) { 'responsive' => true, 'directional' => true, 'template' => - $settings['padding_css_selector'] . '{ + $settings['boxed_selector'] . '{ padding-top: {{value.top}}; padding-right: {{value.right}}; padding-bottom: {{value.bottom}}; padding-left: {{value.left}}; }', ], - 'active_callback' => $settings['active_callback'], + 'active_callback' => array_key_exists( 'active_callback', $settings ) ? $settings['active_callback'] : false, ], '\Neve\Customizer\Controls\React\Spacing' ) @@ -876,6 +907,7 @@ private function add_boxed_layout_controls( $settings ) { [ 'sanitize_callback' => 'neve_sanitize_colors', 'transport' => $this->selective_refresh, + 'default' => array_key_exists( 'background_default', $settings ) ? $settings['background_default'] : false, ], [ 'label' => esc_html__( 'Background color', 'neve' ), @@ -884,44 +916,64 @@ private function add_boxed_layout_controls( $settings ) { 'live_refresh_selector' => true, 'live_refresh_css_prop' => [ 'template' => - $settings['background_color_css_selector'] . '{ + $settings['boxed_selector'] . '{ background-color: {{value}}; }', ], - 'active_callback' => $settings['active_callback'], + 'active_callback' => array_key_exists( 'active_callback', $settings ) ? $settings['active_callback'] : false, ], 'Neve\Customizer\Controls\React\Color' ) ); - $this->add_control( - new Control( - 'neve_' . $settings['id'] . '_boxed_text_color', - [ - 'sanitize_callback' => 'neve_sanitize_colors', - 'transport' => $this->selective_refresh, - ], - [ - 'label' => esc_html__( 'Background color', 'neve' ), - 'section' => $this->section, - 'priority' => ( $settings['priority'] + 15 ), - 'live_refresh_selector' => true, - 'live_refresh_css_prop' => [ - 'template' => - $settings['text_color_css_selector'] . '{ - color: {{value}}; - }', + $has_text_color = isset( $settings['has_text_color'] ) ? $settings['has_text_color'] : true; + if ( $has_text_color ) { + $template = $settings['text_color_css_selector'] . '{ color: {{value}}; }'; + if ( array_key_exists( 'border_color_css_selector', $settings ) ) { + $template .= $settings['border_color_css_selector'] . '{ border-color: {{value}}; }'; + } + $this->add_control( + new Control( + 'neve_' . $settings['id'] . '_boxed_text_color', + [ + 'sanitize_callback' => 'neve_sanitize_colors', + 'transport' => $this->selective_refresh, + 'default' => array_key_exists( 'color_default', $settings ) ? $settings['color_default'] : false, ], - 'active_callback' => $settings['active_callback'], - ], - 'Neve\Customizer\Controls\React\Color' - ) - ); + [ + 'label' => esc_html__( 'Text color', 'neve' ), + 'section' => $this->section, + 'priority' => ( $settings['priority'] + 15 ), + 'live_refresh_selector' => true, + 'live_refresh_css_prop' => [ + 'template' => $template, + ], + 'active_callback' => array_key_exists( 'active_callback', $settings ) ? $settings['active_callback'] : false, + ], + 'Neve\Customizer\Controls\React\Color' + ) + ); + } } + /** + * Sanitize the header layout control. + * + * @param string $input Control input. + * + * @return string + */ + public function sanitize_header_layout( $input ) { + $header_layout_options = [ 'normal', 'cover' ]; + if ( ! in_array( $input, $header_layout_options, true ) ) { + return 'normal'; + } + return $input; + } + /** * Sanitize content order control. */ @@ -971,134 +1023,6 @@ public function is_boxed_title() { if ( ! self::is_cover_layout() ) { return false; } - return get_theme_mod( 'neve_post_cover_boxed_title', false ); - } - - /** - * Sanitize the header layout control. - * - * @param string $input Control input. - * - * @return string - */ - public function sanitize_header_layout( $input ) { - $header_layout_options = [ 'normal', 'cover' ]; - if ( ! in_array( $input, $header_layout_options, true ) ) { - return 'normal'; - } - return $input; - } - - /** - * Sanitize blend mode option. - * - * @param string $input Control input. - * - * @return string - */ - public function sanitize_blend_mode( $input ) { - $blend_mode_options = [ 'normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'saturation', 'color', 'difference', 'exclusion', 'hue', 'luminosity' ]; - if ( ! in_array( $input, $blend_mode_options, true ) ) { - return 'normal'; - } - return $input; - } - - /** - * Sanitize container option. - * - * @param string $input Control input. - * - * @return string - */ - public function sanitize_container( $input ) { - $container_options = [ 'full-width', 'contained' ]; - if ( ! in_array( $input, $container_options, true ) ) { - return 'contained'; - } - return $input; - } - - /** - * Get default values for cover padding. - * - * @return array - */ - public static function cover_padding_default() { - return [ - 'mobile' => [ - 'top' => 40, - 'right' => 15, - 'bottom' => 40, - 'left' => 15, - ], - 'tablet' => [ - 'top' => 60, - 'right' => 15, - 'bottom' => 60, - 'left' => 15, - ], - 'desktop' => [ - 'top' => 60, - 'right' => 15, - 'bottom' => 60, - 'left' => 15, - ], - 'mobile-unit' => 'px', - 'tablet-unit' => 'px', - 'desktop-unit' => 'px', - ]; - } - - /** - * Get the default value for title alignment. - * - * @return array - */ - public static function post_title_alignment_default() { - $default_position = is_rtl() ? 'right' : 'left'; - return [ - 'mobile' => $default_position, - 'tablet' => $default_position, - 'desktop' => $default_position, - ]; - } - - /** - * Get the default value for title vertical position. - * - * @return array - */ - public static function post_title_position_default() { - return [ - 'mobile' => 'bottom', - 'tablet' => 'bottom', - 'desktop' => 'bottom', - ]; - } - - /** - * Get default values for ordering control - * - * @return array - */ - public static function ordering_default() { - $default_components = [ - 'title-meta', - 'thumbnail', - 'content', - 'tags', - 'comments', - ]; - - if ( get_theme_mod( 'neve_post_header_layout' ) === 'cover' ) { - $default_components = [ - 'content', - 'tags', - 'comments', - ]; - } - - return apply_filters( 'neve_single_post_elements_default_order', $default_components ); + return get_theme_mod( 'neve_post_cover_title_boxed_layout', false ); } } diff --git a/inc/views/partials/comments.php b/inc/views/partials/comments.php index e19276281c..5b5e5a6196 100644 --- a/inc/views/partials/comments.php +++ b/inc/views/partials/comments.php @@ -28,10 +28,11 @@ public function init() { * Render the comments form. */ public function render_comment_form() { - $display_form_first = apply_filters( 'neve_show_comment_form_first', false ); + $display_form_first = apply_filters( 'neve_show_comment_form_first', false ); + $comment_form_settings = $this->get_sumbit_form_settings(); if ( $display_form_first ) { - comment_form(); + comment_form( $comment_form_settings ); } if ( have_comments() ) { @@ -76,10 +77,39 @@ public function render_comment_form() { get_alignment_classes( 'neve_post_title_position', Layout_Single_Post::post_title_position_default() ); + $position = $this->get_alignment_classes( 'neve_post_title_position', $this->post_title_position() ); $cover_style = $this->get_cover_style(); $container_classes = [ @@ -200,7 +202,7 @@ public function render_cover_header() { $title_meta_wrap_classes = [ 'nv-title-meta-wrap', ]; - $title_mode = get_theme_mod( 'neve_post_cover_boxed_title', false ); + $title_mode = get_theme_mod( 'neve_post_cover_title_boxed_layout', false ); if ( $title_mode ) { $title_meta_wrap_classes[] = 'is-boxed'; } @@ -231,7 +233,7 @@ public function render_cover_header() { * @return string */ public function align_post_title( $classes ) { - $title_alignment_classes = $this->get_alignment_classes( 'neve_post_title_alignment', Layout_Single_Post::post_title_alignment_default() ); + $title_alignment_classes = $this->get_alignment_classes( 'neve_post_title_alignment', $this->post_title_alignment() ); if ( empty( $title_alignment_classes ) ) { return $classes; } @@ -244,7 +246,7 @@ public function align_post_title( $classes ) { * @return array */ private function get_content_order() { - $default_order = Layout_Single_Post::ordering_default(); + $default_order = $this->post_ordering(); $content_order = get_theme_mod( 'neve_layout_single_post_elements_order', wp_json_encode( $default_order ) ); if ( ! is_string( $content_order ) ) { diff --git a/languages/neve.pot b/languages/neve.pot index 1cb2ba425b..500a168018 100755 --- a/languages/neve.pot +++ b/languages/neve.pot @@ -302,7 +302,7 @@ msgstr "" #: header-footer-grid/Core/Builder/Abstract_Builder.php:310 #: inc/admin/metabox/main.php:38 #: inc/customizer/options/layout_container.php:133 -#: inc/customizer/options/layout_single_post.php:490 +#: inc/customizer/options/layout_single_post.php:512 #: inc/admin/metabox/src/components/MetaFieldsManager.js:182 msgid "Contained" msgstr "" @@ -457,7 +457,7 @@ msgstr "" #: header-footer-grid/Core/Components/Abstract_Component.php:465 #: inc/customizer/options/layout_sidebar.php:129 -#: inc/customizer/options/layout_single_post.php:231 +#: inc/customizer/options/layout_single_post.php:253 #: inc/admin/metabox/src/components/MetaFieldsManager.js:153 #: inc/customizer/controls/react/src/button-appearance/ButtonAppearance.js:108 #: inc/customizer/controls/react/src/non-responsive-spacing/NRSpacingComponent.js:45 @@ -466,13 +466,13 @@ msgid "Left" msgstr "" #: header-footer-grid/Core/Components/Abstract_Component.php:469 -#: inc/customizer/options/layout_single_post.php:235 +#: inc/customizer/options/layout_single_post.php:257 msgid "Center" msgstr "" #: header-footer-grid/Core/Components/Abstract_Component.php:473 #: inc/customizer/options/layout_sidebar.php:133 -#: inc/customizer/options/layout_single_post.php:239 +#: inc/customizer/options/layout_single_post.php:261 #: inc/admin/metabox/src/components/MetaFieldsManager.js:155 #: inc/customizer/controls/react/src/button-appearance/ButtonAppearance.js:106 #: inc/customizer/controls/react/src/non-responsive-spacing/NRSpacingComponent.js:43 @@ -503,7 +503,7 @@ msgid "Typography" msgstr "" #: header-footer-grid/Core/Components/Abstract_Component.php:865 -#: inc/customizer/options/layout_single_post.php:277 +#: inc/customizer/options/layout_single_post.php:299 #: inc/customizer/controls/react/src/button-appearance/ButtonAppearance.js:105 #: inc/customizer/controls/react/src/non-responsive-spacing/NRSpacingComponent.js:42 #: inc/customizer/controls/react/src/spacing/SpacingComponent.js:111 @@ -511,12 +511,12 @@ msgid "Top" msgstr "" #: header-footer-grid/Core/Components/Abstract_Component.php:869 -#: inc/customizer/options/layout_single_post.php:281 +#: inc/customizer/options/layout_single_post.php:303 msgid "Middle" msgstr "" #: header-footer-grid/Core/Components/Abstract_Component.php:873 -#: inc/customizer/options/layout_single_post.php:285 +#: inc/customizer/options/layout_single_post.php:307 #: inc/customizer/controls/react/src/button-appearance/ButtonAppearance.js:107 #: inc/customizer/controls/react/src/non-responsive-spacing/NRSpacingComponent.js:44 #: inc/customizer/controls/react/src/spacing/SpacingComponent.js:121 @@ -560,7 +560,7 @@ msgstr "" #: header-footer-grid/Core/Components/CartIcon.php:142 #: header-footer-grid/Core/Components/SearchResponsive.php:184 #: inc/customizer/options/form_fields.php:384 -#: inc/customizer/options/layout_single_post.php:458 +#: inc/customizer/options/layout_single_post.php:480 #: inc/customizer/controls/react/src/background/Background.js:20 #: inc/customizer/controls/react/src/background/Background.js:71 #: inc/customizer/controls/react/src/common/ColorControl.js:59 @@ -906,7 +906,7 @@ msgstr "" #: header-footer-grid/Core/Magic_Tags.php:543 #: inc/customizer/options/layout_blog.php:390 -#: inc/customizer/options/layout_single_post.php:630 +#: inc/customizer/options/layout_single_post.php:589 #: inc/views/partials/post_meta.php:182 msgid "Author" msgstr "" @@ -1097,21 +1097,21 @@ msgid "Enable Individual Content Width" msgstr "" #. translators: %s - post type -#: inc/admin/metabox/manager.php:130 -#: inc/admin/metabox/manager.php:147 +#: inc/admin/metabox/manager.php:132 +#: inc/admin/metabox/manager.php:149 msgid "%s Settings" msgstr "" -#: inc/admin/metabox/manager.php:186 +#: inc/admin/metabox/manager.php:188 msgid "Page Settings are now accessible from the top bar" msgstr "" #. translators: %1$s - Keyboard shortcut. %2&s - svg icon -#: inc/admin/metabox/manager.php:189 +#: inc/admin/metabox/manager.php:191 msgid "Click the %1$s icon in the top bar or use the keyboard shortcut ( %2$s ) to customise the layout settings for this page" msgstr "" -#: inc/admin/metabox/manager.php:196 +#: inc/admin/metabox/manager.php:198 msgid "or" msgstr "" @@ -1327,12 +1327,14 @@ msgstr "" #: inc/customizer/options/buttons.php:59 #: inc/customizer/options/form_fields.php:596 +#: inc/customizer/options/layout_single_post.php:792 #: assets/js/src/gutenberg.js:13 msgid "Primary" msgstr "" #: inc/customizer/options/buttons.php:62 #: inc/customizer/options/form_fields.php:597 +#: inc/customizer/options/layout_single_post.php:793 msgid "Secondary" msgstr "" @@ -1453,13 +1455,13 @@ msgid "Infinite Scroll" msgstr "" #: inc/customizer/options/layout_blog.php:289 -#: inc/customizer/options/layout_single_post.php:584 +#: inc/customizer/options/layout_single_post.php:543 #: inc/customizer/controls/react/src/ordering/OrderingComponent.js:52 msgid "Thumbnail" msgstr "" #: inc/customizer/options/layout_blog.php:290 -#: inc/customizer/options/layout_single_post.php:583 +#: inc/customizer/options/layout_single_post.php:542 #: inc/customizer/controls/react/src/ordering/OrderingComponent.js:46 msgid "Title & Meta" msgstr "" @@ -1481,28 +1483,29 @@ msgid "Thumbnail Shadow" msgstr "" #: inc/customizer/options/layout_blog.php:369 -#: inc/customizer/options/layout_single_post.php:79 +#: inc/customizer/options/layout_single_post.php:81 #: inc/admin/metabox/src/components/MetaFieldsManager.js:321 msgid "Post Meta" msgstr "" #: inc/customizer/options/layout_blog.php:391 -#: inc/customizer/options/layout_single_post.php:631 +#: inc/customizer/options/layout_single_post.php:590 #: inc/customizer/options/layout_single_product.php:107 #: inc/views/partials/post_meta.php:183 msgid "Category" msgstr "" #: inc/customizer/options/layout_blog.php:392 -#: inc/customizer/options/layout_single_post.php:632 +#: inc/customizer/options/layout_single_post.php:591 #: inc/views/partials/post_meta.php:184 msgid "Date" msgstr "" #: inc/customizer/options/layout_blog.php:393 -#: inc/customizer/options/layout_single_post.php:588 -#: inc/customizer/options/layout_single_post.php:596 -#: inc/customizer/options/layout_single_post.php:633 +#: inc/customizer/options/layout_single_post.php:87 +#: inc/customizer/options/layout_single_post.php:547 +#: inc/customizer/options/layout_single_post.php:555 +#: inc/customizer/options/layout_single_post.php:592 #: inc/views/partials/post_meta.php:185 #: inc/admin/metabox/src/components/MetaFieldsManager.js:316 #: inc/admin/metabox/src/components/MetaFieldsManager.js:325 @@ -1510,32 +1513,32 @@ msgid "Comments" msgstr "" #: inc/customizer/options/layout_blog.php:405 -#: inc/customizer/options/layout_single_post.php:644 +#: inc/customizer/options/layout_single_post.php:603 msgid "Meta Order" msgstr "" #: inc/customizer/options/layout_blog.php:425 -#: inc/customizer/options/layout_single_post.php:664 +#: inc/customizer/options/layout_single_post.php:623 msgid "Separator" msgstr "" #: inc/customizer/options/layout_blog.php:426 -#: inc/customizer/options/layout_single_post.php:665 +#: inc/customizer/options/layout_single_post.php:624 msgid "For special characters make sure to use Unicode. For example > can be displayed using \\003E." msgstr "" #: inc/customizer/options/layout_blog.php:440 -#: inc/customizer/options/layout_single_post.php:680 +#: inc/customizer/options/layout_single_post.php:639 msgid "Show Author Avatar" msgstr "" #: inc/customizer/options/layout_blog.php:462 -#: inc/customizer/options/layout_single_post.php:706 +#: inc/customizer/options/layout_single_post.php:665 msgid "Avatar Size" msgstr "" #: inc/customizer/options/layout_blog.php:516 -#: inc/customizer/options/layout_single_post.php:759 +#: inc/customizer/options/layout_single_post.php:718 msgid "Use last updated date instead of the published one" msgstr "" @@ -1584,7 +1587,7 @@ msgid "Enable Advanced Options" msgstr "" #: inc/customizer/options/layout_sidebar.php:164 -#: inc/customizer/options/layout_single_post.php:55 +#: inc/customizer/options/layout_single_post.php:57 #: inc/customizer/options/typography.php:339 msgid "Single Post" msgstr "" @@ -1619,152 +1622,178 @@ msgstr "" msgid "Content Width (%)" msgstr "" -#: inc/customizer/options/layout_single_post.php:68 +#: inc/customizer/options/layout_single_post.php:70 msgid "Header Layout" msgstr "" -#: inc/customizer/options/layout_single_post.php:73 +#: inc/customizer/options/layout_single_post.php:75 msgid "Page Elements" msgstr "" -#: inc/customizer/options/layout_single_post.php:124 -#: inc/customizer/options/layout_single_post.php:450 +#: inc/customizer/options/layout_single_post.php:93 +msgid "Comments Section" +msgstr "" + +#: inc/customizer/options/layout_single_post.php:100 +msgid "Submit Form Section" +msgstr "" + +#: inc/customizer/options/layout_single_post.php:146 +#: inc/customizer/options/layout_single_post.php:472 #: inc/customizer/controls/react/src/button-appearance/ButtonAppearance.js:39 msgid "Normal" msgstr "" -#: inc/customizer/options/layout_single_post.php:128 +#: inc/customizer/options/layout_single_post.php:150 msgid "Cover" msgstr "" -#: inc/customizer/options/layout_single_post.php:146 +#: inc/customizer/options/layout_single_post.php:168 msgid "Cover height" msgstr "" -#: inc/customizer/options/layout_single_post.php:192 +#: inc/customizer/options/layout_single_post.php:214 msgid "Cover padding" msgstr "" -#: inc/customizer/options/layout_single_post.php:226 +#: inc/customizer/options/layout_single_post.php:248 msgid "Title Alignment" msgstr "" -#: inc/customizer/options/layout_single_post.php:272 +#: inc/customizer/options/layout_single_post.php:294 msgid "Title Position" msgstr "" -#: inc/customizer/options/layout_single_post.php:318 +#: inc/customizer/options/layout_single_post.php:340 msgid "Display meta before title" msgstr "" -#: inc/customizer/options/layout_single_post.php:337 +#: inc/customizer/options/layout_single_post.php:359 msgid "Overlay color" msgstr "" -#: inc/customizer/options/layout_single_post.php:363 +#: inc/customizer/options/layout_single_post.php:385 +#: inc/customizer/options/layout_single_post.php:930 msgid "Text color" msgstr "" -#: inc/customizer/options/layout_single_post.php:390 +#: inc/customizer/options/layout_single_post.php:412 msgid "Overlay opacity" msgstr "" -#: inc/customizer/options/layout_single_post.php:426 +#: inc/customizer/options/layout_single_post.php:448 msgid "Hide featured image" msgstr "" -#: inc/customizer/options/layout_single_post.php:445 +#: inc/customizer/options/layout_single_post.php:467 msgid "Blend mode" msgstr "" -#: inc/customizer/options/layout_single_post.php:451 +#: inc/customizer/options/layout_single_post.php:473 msgid "Multiply" msgstr "" -#: inc/customizer/options/layout_single_post.php:452 +#: inc/customizer/options/layout_single_post.php:474 msgid "Screen" msgstr "" -#: inc/customizer/options/layout_single_post.php:453 +#: inc/customizer/options/layout_single_post.php:475 msgid "Overlay" msgstr "" -#: inc/customizer/options/layout_single_post.php:454 +#: inc/customizer/options/layout_single_post.php:476 msgid "Darken" msgstr "" -#: inc/customizer/options/layout_single_post.php:455 +#: inc/customizer/options/layout_single_post.php:477 msgid "Lighten" msgstr "" -#: inc/customizer/options/layout_single_post.php:456 +#: inc/customizer/options/layout_single_post.php:478 msgid "Color Dodge" msgstr "" -#: inc/customizer/options/layout_single_post.php:457 +#: inc/customizer/options/layout_single_post.php:479 msgid "Saturation" msgstr "" -#: inc/customizer/options/layout_single_post.php:459 +#: inc/customizer/options/layout_single_post.php:481 msgid "Difference" msgstr "" -#: inc/customizer/options/layout_single_post.php:460 +#: inc/customizer/options/layout_single_post.php:482 msgid "Exclusion" msgstr "" -#: inc/customizer/options/layout_single_post.php:461 +#: inc/customizer/options/layout_single_post.php:483 msgid "Hue" msgstr "" -#: inc/customizer/options/layout_single_post.php:462 +#: inc/customizer/options/layout_single_post.php:484 msgid "Luminosity" msgstr "" -#: inc/customizer/options/layout_single_post.php:485 +#: inc/customizer/options/layout_single_post.php:507 msgid "Cover container" msgstr "" -#: inc/customizer/options/layout_single_post.php:491 +#: inc/customizer/options/layout_single_post.php:513 msgid "Full width" msgstr "" -#: inc/customizer/options/layout_single_post.php:506 -msgid "Boxed title" -msgstr "" - -#: inc/customizer/options/layout_single_post.php:525 -msgid "Section padding" -msgstr "" - -#: inc/customizer/options/layout_single_post.php:559 -msgid "Section background" -msgstr "" - -#: inc/customizer/options/layout_single_post.php:585 -#: inc/customizer/options/layout_single_post.php:593 +#: inc/customizer/options/layout_single_post.php:544 +#: inc/customizer/options/layout_single_post.php:552 #: inc/admin/metabox/src/components/MetaFieldsManager.js:314 #: inc/admin/metabox/src/components/MetaFieldsManager.js:323 msgid "Content" msgstr "" -#: inc/customizer/options/layout_single_post.php:586 -#: inc/customizer/options/layout_single_post.php:594 +#: inc/customizer/options/layout_single_post.php:545 +#: inc/customizer/options/layout_single_post.php:553 #: inc/views/partials/post_meta.php:337 #: inc/admin/metabox/src/components/MetaFieldsManager.js:315 #: inc/admin/metabox/src/components/MetaFieldsManager.js:324 msgid "Tags" msgstr "" -#: inc/customizer/options/layout_single_post.php:587 -#: inc/customizer/options/layout_single_post.php:595 +#: inc/customizer/options/layout_single_post.php:546 +#: inc/customizer/options/layout_single_post.php:554 msgid "Post navigation" msgstr "" -#: inc/customizer/options/layout_single_post.php:611 +#: inc/customizer/options/layout_single_post.php:570 msgid "Elements Order" msgstr "" +#: inc/customizer/options/layout_single_post.php:739 +#: inc/customizer/options/layout_single_post.php:771 +msgid "Section title" +msgstr "" + +#: inc/customizer/options/layout_single_post.php:740 +msgid "The following magic tags are available for this field: {title} and {comments_number}. Leave this field empty for default behavior." +msgstr "" + +#: inc/customizer/options/layout_single_post.php:787 +msgid "Button style" +msgstr "" + +#: inc/customizer/options/layout_single_post.php:806 +msgid "Button text" +msgstr "" + +#: inc/customizer/options/layout_single_post.php:844 +msgid "Boxed layout" +msgstr "" + +#: inc/customizer/options/layout_single_post.php:863 +msgid "Section padding" +msgstr "" + +#: inc/customizer/options/layout_single_post.php:897 +msgid "Background color" +msgstr "" + #: inc/customizer/options/layout_single_product.php:71 msgid "Exclusive Products" msgstr "" @@ -1911,47 +1940,47 @@ msgstr "" msgid "Search Results for: %s" msgstr "" -#: inc/views/partials/comments.php:63 +#: inc/views/partials/comments.php:76 msgid "Comments are closed." msgstr "" -#: inc/views/partials/comments.php:81 +#: inc/views/partials/comments.php:123 msgid "Comments Navigation" msgstr "" -#: inc/views/partials/comments.php:86 +#: inc/views/partials/comments.php:128 msgid "Previous" msgstr "" -#: inc/views/partials/comments.php:89 +#: inc/views/partials/comments.php:131 msgid "Next" msgstr "" -#: inc/views/partials/comments.php:112 +#: inc/views/partials/comments.php:154 msgid "Pingback:" msgstr "" -#: inc/views/partials/comments.php:114 -#: inc/views/partials/comments.php:145 +#: inc/views/partials/comments.php:156 +#: inc/views/partials/comments.php:187 #: inc/customizer/controls/react/src/common/CustomPalette.js:18 msgid "Edit" msgstr "" #. translators: 1: date, 2: time -#: inc/views/partials/comments.php:136 +#: inc/views/partials/comments.php:178 msgid "%1$s at %2$s" msgstr "" -#: inc/views/partials/comments.php:151 +#: inc/views/partials/comments.php:193 msgid "Reply" msgstr "" -#: inc/views/partials/comments.php:164 +#: inc/views/partials/comments.php:206 msgid "Comment awaiting moderation." msgstr "" #. translators: number of comments -#: inc/views/partials/comments.php:185 +#: inc/views/partials/comments.php:231 msgctxt "comments title" msgid "%1$s thought on “%2$s”" msgid_plural "%1$s thoughts on “%2$s”"