diff --git a/wp-content/themes/twentynineteen/archive.php b/wp-content/themes/twentynineteen/archive.php index df8b24fb7c..3d2273e43e 100644 --- a/wp-content/themes/twentynineteen/archive.php +++ b/wp-content/themes/twentynineteen/archive.php @@ -45,13 +45,12 @@ get_header(); // If no content, include the "No posts found" template. else : - get_template_part( 'template-parts/content', 'none' ); + get_template_part( 'template-parts/content/content', 'none' ); endif; ?> - - - + + /* material-design – link */ ' - - + + ', 'watch' => /* material-design – watch-later */ ' - + - + - + ', 'archive' => /* material-design – folder */ ' - - + + ', 'tag' => /* material-design – local_offer */ ' - - + + ', 'comment' => /* material-design – comment */ ' - - + + ', 'person' => /* material-design – person */ ' - - + + ', 'edit' => /* material-design – edit */ ' - - + + ', 'chevron_left' => /* material-design – chevron_left */ ' - - + + ', 'chevron_right' => /* material-design – chevron_right */ ' - - + + ', 'check' => /* material-design – check */ ' - - + + ', 'arrow_drop_down_circle' => /* material-design – arrow_drop_down_circle */ ' - - + + ', 'keyboard_arrow_down' => /* material-design – keyboard_arrow_down */ ' - - + + ', 'keyboard_arrow_right' => /* material-design – keyboard_arrow_right */ ' - - + + ', 'keyboard_arrow_left' => /* material-design – keyboard_arrow_left */ ' - - + + +', + + 'arrow_drop_down_ellipsis' => /* custom – arrow_drop_down_ellipsis */ ' + + + + + ', ); @@ -203,6 +211,9 @@ class TwentyNineteen_SVG_Icons { 'google-plus' => array( 'plus.google.com', ), + 'lastfm' => array( + 'last.fm', + ), 'mail' => array( 'mailto:', ), @@ -229,213 +240,217 @@ class TwentyNineteen_SVG_Icons { static $social_icons = array( '500px' => ' - + ', 'amazon' => ' - + ', 'apple' => ' - + ', 'bandcamp' => ' - + ', 'behance' => ' - + ', 'chain' => ' - + ', 'codepen' => ' - + ', 'deviantart' => ' - + ', 'digg' => ' - + ', 'dribbble' => ' - + ', 'dropbox' => ' - + ', 'etsy' => ' - + ', 'facebook' => ' - + ', 'feed' => ' - + ', 'flickr' => ' - + ', 'foursquare' => ' - + ', 'goodreads' => ' - + ', 'google-plus' => ' - + ', 'google' => ' - + ', 'github' => ' - + ', 'instagram' => ' - + +', + + 'lastfm' => ' + + ', 'linkedin' => ' - + ', 'mail' => ' - + ', 'meetup' => ' - + ', 'medium' => ' - + ', 'pinterest' => ' - + ', 'pocket' => ' - + ', 'reddit' => ' - + ', 'skype' => ' - + ', 'slideshare' => ' - + ', 'snapchat' => ' - + ', 'soundcloud' => ' - + ', 'spotify' => ' - + ', 'stumbleupon' => ' - + ', 'tumblr' => ' - + ', 'twitch' => ' - + ', 'twitter' => ' - + ', 'vimeo' => ' - + ', 'vk' => ' - + ', 'wordpress' => ' - + ', 'yelp' => ' - + ', 'youtube' => ' - + ', ); 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 5d94fd7dac..b39185e45e 100644 --- a/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php +++ b/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php @@ -55,8 +55,8 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment { printf( '', twentynineteen_get_icon_svg( 'check', 24 ) ); } - /* translators: %s: comment author link */ printf( + /* translators: %s: comment author link */ __( '%s says:', 'twentynineteen' ), sprintf( '%s', $comment_author ) ); @@ -69,9 +69,12 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
- -
-
+

responses ) { /* translators: %s: post title */ printf( _x( 'One reply on “%s”', 'comments title', 'twentynineteen' ), get_the_title() ); } else { @@ -44,11 +44,11 @@ if ( post_password_required() ) { _nx( '%1$s reply on “%2$s”', '%1$s replies on “%2$s”', - $comments_number, + $discussion->responses, 'comments title', 'twentynineteen' ), - number_format_i18n( $comments_number ), + number_format_i18n( $discussion->responses ), get_the_title() ); } @@ -102,9 +102,9 @@ if ( post_password_required() ) { if ( comments_open() && 'asc' === strtolower( get_option( 'comment_order', 'asc' ) ) ) : ?>
- + - +

- +

" class="imprint"> ' ); } ?> + + +

diff --git a/wp-content/themes/twentynineteen/functions.php b/wp-content/themes/twentynineteen/functions.php index b6cd2acfed..ca792cf32b 100644 --- a/wp-content/themes/twentynineteen/functions.php +++ b/wp-content/themes/twentynineteen/functions.php @@ -9,6 +9,14 @@ * @since 1.0.0 */ +/** + * Twenty Nineteen only works in WordPress 4.7 or later. + */ +if ( version_compare( $GLOBALS['wp_version'], '4.7', '<' ) ) { + require get_template_directory() . '/inc/back-compat.php'; + return; +} + if ( ! function_exists( 'twentynineteen_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. @@ -48,7 +56,8 @@ if ( ! function_exists( 'twentynineteen_setup' ) ) : // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( - 'menu-1' => esc_html__( 'Primary', 'twentynineteen' ), + 'menu-1' => __( 'Primary', 'twentynineteen' ), + 'footer' => __( 'Footer Menu', 'twentynineteen' ), 'social' => __( 'Social Links Menu', 'twentynineteen' ), ) ); @@ -86,31 +95,31 @@ if ( ! function_exists( 'twentynineteen_setup' ) ) : // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); - // Add support for Block Styles + // Add support for Block Styles. add_theme_support( 'wp-block-styles' ); // Add support for full and wide align images. add_theme_support( 'align-wide' ); - // Add support for editor styles + // Add support for editor styles. add_theme_support( 'editor-styles' ); - // Enqueue editor styles + // Enqueue editor styles. add_editor_style( 'style-editor.css' ); - // Editor color palette + // Editor color palette. add_theme_support( 'editor-color-palette', array( array( - 'name' => esc_html__( 'Primary Color', 'twentynineteen' ), + 'name' => __( 'Primary Color', 'twentynineteen' ), 'slug' => 'primary', 'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'colorscheme' ) ? 199 : get_theme_mod( 'colorscheme_primary_hue', 199 ), 100, 33 ), ), ) ); - // Add support for responsive embedded content + // Add support for responsive embedded content. add_theme_support( 'responsive-embeds' ); } @@ -144,7 +153,7 @@ add_action( 'widgets_init', 'twentynineteen_widgets_init' ); * * Priority 0 to make it available to lower priority callbacks. * - * @global int $content_width + * @global int $content_width Content width. */ function twentynineteen_content_width() { // This variable is intended to be overruled from themes. @@ -165,18 +174,12 @@ function twentynineteen_scripts() { wp_enqueue_script( 'twentynineteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); if ( has_nav_menu( 'menu-1' ) ) { - wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-navigation.js' ), array(), '1.0', true ); - $l10n_skip_link_focus_fix['expand'] = __( 'Expand child menu', 'twentynineteen' ); - $l10n_skip_link_focus_fix['collapse'] = __( 'Collapse child menu', 'twentynineteen' ); - wp_localize_script( 'twentynineteen-skip-link-focus-fix', 'twentynineteenScreenReaderText', $l10n_skip_link_focus_fix ); + wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '1.0', true ); + wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '1.0', true ); } wp_enqueue_style( 'twentynineteen-print-style', get_template_directory_uri() . '/print.css', array(), wp_get_theme()->get( 'Version' ), 'print' ); - if ( is_singular() && twentynineteen_can_show_post_thumbnail() ) { - wp_add_inline_style( 'twentynineteen-style', twentynineteen_header_featured_image_css() ); - } - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } @@ -184,7 +187,7 @@ function twentynineteen_scripts() { add_action( 'wp_enqueue_scripts', 'twentynineteen_scripts' ); /** - * Enqueue supplemental block editor styles + * Enqueue supplemental block editor styles. */ function twentynineteen_editor_customizer_styles() { @@ -192,7 +195,7 @@ function twentynineteen_editor_customizer_styles() { if ( 'custom' === get_theme_mod( 'colorscheme' ) ) { // Include color patterns - require_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) ); + require_once get_parent_theme_file_path( '/inc/color-patterns.php' ); wp_add_inline_style( 'twentynineteen-editor-customizer-styles', twentynineteen_custom_colors_css() ); } } @@ -203,12 +206,12 @@ add_action( 'enqueue_block_editor_assets', 'twentynineteen_editor_customizer_sty */ function twentynineteen_colors_css_wrap() { - // Only include custom colors in customizer or frontend - if ( ( ! is_customize_preview() && is_admin() ) || is_admin() ) { + // Only include custom colors in customizer or frontend. + if ( ( ! is_customize_preview() && 'default' === get_theme_mod( 'colorscheme', 'default' ) ) || is_admin() ) { return; } - require_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) ); + require_once get_parent_theme_file_path( '/inc/color-patterns.php' ); if ( 'default' === get_theme_mod( 'colorscheme', 'default' ) ) { $primary_color = 199; @@ -220,7 +223,7 @@ function twentynineteen_colors_css_wrap() { ->
- +
@@ -31,9 +31,10 @@