Przeglądaj źródła

Merge pull request #2798 from Automattic/fix/varia-morden-header-issues

Morden and Varia: fixed conditional class not working corectly
Maggie 4 lat temu
rodzic
commit
71e1225672

+ 4 - 4
morden/header.php

@@ -13,7 +13,7 @@
 $has_primary_nav = has_nav_menu( 'menu-1' );
 $has_primary_nav = has_nav_menu( 'menu-1' );
 $header_classes  = 'site-header-wrap responsive-max-width';
 $header_classes  = 'site-header-wrap responsive-max-width';
 $header_classes .= has_custom_logo() ? ' has-logo' : '';
 $header_classes .= has_custom_logo() ? ' has-logo' : '';
-$header_classes .= 1 === get_theme_mod( 'header_text', true ) ? ' has-title-and-tagline' : '';
+$header_classes .= 1 === (int) get_theme_mod( 'header_text', true ) ? ' has-title-and-tagline' : '';
 $header_classes .= $has_primary_nav ? ' has-menu' : '';
 $header_classes .= $has_primary_nav ? ' has-menu' : '';
 ?><!doctype html>
 ?><!doctype html>
 <html <?php language_attributes(); ?>>
 <html <?php language_attributes(); ?>>
@@ -27,9 +27,9 @@ $header_classes .= $has_primary_nav ? ' has-menu' : '';
 <body <?php body_class(); ?>>
 <body <?php body_class(); ?>>
 
 
 <?php
 <?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
+if ( function_exists( 'wp_body_open' ) ) {
+	wp_body_open();
+}
 ?>
 ?>
 
 
 <div id="page" class="site">
 <div id="page" class="site">

+ 1 - 1
morden/package-lock.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "morden",
   "name": "morden",
-  "version": "1.5.10",
+  "version": "1.5.11",
   "lockfileVersion": 1,
   "lockfileVersion": 1,
   "requires": true,
   "requires": true,
   "dependencies": {
   "dependencies": {

+ 1 - 1
morden/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "morden",
   "name": "morden",
-  "version": "1.5.10",
+  "version": "1.5.11",
   "description": "Morden",
   "description": "Morden",
   "bugs": {
   "bugs": {
     "url": "https://github.com/Automattic/themes/issues"
     "url": "https://github.com/Automattic/themes/issues"

+ 1 - 1
morden/sass/style-child-theme.scss

@@ -5,7 +5,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Author URI: https://automattic.com/
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Requires at least: WordPress 4.9.6
 Requires at least: WordPress 4.9.6
-Version: 1.5.9
+Version: 1.5.11
 License: GNU General Public License v2 or later
 License: GNU General Public License v2 or later
 License URI: LICENSE
 License URI: LICENSE
 Template: varia
 Template: varia

+ 1 - 1
morden/style-rtl.css

@@ -6,7 +6,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Author URI: https://automattic.com/
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Requires at least: WordPress 4.9.6
 Requires at least: WordPress 4.9.6
-Version: 1.5.10
+Version: 1.5.11
 License: GNU General Public License v2 or later
 License: GNU General Public License v2 or later
 License URI: LICENSE
 License URI: LICENSE
 Template: varia
 Template: varia

+ 1 - 1
morden/style.css

@@ -6,7 +6,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Author URI: https://automattic.com/
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Requires at least: WordPress 4.9.6
 Requires at least: WordPress 4.9.6
-Version: 1.5.10
+Version: 1.5.11
 License: GNU General Public License v2 or later
 License: GNU General Public License v2 or later
 License URI: LICENSE
 License URI: LICENSE
 Template: varia
 Template: varia

+ 4 - 4
varia/header.php

@@ -13,7 +13,7 @@
 $has_primary_nav = has_nav_menu( 'menu-1' );
 $has_primary_nav = has_nav_menu( 'menu-1' );
 $header_classes  = 'site-header responsive-max-width';
 $header_classes  = 'site-header responsive-max-width';
 $header_classes .= has_custom_logo() ? ' has-logo' : '';
 $header_classes .= has_custom_logo() ? ' has-logo' : '';
-$header_classes .= 1 === get_theme_mod( 'header_text', true ) ? ' has-title-and-tagline' : '';
+$header_classes .= 1 === (int) get_theme_mod( 'header_text', true ) ? ' has-title-and-tagline' : '';
 $header_classes .= $has_primary_nav ? ' has-menu' : '';
 $header_classes .= $has_primary_nav ? ' has-menu' : '';
 ?><!doctype html>
 ?><!doctype html>
 <html <?php language_attributes(); ?>>
 <html <?php language_attributes(); ?>>
@@ -27,9 +27,9 @@ $header_classes .= $has_primary_nav ? ' has-menu' : '';
 <body <?php body_class(); ?>>
 <body <?php body_class(); ?>>
 
 
 <?php
 <?php
-	if ( function_exists( 'wp_body_open' ) ) {
-		wp_body_open();
-	}
+if ( function_exists( 'wp_body_open' ) ) {
+	wp_body_open();
+}
 ?>
 ?>
 
 
 <div id="page" class="site">
 <div id="page" class="site">

+ 1 - 1
varia/package-lock.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "varia",
   "name": "varia",
-  "version": "1.5.7",
+  "version": "1.5.8",
   "lockfileVersion": 1,
   "lockfileVersion": 1,
   "requires": true,
   "requires": true,
   "dependencies": {
   "dependencies": {

+ 1 - 1
varia/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "varia",
   "name": "varia",
-  "version": "1.5.7",
+  "version": "1.5.8",
   "description": "A variable-based design system for WordPress sites built with Gutenberg.",
   "description": "A variable-based design system for WordPress sites built with Gutenberg.",
   "bugs": {
   "bugs": {
     "url": "https://github.com/Automattic/themes/issues?q=is%3Aopen+is%3Aissue+label%3Avaria"
     "url": "https://github.com/Automattic/themes/issues?q=is%3Aopen+is%3Aissue+label%3Avaria"

+ 1 - 1
varia/style-rtl.css

@@ -6,7 +6,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Author URI: https://automattic.com/
 Description: A variable-based design system for WordPress sites built with Gutenberg.
 Description: A variable-based design system for WordPress sites built with Gutenberg.
 Requires at least: WordPress 4.9.6
 Requires at least: WordPress 4.9.6
-Version: 1.5.7
+Version: 1.5.8
 License: GNU General Public License v2 or later
 License: GNU General Public License v2 or later
 License URI: LICENSE
 License URI: LICENSE
 Text Domain: varia
 Text Domain: varia

+ 1 - 1
varia/style.css

@@ -6,7 +6,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Author URI: https://automattic.com/
 Description: A variable-based design system for WordPress sites built with Gutenberg.
 Description: A variable-based design system for WordPress sites built with Gutenberg.
 Requires at least: WordPress 4.9.6
 Requires at least: WordPress 4.9.6
-Version: 1.5.7
+Version: 1.5.8
 License: GNU General Public License v2 or later
 License: GNU General Public License v2 or later
 License URI: LICENSE
 License URI: LICENSE
 Text Domain: varia
 Text Domain: varia

+ 1 - 1
varia/style.scss

@@ -5,7 +5,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Author URI: https://automattic.com/
 Description: A variable-based design system for WordPress sites built with Gutenberg.
 Description: A variable-based design system for WordPress sites built with Gutenberg.
 Requires at least: WordPress 4.9.6
 Requires at least: WordPress 4.9.6
-Version: 1.5.7
+Version: 1.5.8
 License: GNU General Public License v2 or later
 License: GNU General Public License v2 or later
 License URI: LICENSE
 License URI: LICENSE
 Text Domain: varia
 Text Domain: varia