From ce61d112f5bcdeab5eda81d1d14094e4e72bdd7b Mon Sep 17 00:00:00 2001 From: Lai Power Date: Thu, 10 Dec 2020 10:43:51 +0000 Subject: [PATCH] updated theme `Twenty Nineteen` version 1.8 --- .../class-twentynineteen-svg-icons.php | 6 +- .../class-twentynineteen-walker-comment.php | 26 +-- .../themes/twentynineteen/functions.php | 9 + .../twentynineteen/inc/block-patterns.php | 201 ++++++++++++++++++ .../twentynineteen/inc/helper-functions.php | 10 +- .../twentynineteen/inc/template-functions.php | 2 +- .../themes/twentynineteen/package-lock.json | 2 +- wp-content/themes/twentynineteen/package.json | 2 +- wp-content/themes/twentynineteen/readme.txt | 18 +- .../themes/twentynineteen/style-editor.scss | 10 +- .../themes/twentynineteen/style-rtl.css | 10 +- wp-content/themes/twentynineteen/style.css | 12 +- wp-content/themes/twentynineteen/style.scss | 10 +- 13 files changed, 274 insertions(+), 44 deletions(-) create mode 100644 wp-content/themes/twentynineteen/inc/block-patterns.php diff --git a/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php b/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php index a4f04fa..13860a0 100644 --- a/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php +++ b/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php @@ -70,7 +70,7 @@ class TwentyNineteen_SVG_Icons { * * @var array */ - static $ui_icons = array( + public static $ui_icons = array( 'link' => /* material-design – link */ ' @@ -178,7 +178,7 @@ class TwentyNineteen_SVG_Icons { * * @var array */ - static $social_icons_map = array( + public static $social_icons_map = array( 'amazon' => array( 'amazon.com', 'amazon.cn', @@ -237,7 +237,7 @@ class TwentyNineteen_SVG_Icons { * * @var array */ - static $social_icons = array( + public static $social_icons = array( '500px' => ' diff --git a/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php b/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php index 71ae751..7c3a206 100644 --- a/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php +++ b/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php @@ -73,18 +73,20 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
- - - - ' . $edit_comment_icon, '' ); + /* translators: 1: Comment date, 2: Comment time. */ + $comment_timestamp = sprintf( __( '%1$s at %2$s', 'twentynineteen' ), get_comment_date( '', $comment ), get_comment_time() ); + + printf( + '', + esc_url( get_comment_link( $comment, $args ) ), + get_comment_time( 'c' ), + esc_attr( $comment_timestamp ), + $comment_timestamp + ); + + $edit_comment_icon = twentynineteen_get_icon_svg( 'edit', 16 ); + edit_comment_link( __( 'Edit', 'twentynineteen' ), ' ' . $edit_comment_icon, '' ); ?>
@@ -93,7 +95,7 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment { if ( $commenter['comment_author_email'] ) { $moderation_note = __( 'Your comment is awaiting moderation.', 'twentynineteen' ); } else { - $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.', 'twentynineteen' ); + $moderation_note = __( 'Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved.', 'twentynineteen' ); } ?> diff --git a/wp-content/themes/twentynineteen/functions.php b/wp-content/themes/twentynineteen/functions.php index b837442..e90b1ee 100644 --- a/wp-content/themes/twentynineteen/functions.php +++ b/wp-content/themes/twentynineteen/functions.php @@ -76,6 +76,7 @@ if ( ! function_exists( 'twentynineteen_setup' ) ) : 'caption', 'script', 'style', + 'navigation-widgets', ) ); @@ -174,6 +175,9 @@ if ( ! function_exists( 'twentynineteen_setup' ) ) : // Add support for responsive embedded content. add_theme_support( 'responsive-embeds' ); + + // Add support for custom line height. + add_theme_support( 'custom-line-height' ); } endif; add_action( 'after_setup_theme', 'twentynineteen_setup' ); @@ -328,3 +332,8 @@ require get_template_directory() . '/inc/template-tags.php'; * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; + +/** + * Block Patterns. + */ +require get_template_directory() . '/inc/block-patterns.php'; diff --git a/wp-content/themes/twentynineteen/inc/block-patterns.php b/wp-content/themes/twentynineteen/inc/block-patterns.php new file mode 100644 index 0000000..a835785 --- /dev/null +++ b/wp-content/themes/twentynineteen/inc/block-patterns.php @@ -0,0 +1,201 @@ + esc_html__( 'Twenty Nineteen', 'twentynineteen' ) ) + ); +} + +/** + * Register Block Patterns. + */ +if ( function_exists( 'register_block_pattern' ) ) { + + // About. + register_block_pattern( + 'twentynineteen/about', + array( + 'title' => esc_html__( 'About', 'twentynineteen' ), + 'categories' => array( 'twentynineteen' ), + 'content' => implode( + '', + array( + '', + '

' . esc_html__( 'Advocating for Businesses and Entrepreneurs since 2014', 'twentynineteen' ) . '

', + '', + '', + '

' . esc_html__( 'Eva Young Consulting was founded in 2014 to meet the needs of small businesses in the San Francisco Bay Area. We help startups define a clear brand identity and digital strategy that will carry them through their financing rounds and scale as their business grows. Discover how we can boost your brand with a unique and powerful digital marketing strategy.', 'twentynineteen' ) . '

', + '', + '', + '
', + '', + '
', + '', + ) + ), + ) + ); + + // Get In Touch. + register_block_pattern( + 'twentynineteen/get-in-touch', + array( + 'title' => esc_html__( 'Get In Touch', 'twentynineteen' ), + 'categories' => array( 'twentynineteen' ), + 'content' => implode( + '', + array( + '', + '

' . esc_html__( 'Get In Touch', 'twentynineteen' ) . '

', + '', + '', + '
', + '
', + '

' . esc_html__( '20 Cooper Avenue', 'twentynineteen' ) . '
' . esc_html__( 'New York, New York 10023', 'twentynineteen' ) . '

', + '
', + '', + '', + '
', + '

' . esc_html__( '(555) 555-5555', 'twentynineteen' ) . '
' . esc_html__( 'example@example.com', 'twentynineteen' ) . '

', + '
', + '
', + '', + '', + '
', + '', + '
', + '', + ) + ), + ) + ); + + // Services. + register_block_pattern( + 'twentynineteen/services', + array( + 'title' => esc_html__( 'Services', 'twentynineteen' ), + 'categories' => array( 'twentynineteen' ), + 'content' => implode( + '', + array( + '', + '

' . esc_html__( 'Services', 'twentynineteen' ) . '

', + '', + '', + '
', + '
', + '
' . esc_html__( 'Gradient', 'twentynineteen' ) . '
', + '

' . esc_html__( 'Website Design', 'twentynineteen' ) . '

', + '
', + '', + '', + '
' . esc_html__( 'Gradient', 'twentynineteen' ) . '
', + '

' . esc_html__( 'Mobile', 'twentynineteen' ) . '

', + '
', + '', + '', + '
' . esc_html__( 'Gradient', 'twentynineteen' ) . '
', + '

' . esc_html__( 'Social Media', 'twentynineteen' ) . '

', + '
', + '
', + '', + '', + '
', + '
' . esc_html__( 'Gradient', 'twentynineteen' ) . '
', + '

' . esc_html__( 'Marketing', 'twentynineteen' ) . '

', + '
', + '', + '', + '
' . esc_html__( 'Gradient', 'twentynineteen' ) . '
', + '

' . esc_html__( 'Copywriting', 'twentynineteen' ) . '

', + '
', + '', + '', + '
' . esc_html__( 'Gradient', 'twentynineteen' ) . '
', + '

' . esc_html__( 'Content Strategy', 'twentynineteen' ) . '

', + '
', + '
', + '
', + '', + ) + ), + ) + ); + + // Team. + register_block_pattern( + 'twentynineteen/team', + array( + 'title' => esc_html__( 'Team', 'twentynineteen' ), + 'categories' => array( 'twentynineteen' ), + 'viewportWidth' => 1400, + 'content' => implode( + '', + array( + '', + '

' . esc_html__( 'Team', 'twentynineteen' ) . '

', + '', + '', + '
' . esc_html__( 'Gradient', 'twentynineteen' ) . '
', + '

' . esc_html__( 'Eva Young', 'twentynineteen' ) . '

', + '', + '', + '

' . esc_html__( 'Eva Young grew up working alongside her parents at their restaurant in Queens, NY. She opened Eva Young Consulting in 2014 to help small businesses like her parents’ restaurant adapt to the digital age.', 'twentynineteen' ) . '

', + '
', + '', + '', + '
' . esc_html__( 'Gradient', 'twentynineteen' ) . '
', + '

' . esc_html__( 'Doug Watson', 'twentynineteen' ) . '

', + '', + '', + '

' . esc_html__( 'Oddly enough, Doug Watson also grew up working alongside his parents at a family-owned restaurant in Queens, NY. He  worked on digital campaigns for Fortune 500 Companies before joining Eva Green Consulting.', 'twentynineteen' ) . '

', + '
', + '', + ) + ), + ) + ); + + // What We Do. + register_block_pattern( + 'twentynineteen/what-we-do', + array( + 'title' => esc_html__( 'What We Do', 'twentynineteen' ), + 'categories' => array( 'twentynineteen' ), + 'viewportWidth' => 1400, + 'content' => implode( + '', + array( + '', + '

' . esc_html__( 'What We Do', 'twentynineteen' ) . '

', + '', + '', + '

' . esc_html__( 'Redefine brands', 'twentynineteen' ) . '

' . esc_html__( 'We help startups define (or refine) a clear brand identity.', 'twentynineteen' ) . '
', + '', + '', + '

' . esc_html__( 'Activate new customers', 'twentynineteen' ) . '

' . esc_html__( 'We help businesses grow.', 'twentynineteen' ) . '
', + '', + '', + '

' . esc_html__( 'Spark interest on social media', 'twentynineteen' ) . '

' . esc_html__( 'We help companies communicate with their customers.', 'twentynineteen' ) . '
', + '', + ) + ), + ) + ); +} diff --git a/wp-content/themes/twentynineteen/inc/helper-functions.php b/wp-content/themes/twentynineteen/inc/helper-functions.php index ef06cdd..fcb1107 100644 --- a/wp-content/themes/twentynineteen/inc/helper-functions.php +++ b/wp-content/themes/twentynineteen/inc/helper-functions.php @@ -94,15 +94,8 @@ function twentynineteen_hsl_hex( $h, $s, $l, $to_hex = true ) { $g = $l; $b = $l; $v = ( $l <= 0.5 ) ? ( $l * ( 1.0 + $s ) ) : ( $l + $s - $l * $s ); - if ( $v > 0 ) { - $m; - $sv; - $sextant; - $fract; - $vsf; - $mid1; - $mid2; + if ( $v > 0 ) { $m = $l + $l - $v; $sv = ( $v - $m ) / $v; $h *= 6.0; @@ -145,6 +138,7 @@ function twentynineteen_hsl_hex( $h, $s, $l, $to_hex = true ) { break; } } + $r = round( $r * 255, 0 ); $g = round( $g * 255, 0 ); $b = round( $b * 255, 0 ); diff --git a/wp-content/themes/twentynineteen/inc/template-functions.php b/wp-content/themes/twentynineteen/inc/template-functions.php index 63a3a72..f713567 100644 --- a/wp-content/themes/twentynineteen/inc/template-functions.php +++ b/wp-content/themes/twentynineteen/inc/template-functions.php @@ -120,7 +120,7 @@ add_filter( 'wp_get_attachment_image_attributes', 'twentynineteen_post_thumbnail /** * Add an extra menu to our nav for our priority+ navigation to use * - * @param object $nav_menu Nav menu. + * @param string $nav_menu Nav menu. * @param object $args Nav menu args. * @return string More link for hidden menu items. */ diff --git a/wp-content/themes/twentynineteen/package-lock.json b/wp-content/themes/twentynineteen/package-lock.json index f1c56e8..49d37d7 100644 --- a/wp-content/themes/twentynineteen/package-lock.json +++ b/wp-content/themes/twentynineteen/package-lock.json @@ -1,6 +1,6 @@ { "name": "twentynineteen", - "version": "1.7.0", + "version": "1.8.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/wp-content/themes/twentynineteen/package.json b/wp-content/themes/twentynineteen/package.json index 5983b00..6bfa041 100644 --- a/wp-content/themes/twentynineteen/package.json +++ b/wp-content/themes/twentynineteen/package.json @@ -1,6 +1,6 @@ { "name": "twentynineteen", - "version": "1.7.0", + "version": "1.8.0", "description": "Default WP Theme", "bugs": { "url": "https://github.com/WordPress/twentynineteen/issues" diff --git a/wp-content/themes/twentynineteen/readme.txt b/wp-content/themes/twentynineteen/readme.txt index a057ebf..b05d575 100644 --- a/wp-content/themes/twentynineteen/readme.txt +++ b/wp-content/themes/twentynineteen/readme.txt @@ -1,9 +1,9 @@ === Twenty Nineteen === Contributors: wordpressdotorg -Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready +Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready, block-patterns Requires at least: 4.9.6 -Tested up to: 5.5 -Stable tag: 1.7 +Tested up to: 5.6 +Stable tag: 1.8 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -39,6 +39,11 @@ GNU General Public License for more details. == Changelog == += 1.8 = +* Released: December 8, 2020 + +https://codex.wordpress.org/Twenty_Nineteen_Theme_Changelog#Version_1.8 + = 1.7 = * Released: August 11, 2020 @@ -81,4 +86,9 @@ Initial release == Resources == * normalize.css, © 2012-2018 Nicolas Gallagher and Jonathan Neal, MIT -* Underscores, © 2012-2019 Automattic, Inc., GNU GPL v2 or later +* Underscores, © 2012-2020 Automattic, Inc., GNU GPL v2 or later +* Bundled block pattern images: + * Abstract Background by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-background-0SRRVNMKBX + * Abstract Waves by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-waves-0KREGLTZQ3 + * Abstract Bokeh by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-bokeh-P4KVZBMQ6L + * Colorful Bokeh by HD Wallpapers, CC0. https://stocksnap.io/photo/colorful-bokeh-VN4G84GL8H diff --git a/wp-content/themes/twentynineteen/style-editor.scss b/wp-content/themes/twentynineteen/style-editor.scss index 076b201..d9a146b 100644 --- a/wp-content/themes/twentynineteen/style-editor.scss +++ b/wp-content/themes/twentynineteen/style-editor.scss @@ -18,19 +18,19 @@ body { } .wp-block[data-align="left"], - .wp-block.alignleft, { + .wp-block.alignleft { margin-right: $size__spacing-unit; width: inherit; } .wp-block[data-align="right"], - .wp-block.alignright, { + .wp-block.alignright { margin-left: $size__spacing-unit; width: inherit; } .wp-block[data-align="center"], - .wp-block.aligncenter, { + .wp-block.aligncenter { margin-left: 0; } @@ -142,10 +142,6 @@ a { @include link-transition; color: $color__link; - *:visited { - - } - &:hover, &:active { color: $color__link-hover; diff --git a/wp-content/themes/twentynineteen/style-rtl.css b/wp-content/themes/twentynineteen/style-rtl.css index 2e3dada..97ff236 100644 --- a/wp-content/themes/twentynineteen/style-rtl.css +++ b/wp-content/themes/twentynineteen/style-rtl.css @@ -7,7 +7,7 @@ Author URI: https://wordpress.org/ Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes. Requires at least: 4.9.6 Requires PHP: 5.2.4 -Version: 1.7 +Version: 1.8 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentynineteen @@ -16,11 +16,17 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. -Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2019 Automattic, Inc. +Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc. Underscores is distributed under the terms of the GNU GPL v2 or later. Normalizing styles have been helped along thanks to the fine work of Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/ + +Bundled block pattern images: +Abstract Background by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-background-0SRRVNMKBX +Abstract Waves by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-waves-0KREGLTZQ3 +Abstract Bokeh by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-bokeh-P4KVZBMQ6L +Colorful Bokeh by HD Wallpapers, CC0. https://stocksnap.io/photo/colorful-bokeh-VN4G84GL8H */ /*-------------------------------------------------------------- >>> TABLE OF CONTENTS: diff --git a/wp-content/themes/twentynineteen/style.css b/wp-content/themes/twentynineteen/style.css index 7fd7305..f1906fe 100644 --- a/wp-content/themes/twentynineteen/style.css +++ b/wp-content/themes/twentynineteen/style.css @@ -7,20 +7,26 @@ Author URI: https://wordpress.org/ Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes. Requires at least: 4.9.6 Requires PHP: 5.2.4 -Version: 1.7 +Version: 1.8 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentynineteen -Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready +Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready, block-patterns This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. -Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2019 Automattic, Inc. +Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc. Underscores is distributed under the terms of the GNU GPL v2 or later. Normalizing styles have been helped along thanks to the fine work of Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/ + +Bundled block pattern images: +Abstract Background by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-background-0SRRVNMKBX +Abstract Waves by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-waves-0KREGLTZQ3 +Abstract Bokeh by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-bokeh-P4KVZBMQ6L +Colorful Bokeh by HD Wallpapers, CC0. https://stocksnap.io/photo/colorful-bokeh-VN4G84GL8H */ /*-------------------------------------------------------------- >>> TABLE OF CONTENTS: diff --git a/wp-content/themes/twentynineteen/style.scss b/wp-content/themes/twentynineteen/style.scss index b8f85df..86a3bb3 100644 --- a/wp-content/themes/twentynineteen/style.scss +++ b/wp-content/themes/twentynineteen/style.scss @@ -6,7 +6,7 @@ Author URI: https://wordpress.org/ Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes. Requires at least: 4.9.6 Requires PHP: 5.2.4 -Version: 1.7 +Version: 1.8 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: twentynineteen @@ -15,11 +15,17 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me This theme, like WordPress, is licensed under the GPL. Use it to make something cool, have fun, and share what you've learned with others. -Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2019 Automattic, Inc. +Twenty Nineteen is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc. Underscores is distributed under the terms of the GNU GPL v2 or later. Normalizing styles have been helped along thanks to the fine work of Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/ + +Bundled block pattern images: +Abstract Background by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-background-0SRRVNMKBX +Abstract Waves by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-waves-0KREGLTZQ3 +Abstract Bokeh by HD Wallpapers, CC0. https://stocksnap.io/photo/abstract-bokeh-P4KVZBMQ6L +Colorful Bokeh by HD Wallpapers, CC0. https://stocksnap.io/photo/colorful-bokeh-VN4G84GL8H */ /*--------------------------------------------------------------