From 68ea84c91f74a9608a0a9615717d55338f1eae2a Mon Sep 17 00:00:00 2001 From: Ashu Kumar Gupta <62129914+d-ashuji@users.noreply.github.com> Date: Thu, 4 Mar 2021 15:45:25 +0530 Subject: [PATCH 1/5] Fixed minor issues > Link Color Change Option [in the customizer] > Comment box displaying above the Comment > Logo resolution not right > either remove the top bar or keep it box width. > remove the blank space on the post in archive when there's no image --- comments.php | 56 ++++++++++++++--------------- inc/customizer/controls.php | 15 ++++++++ inc/customizer/custom/separator.php | 17 --------- inc/customizer/js/customizer.js | 5 +++ inc/customizer/live-preview-css.php | 7 +++- inc/defaults.php | 1 + inc/template-functions.php | 22 ++++++++++++ template-parts/content.php | 2 ++ template-parts/top-bar.php | 2 +- 9 files changed, 80 insertions(+), 47 deletions(-) diff --git a/comments.php b/comments.php index ad35491..4bf9fa2 100644 --- a/comments.php +++ b/comments.php @@ -60,44 +60,44 @@ ); ?> -
- -
- ID)->approved; + $comments_count = wp_count_comments($post->ID)->approved; ?> -
+

Comments

- + - 1 && get_option('page_comments')) : - ?> - - + 1 && get_option('page_comments')) : + ?> + + -
+
- comment_status) : ?> - - - - - + comment_status) : ?> + + + + + + +
+ +
diff --git a/inc/customizer/controls.php b/inc/customizer/controls.php index c2e5d13..7a3df8b 100644 --- a/inc/customizer/controls.php +++ b/inc/customizer/controls.php @@ -588,6 +588,21 @@ function mtminimag_customize_register($wp_customize) ) ) ); + $wp_customize->add_setting('color_anchor', array ( + 'default' => $defaultColors['color_anchor'], + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_hex_color' + )); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'color_anchor', + array( + 'label' => __( 'Link Color', 'mtminimag' ), + 'section' => 'main_colors', + ) ) + ); + // Logo Color $wp_customize->add_section('logo_colors', array ( 'title' => __('Logo Color', 'mtminimag'), diff --git a/inc/customizer/custom/separator.php b/inc/customizer/custom/separator.php index b34bb7c..b67c35f 100644 --- a/inc/customizer/custom/separator.php +++ b/inc/customizer/custom/separator.php @@ -34,23 +34,6 @@ public function json() { protected function render_template() { ?> -
diff --git a/inc/customizer/js/customizer.js b/inc/customizer/js/customizer.js index b0b1295..74dd9b0 100644 --- a/inc/customizer/js/customizer.js +++ b/inc/customizer/js/customizer.js @@ -46,6 +46,11 @@ document.documentElement.style.setProperty('--site-color', newval); }); }); + wp.customize( 'color_anchor', function( value ) { + value.bind( function( newval ) { + document.documentElement.style.setProperty('--anchor-color', newval); + }); + }); // Offcanvas colors wp.customize( 'offcanvas_width', function( value ) { diff --git a/inc/customizer/live-preview-css.php b/inc/customizer/live-preview-css.php index ae6deee..955be11 100644 --- a/inc/customizer/live-preview-css.php +++ b/inc/customizer/live-preview-css.php @@ -15,6 +15,7 @@ function mtminimag_customizer_css() --site-color: ; --primary-color: ; + --anchor-color: ; --header-text-color: ; --body-bg-color: ; @@ -44,7 +45,11 @@ function mtminimag_customizer_css() --offcanvas-width: px; --offcanvas-text-color: ; --offcanvas-bg: ; - } + } + + a { + color: var(--anchor-color); + } body.custom-background { background-color: var(--body-bg-color); diff --git a/inc/defaults.php b/inc/defaults.php index 1ede878..9f03af3 100644 --- a/inc/defaults.php +++ b/inc/defaults.php @@ -115,6 +115,7 @@ function mt_get_color_defaults() { 'color_primary' => '#646464', 'color_site' => '#737070', + 'color_anchor' => '#000', 'color_logo_text' => '#FF4642', 'color_header_text' => '#111111', 'color_background' => '#f8f9fa', diff --git a/inc/template-functions.php b/inc/template-functions.php index c5b8acc..43640b9 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -488,6 +488,28 @@ function mtminimag_footer_info() { } } +function mtminimag_customizer_styles() { ?> + + " >
+
+
- -
- -
- -
@@ -141,16 +129,6 @@
- -
- -
- -