From 168d1a5ee73fc09b6de839c5e3251b7da2be1de6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 8 May 2019 08:07:01 +0100 Subject: [PATCH] Update themes --- .../class-twentynineteen-svg-icons.php | 30 +- .../class-twentynineteen-walker-comment.php | 17 +- wp-content/themes/twentynineteen/header.php | 9 +- wp-content/themes/twentynineteen/image.php | 100 +- .../twentynineteen/inc/color-patterns.php | 14 +- .../themes/twentynineteen/inc/customizer.php | 4 +- .../twentynineteen/inc/template-functions.php | 14 +- .../twentynineteen/inc/template-tags.php | 18 + wp-content/themes/twentynineteen/print.css | 3 +- wp-content/themes/twentynineteen/print.scss | 300 +-- wp-content/themes/twentynineteen/readme.txt | 15 +- .../twentynineteen/sass/blocks/_blocks.scss | 106 +- .../twentynineteen/sass/elements/_tables.scss | 2 +- .../twentynineteen/sass/forms/_buttons.scss | 2 +- .../twentynineteen/sass/media/_captions.scss | 2 +- .../twentynineteen/sass/media/_galleries.scss | 2 +- .../sass/mixins/_mixins-master.scss | 109 +- .../navigation/_menu-main-navigation.scss | 7 +- .../sass/navigation/_next-previous.scss | 2 +- .../sass/site/footer/_site-footer.scss | 10 + .../site/header/_site-featured-image.scss | 4 +- .../sass/site/header/_site-header.scss | 5 + .../sass/site/primary/_archives.scss | 1 + .../sass/site/primary/_comments.scss | 11 +- .../sass/site/secondary/_widgets.scss | 4 +- .../twentynineteen/sass/typography/_copy.scss | 2 +- .../sass/typography/_headings.scss | 12 +- .../sass/typography/_typography.scss | 6 +- .../sass/variables-site/_fonts.scss | 46 + .../style-editor-customizer.css | 94 +- .../style-editor-customizer.scss | 14 +- .../themes/twentynineteen/style-editor.css | 538 ++++- .../themes/twentynineteen/style-editor.scss | 40 +- .../themes/twentynineteen/style-rtl.css | 2044 +++++++++++++++-- wp-content/themes/twentynineteen/style.css | 2044 +++++++++++++++-- .../themes/twentynineteen/style.css.map | 1 + wp-content/themes/twentynineteen/style.scss | 4 +- .../content/content-excerpt.php | 2 +- .../template-parts/content/content-single.php | 4 +- .../template-parts/content/content.php | 2 +- .../template-parts/footer/footer-widgets.php | 8 +- .../template-parts/header/entry-header.php | 2 +- wp-content/themes/twentyseventeen/404.php | 3 +- wp-content/themes/twentyseventeen/README.txt | 15 +- wp-content/themes/twentyseventeen/archive.php | 26 +- .../assets/css/colors-dark.css | 2 +- .../assets/css/editor-blocks.css | 1 + .../twentyseventeen/assets/js/global.js | 1 + .../themes/twentyseventeen/comments.php | 35 +- wp-content/themes/twentyseventeen/footer.php | 22 +- .../themes/twentyseventeen/front-page.php | 17 +- .../themes/twentyseventeen/functions.php | 195 +- wp-content/themes/twentyseventeen/header.php | 1 + .../twentyseventeen/inc/back-compat.php | 10 +- .../twentyseventeen/inc/color-patterns.php | 8 +- .../twentyseventeen/inc/custom-header.php | 90 +- .../themes/twentyseventeen/inc/customizer.php | 191 +- .../twentyseventeen/inc/icon-functions.php | 8 +- .../inc/template-functions.php | 4 +- .../twentyseventeen/inc/template-tags.php | 187 +- wp-content/themes/twentyseventeen/index.php | 20 +- wp-content/themes/twentyseventeen/page.php | 8 +- wp-content/themes/twentyseventeen/search.php | 21 +- wp-content/themes/twentyseventeen/single.php | 16 +- wp-content/themes/twentyseventeen/style.css | 6 +- .../template-parts/footer/footer-widgets.php | 13 +- .../template-parts/header/site-branding.php | 2 +- .../navigation/navigation-top.php | 12 +- .../page/content-front-page-panels.php | 44 +- .../page/content-front-page.php | 17 +- .../template-parts/page/content-page.php | 16 +- .../template-parts/post/content-audio.php | 74 +- .../template-parts/post/content-excerpt.php | 10 +- .../template-parts/post/content-gallery.php | 40 +- .../template-parts/post/content-image.php | 69 +- .../template-parts/post/content-none.php | 8 +- .../template-parts/post/content-video.php | 72 +- .../template-parts/post/content.php | 40 +- wp-content/themes/twentysixteen/archive.php | 21 +- wp-content/themes/twentysixteen/comments.php | 64 +- wp-content/themes/twentysixteen/footer.php | 26 +- wp-content/themes/twentysixteen/functions.php | 516 +++-- wp-content/themes/twentysixteen/header.php | 35 +- wp-content/themes/twentysixteen/image.php | 120 +- .../themes/twentysixteen/inc/back-compat.php | 10 +- .../themes/twentysixteen/inc/customizer.php | 472 ++-- .../twentysixteen/inc/template-tags.php | 360 +-- wp-content/themes/twentysixteen/index.php | 21 +- wp-content/themes/twentysixteen/page.php | 3 +- wp-content/themes/twentysixteen/readme.txt | 15 +- wp-content/themes/twentysixteen/search.php | 19 +- wp-content/themes/twentysixteen/sidebar.php | 2 +- wp-content/themes/twentysixteen/single.php | 29 +- wp-content/themes/twentysixteen/style.css | 2 +- .../template-parts/content-page.php | 22 +- .../template-parts/content-search.php | 2 +- .../template-parts/content-single.php | 24 +- .../twentysixteen/template-parts/content.php | 34 +- 98 files changed, 6532 insertions(+), 2223 deletions(-) create mode 100644 wp-content/themes/twentynineteen/style.css.map 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 8721dc3..16efb0a 100644 --- a/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php +++ b/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php @@ -71,13 +71,13 @@ class TwentyNineteen_SVG_Icons { * @var array */ static $ui_icons = array( - 'link' => /* material-design – link */ ' + 'link' => /* material-design – link */ ' ', - 'watch' => /* material-design – watch-later */ ' + 'watch' => /* material-design – watch-later */ ' @@ -88,73 +88,73 @@ class TwentyNineteen_SVG_Icons { ', - 'archive' => /* material-design – folder */ ' + 'archive' => /* material-design – folder */ ' ', - 'tag' => /* material-design – local_offer */ ' + 'tag' => /* material-design – local_offer */ ' ', - 'comment' => /* material-design – comment */ ' + 'comment' => /* material-design – comment */ ' ', - 'person' => /* material-design – person */ ' + 'person' => /* material-design – person */ ' ', - 'edit' => /* material-design – edit */ ' + 'edit' => /* material-design – edit */ ' ', - 'chevron_left' => /* material-design – chevron_left */ ' + 'chevron_left' => /* material-design – chevron_left */ ' ', - 'chevron_right' => /* material-design – chevron_right */ ' + 'chevron_right' => /* material-design – chevron_right */ ' ', - 'check' => /* material-design – check */ ' + 'check' => /* material-design – check */ ' ', - 'arrow_drop_down_circle' => /* material-design – arrow_drop_down_circle */ ' + 'arrow_drop_down_circle' => /* material-design – arrow_drop_down_circle */ ' ', - 'keyboard_arrow_down' => /* material-design – keyboard_arrow_down */ ' + 'keyboard_arrow_down' => /* material-design – keyboard_arrow_down */ ' ', - 'keyboard_arrow_right' => /* material-design – keyboard_arrow_right */ ' + 'keyboard_arrow_right' => /* material-design – keyboard_arrow_right */ ' ', - 'keyboard_arrow_left' => /* material-design – keyboard_arrow_left */ ' + 'keyboard_arrow_left' => /* material-design – keyboard_arrow_left */ ' @@ -343,7 +343,7 @@ class TwentyNineteen_SVG_Icons { ', - 'lastfm' => ' + 'lastfm' => ' ', 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 51dc15c..6237a36 100644 --- a/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php +++ b/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php @@ -33,10 +33,9 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment { - + - + diff --git a/wp-content/themes/twentynineteen/template-parts/content/content.php b/wp-content/themes/twentynineteen/template-parts/content/content.php index 85ec632..befcbda 100644 --- a/wp-content/themes/twentynineteen/template-parts/content/content.php +++ b/wp-content/themes/twentynineteen/template-parts/content/content.php @@ -56,4 +56,4 @@ - + diff --git a/wp-content/themes/twentynineteen/template-parts/footer/footer-widgets.php b/wp-content/themes/twentynineteen/template-parts/footer/footer-widgets.php index 550e2af..163cbd8 100644 --- a/wp-content/themes/twentynineteen/template-parts/footer/footer-widgets.php +++ b/wp-content/themes/twentynineteen/template-parts/footer/footer-widgets.php @@ -11,13 +11,13 @@ if ( is_active_sidebar( 'sidebar-1' ) ) : ?> diff --git a/wp-content/themes/twentynineteen/template-parts/header/entry-header.php b/wp-content/themes/twentynineteen/template-parts/header/entry-header.php index 9a72cbf..b23ad31 100644 --- a/wp-content/themes/twentynineteen/template-parts/header/entry-header.php +++ b/wp-content/themes/twentynineteen/template-parts/header/entry-header.php @@ -42,5 +42,5 @@ $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentyni '' ); ?> - + diff --git a/wp-content/themes/twentyseventeen/404.php b/wp-content/themes/twentyseventeen/404.php index 4a6d113..3eb2a30 100644 --- a/wp-content/themes/twentyseventeen/404.php +++ b/wp-content/themes/twentyseventeen/404.php @@ -31,4 +31,5 @@ get_header(); ?> -
+ if ( have_posts() ) : + ?> endwhile; - the_posts_pagination( array( - 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . __( 'Previous page', 'twentyseventeen' ) . '', - 'next_text' => '' . __( 'Next page', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), - 'before_page_number' => '' . __( 'Page', 'twentyseventeen' ) . ' ', - ) ); + the_posts_pagination( + array( + 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . __( 'Previous page', 'twentyseventeen' ) . '', + 'next_text' => '' . __( 'Next page', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), + 'before_page_number' => '' . __( 'Page', 'twentyseventeen' ) . ' ', + ) + ); else : get_template_part( 'template-parts/post/content', 'none' ); - endif; ?> + endif; + ?>
- button ), .colors-dark button:focus, .colors-dark input[type="button"]:hover, .colors-dark input[type="button"]:focus, diff --git a/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css b/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css index 60170e8..6b6bd47 100644 --- a/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css +++ b/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css @@ -674,6 +674,7 @@ table.wp-block-table tr { border-bottom: 1px solid #eee; } +table.wp-block-table th, table.wp-block-table td { border: 0; padding: 0.4em; diff --git a/wp-content/themes/twentyseventeen/assets/js/global.js b/wp-content/themes/twentyseventeen/assets/js/global.js index 6e2f429..b6322de 100644 --- a/wp-content/themes/twentyseventeen/assets/js/global.js +++ b/wp-content/themes/twentyseventeen/assets/js/global.js @@ -208,6 +208,7 @@ adjustHeaderHeight(); setQuotesIcon(); + belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); if ( true === supportsInlineSVG() ) { document.documentElement.className = document.documentElement.className.replace( /(\s*)no-svg(\s*)/, '$1svg$2' ); } diff --git a/wp-content/themes/twentyseventeen/comments.php b/wp-content/themes/twentyseventeen/comments.php index f93c09e..9488d61 100644 --- a/wp-content/themes/twentyseventeen/comments.php +++ b/wp-content/themes/twentyseventeen/comments.php @@ -5,7 +5,7 @@ * This is the template that displays the area of the page that contains both the current comments * and the comment form. * - * @link https://codex.wordpress.org/Template_Hierarchy + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package WordPress * @subpackage Twenty_Seventeen @@ -27,7 +27,8 @@ if ( post_password_required() ) { + if ( have_comments() ) : + ?>

100, - 'style' => 'ol', - 'short_ping' => true, - 'reply_text' => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ), - ) ); + wp_list_comments( + array( + 'avatar_size' => 100, + 'style' => 'ol', + 'short_ping' => true, + 'reply_text' => twentyseventeen_get_svg( array( 'icon' => 'mail-reply' ) ) . __( 'Reply', 'twentyseventeen' ), + ) + ); ?> - twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . __( 'Previous', 'twentyseventeen' ) . '', - 'next_text' => '' . __( 'Next', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), - ) ); + twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . __( 'Previous', 'twentyseventeen' ) . '', + 'next_text' => '' . __( 'Next', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), + ) + ); endif; // Check for have_comments(). // If comments are closed and there are comments, let's leave a little note, shall we? - if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?> + if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : + ?>

- + if ( has_nav_menu( 'social' ) ) : + ?> - diff --git a/wp-content/themes/twentyseventeen/front-page.php b/wp-content/themes/twentyseventeen/front-page.php index bb593f6..86078ad 100644 --- a/wp-content/themes/twentyseventeen/front-page.php +++ b/wp-content/themes/twentyseventeen/front-page.php @@ -4,7 +4,7 @@ * * If the user has selected a static page for their homepage, this is what will * appear. - * Learn more: https://codex.wordpress.org/Template_Hierarchy + * Learn more: https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package WordPress * @subpackage Twenty_Seventeen @@ -17,14 +17,17 @@ get_header(); ?>
- + endif; + ?> twentyseventeen_front_page_section( null, $i ); } - endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here. ?> + endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here. + ?>
- __( 'Top Menu', 'twentyseventeen' ), - 'social' => __( 'Social Links Menu', 'twentyseventeen' ), - ) ); + register_nav_menus( + array( + 'top' => __( 'Top Menu', 'twentyseventeen' ), + 'social' => __( 'Social Links Menu', 'twentyseventeen' ), + ) + ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ - add_theme_support( 'html5', array( - 'comment-form', - 'comment-list', - 'gallery', - 'caption', - ) ); + add_theme_support( + 'html5', + array( + 'comment-form', + 'comment-list', + 'gallery', + 'caption', + ) + ); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ - add_theme_support( 'post-formats', array( - 'aside', - 'image', - 'video', - 'quote', - 'link', - 'gallery', - 'audio', - ) ); + add_theme_support( + 'post-formats', + array( + 'aside', + 'image', + 'video', + 'quote', + 'link', + 'gallery', + 'audio', + ) + ); // Add theme support for Custom Logo. - add_theme_support( 'custom-logo', array( - 'width' => 250, - 'height' => 250, - 'flex-width' => true, - ) ); + add_theme_support( + 'custom-logo', + array( + 'width' => 250, + 'height' => 250, + 'flex-width' => true, + ) + ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); @@ -103,13 +114,13 @@ function twentyseventeen_setup() { /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. - */ + */ add_editor_style( array( 'assets/css/editor-style.css', twentyseventeen_fonts_url() ) ); // Load regular editor styles into the new block-based editor. add_theme_support( 'editor-styles' ); - // Load default block styles. + // Load default block styles. add_theme_support( 'wp-block-styles' ); // Add support for responsive embeds. @@ -117,7 +128,7 @@ function twentyseventeen_setup() { // Define and register starter content to showcase the theme on new sites. $starter_content = array( - 'widgets' => array( + 'widgets' => array( // Place three core-defined widgets in the sidebar area. 'sidebar-1' => array( 'text_business_info', @@ -138,15 +149,15 @@ function twentyseventeen_setup() { ), // Specify the core-defined pages to create and add custom thumbnails to some of them. - 'posts' => array( + 'posts' => array( 'home', - 'about' => array( + 'about' => array( 'thumbnail' => '{{image-sandwich}}', ), - 'contact' => array( + 'contact' => array( 'thumbnail' => '{{image-espresso}}', ), - 'blog' => array( + 'blog' => array( 'thumbnail' => '{{image-coffee}}', ), 'homepage-section' => array( @@ -158,27 +169,27 @@ function twentyseventeen_setup() { 'attachments' => array( 'image-espresso' => array( 'post_title' => _x( 'Espresso', 'Theme starter content', 'twentyseventeen' ), - 'file' => 'assets/images/espresso.jpg', // URL relative to the template directory. + 'file' => 'assets/images/espresso.jpg', // URL relative to the template directory. ), 'image-sandwich' => array( 'post_title' => _x( 'Sandwich', 'Theme starter content', 'twentyseventeen' ), - 'file' => 'assets/images/sandwich.jpg', + 'file' => 'assets/images/sandwich.jpg', ), - 'image-coffee' => array( + 'image-coffee' => array( 'post_title' => _x( 'Coffee', 'Theme starter content', 'twentyseventeen' ), - 'file' => 'assets/images/coffee.jpg', + 'file' => 'assets/images/coffee.jpg', ), ), // Default to a static front page and assign the front and posts pages. - 'options' => array( - 'show_on_front' => 'page', - 'page_on_front' => '{{home}}', + 'options' => array( + 'show_on_front' => 'page', + 'page_on_front' => '{{home}}', 'page_for_posts' => '{{blog}}', ), // Set the front page section theme mods to the IDs of the core-registered pages. - 'theme_mods' => array( + 'theme_mods' => array( 'panel_1' => '{{homepage-section}}', 'panel_2' => '{{about}}', 'panel_3' => '{{blog}}', @@ -186,10 +197,10 @@ function twentyseventeen_setup() { ), // Set up nav menus for each of the two areas registered in the theme. - 'nav_menus' => array( + 'nav_menus' => array( // Assign a menu to the "top" location. - 'top' => array( - 'name' => __( 'Top Menu', 'twentyseventeen' ), + 'top' => array( + 'name' => __( 'Top Menu', 'twentyseventeen' ), 'items' => array( 'link_home', // Note that the core "home" page is actually a link in case a static front page is not used. 'page_about', @@ -200,7 +211,7 @@ function twentyseventeen_setup() { // Assign a menu to the "social" location. 'social' => array( - 'name' => __( 'Social Links Menu', 'twentyseventeen' ), + 'name' => __( 'Social Links Menu', 'twentyseventeen' ), 'items' => array( 'link_yelp', 'link_facebook', @@ -320,35 +331,41 @@ add_filter( 'wp_resource_hints', 'twentyseventeen_resource_hints', 10, 2 ); * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function twentyseventeen_widgets_init() { - register_sidebar( array( - 'name' => __( 'Blog Sidebar', 'twentyseventeen' ), - 'id' => 'sidebar-1', - 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'twentyseventeen' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); + register_sidebar( + array( + 'name' => __( 'Blog Sidebar', 'twentyseventeen' ), + 'id' => 'sidebar-1', + 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'twentyseventeen' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); - register_sidebar( array( - 'name' => __( 'Footer 1', 'twentyseventeen' ), - 'id' => 'sidebar-2', - 'description' => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); + register_sidebar( + array( + 'name' => __( 'Footer 1', 'twentyseventeen' ), + 'id' => 'sidebar-2', + 'description' => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); - register_sidebar( array( - 'name' => __( 'Footer 2', 'twentyseventeen' ), - 'id' => 'sidebar-3', - 'description' => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); + register_sidebar( + array( + 'name' => __( 'Footer 2', 'twentyseventeen' ), + 'id' => 'sidebar-3', + 'description' => __( 'Add widgets here to appear in your footer.', 'twentyseventeen' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); } add_action( 'widgets_init', 'twentyseventeen_widgets_init' ); @@ -366,7 +383,8 @@ function twentyseventeen_excerpt_more( $link ) { return $link; } - $link = sprintf( '', + $link = sprintf( + '', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ sprintf( __( 'Continue reading "%s"', 'twentyseventeen' ), get_the_title( get_the_ID() ) ) @@ -392,7 +410,7 @@ add_action( 'wp_head', 'twentyseventeen_javascript_detection', 0 ); */ function twentyseventeen_pingback_header() { if ( is_singular() && pings_open() ) { - printf( '' . "\n", get_bloginfo( 'pingback_url' ) ); + printf( '' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'twentyseventeen_pingback_header' ); @@ -407,15 +425,21 @@ function twentyseventeen_colors_css_wrap() { require_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) ); $hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) ); -?> - - twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ), + 'quote' => twentyseventeen_get_svg( array( 'icon' => 'quote-right' ) ), ); if ( has_nav_menu( 'top' ) ) { wp_enqueue_script( 'twentyseventeen-navigation', get_theme_file_uri( '/assets/js/navigation.js' ), array( 'jquery' ), '1.0', true ); - $twentyseventeen_l10n['expand'] = __( 'Expand child menu', 'twentyseventeen' ); - $twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' ); - $twentyseventeen_l10n['icon'] = twentyseventeen_get_svg( array( 'icon' => 'angle-down', 'fallback' => true ) ); + $twentyseventeen_l10n['expand'] = __( 'Expand child menu', 'twentyseventeen' ); + $twentyseventeen_l10n['collapse'] = __( 'Collapse child menu', 'twentyseventeen' ); + $twentyseventeen_l10n['icon'] = twentyseventeen_get_svg( + array( + 'icon' => 'angle-down', + 'fallback' => true, + ) + ); } wp_enqueue_script( 'twentyseventeen-global', get_theme_file_uri( '/assets/js/global.js' ), array( 'jquery' ), '1.0', true ); @@ -472,7 +501,7 @@ function twentyseventeen_scripts() { add_action( 'wp_enqueue_scripts', 'twentyseventeen_scripts' ); /** - * Enqueue styles for the block-based editor. + * Enqueues styles for the block-based editor. * * @since Twenty Seventeen 1.8 */ @@ -504,7 +533,7 @@ function twentyseventeen_content_image_sizes_attr( $sizes, $size ) { if ( is_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) { if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) { - $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; + $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; } } @@ -564,7 +593,7 @@ add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnai function twentyseventeen_front_page_template( $template ) { return is_home() ? '' : $template; } -add_filter( 'frontpage_template', 'twentyseventeen_front_page_template' ); +add_filter( 'frontpage_template', 'twentyseventeen_front_page_template' ); /** * Modifies tag cloud widget arguments to display all tags in the same font size diff --git a/wp-content/themes/twentyseventeen/header.php b/wp-content/themes/twentyseventeen/header.php index 27148be..0ac11c3 100644 --- a/wp-content/themes/twentyseventeen/header.php +++ b/wp-content/themes/twentyseventeen/header.php @@ -23,6 +23,7 @@ > +
diff --git a/wp-content/themes/twentyseventeen/inc/back-compat.php b/wp-content/themes/twentyseventeen/inc/back-compat.php index 4772f56..3bb3ccf 100644 --- a/wp-content/themes/twentyseventeen/inc/back-compat.php +++ b/wp-content/themes/twentyseventeen/inc/back-compat.php @@ -48,9 +48,13 @@ function twentyseventeen_upgrade_notice() { * @global string $wp_version WordPress version. */ function twentyseventeen_customize() { - wp_die( sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ), '', array( - 'back_link' => true, - ) ); + wp_die( + sprintf( __( 'Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentyseventeen' ), $GLOBALS['wp_version'] ), + '', + array( + 'back_link' => true, + ) + ); } add_action( 'load-customize.php', 'twentyseventeen_customize' ); diff --git a/wp-content/themes/twentyseventeen/inc/color-patterns.php b/wp-content/themes/twentyseventeen/inc/color-patterns.php index 3f1ecdd..cfd243f 100644 --- a/wp-content/themes/twentyseventeen/inc/color-patterns.php +++ b/wp-content/themes/twentyseventeen/inc/color-patterns.php @@ -20,10 +20,10 @@ function twentyseventeen_custom_colors_css() { * * @param int $saturation Color saturation level. */ - $saturation = absint( apply_filters( 'twentyseventeen_custom_colors_saturation', 50 ) ); + $saturation = absint( apply_filters( 'twentyseventeen_custom_colors_saturation', 50 ) ); $reduced_saturation = ( .8 * $saturation ) . '%'; - $saturation = $saturation . '%'; - $css = ' + $saturation = $saturation . '%'; + $css = ' /** * Twenty Seventeen: Color Patterns * @@ -307,7 +307,7 @@ body.colors-custom, color: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */ } -.colors-custom button:hover, +.colors-custom button:hover:not( .mejs-container > button ), .colors-custom button:focus, .colors-custom input[type="button"]:hover, .colors-custom input[type="button"]:focus, diff --git a/wp-content/themes/twentyseventeen/inc/custom-header.php b/wp-content/themes/twentyseventeen/inc/custom-header.php index 6e19a7f..9e4f5e6 100644 --- a/wp-content/themes/twentyseventeen/inc/custom-header.php +++ b/wp-content/themes/twentyseventeen/inc/custom-header.php @@ -24,65 +24,73 @@ function twentyseventeen_custom_header_setup() { * @param array $args { * An array of custom-header support arguments. * - * @type string $default-image Default image of the header. - * @type string $default_text_color Default color of the header text. + * @type string $default-image Default image of the header. * @type int $width Width in pixels of the custom header image. Default 954. * @type int $height Height in pixels of the custom header image. Default 1300. + * @type string $flex-height Flex support for height of header. + * @type string $video Video support for header. * @type string $wp-head-callback Callback function used to styles the header image and text * displayed on the blog. - * @type string $flex-height Flex support for height of header. * } */ - add_theme_support( 'custom-header', apply_filters( 'twentyseventeen_custom_header_args', array( - 'default-image' => get_parent_theme_file_uri( '/assets/images/header.jpg' ), - 'width' => 2000, - 'height' => 1200, - 'flex-height' => true, - 'video' => true, - 'wp-head-callback' => 'twentyseventeen_header_style', - ) ) ); + add_theme_support( + 'custom-header', + apply_filters( + 'twentyseventeen_custom_header_args', + array( + 'default-image' => get_parent_theme_file_uri( '/assets/images/header.jpg' ), + 'width' => 2000, + 'height' => 1200, + 'flex-height' => true, + 'video' => true, + 'wp-head-callback' => 'twentyseventeen_header_style', + ) + ) + ); - register_default_headers( array( - 'default-image' => array( - 'url' => '%s/assets/images/header.jpg', - 'thumbnail_url' => '%s/assets/images/header.jpg', - 'description' => __( 'Default Header Image', 'twentyseventeen' ), - ), - ) ); + register_default_headers( + array( + 'default-image' => array( + 'url' => '%s/assets/images/header.jpg', + 'thumbnail_url' => '%s/assets/images/header.jpg', + 'description' => __( 'Default Header Image', 'twentyseventeen' ), + ), + ) + ); } add_action( 'after_setup_theme', 'twentyseventeen_custom_header_setup' ); if ( ! function_exists( 'twentyseventeen_header_style' ) ) : -/** - * Styles the header image and text displayed on the blog. - * - * @see twentyseventeen_custom_header_setup(). - */ -function twentyseventeen_header_style() { - $header_text_color = get_header_textcolor(); + /** + * Styles the header image and text displayed on the blog. + * + * @see twentyseventeen_custom_header_setup(). + */ + function twentyseventeen_header_style() { + $header_text_color = get_header_textcolor(); - // If no custom options for text are set, let's bail. - // get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value. - if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { - return; - } + // If no custom options for text are set, let's bail. + // get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value. + if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { + return; + } - // If we get this far, we have custom styles. Let's do this. - ?> - - ' . __( 'Play background video', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'play' ) ); + $settings['l10n']['play'] = '' . __( 'Play background video', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'play' ) ); $settings['l10n']['pause'] = '' . __( 'Pause background video', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'pause' ) ); return $settings; } diff --git a/wp-content/themes/twentyseventeen/inc/customizer.php b/wp-content/themes/twentyseventeen/inc/customizer.php index bc6bbea..1dbfb95 100644 --- a/wp-content/themes/twentyseventeen/inc/customizer.php +++ b/wp-content/themes/twentyseventeen/inc/customizer.php @@ -13,77 +13,107 @@ * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function twentyseventeen_customize_register( $wp_customize ) { - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; - $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; - $wp_customize->selective_refresh->add_partial( 'blogname', array( - 'selector' => '.site-title a', - 'render_callback' => 'twentyseventeen_customize_partial_blogname', - ) ); - $wp_customize->selective_refresh->add_partial( 'blogdescription', array( - 'selector' => '.site-description', - 'render_callback' => 'twentyseventeen_customize_partial_blogdescription', - ) ); + $wp_customize->selective_refresh->add_partial( + 'blogname', + array( + 'selector' => '.site-title a', + 'render_callback' => 'twentyseventeen_customize_partial_blogname', + ) + ); + $wp_customize->selective_refresh->add_partial( + 'blogdescription', + array( + 'selector' => '.site-description', + 'render_callback' => 'twentyseventeen_customize_partial_blogdescription', + ) + ); /** * Custom colors. */ - $wp_customize->add_setting( 'colorscheme', array( - 'default' => 'light', - 'transport' => 'postMessage', - 'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme', - ) ); + $wp_customize->add_setting( + 'colorscheme', + array( + 'default' => 'light', + 'transport' => 'postMessage', + 'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme', + ) + ); - $wp_customize->add_setting( 'colorscheme_hue', array( - 'default' => 250, - 'transport' => 'postMessage', - 'sanitize_callback' => 'absint', // The hue is stored as a positive integer. - ) ); + $wp_customize->add_setting( + 'colorscheme_hue', + array( + 'default' => 250, + 'transport' => 'postMessage', + 'sanitize_callback' => 'absint', // The hue is stored as a positive integer. + ) + ); - $wp_customize->add_control( 'colorscheme', array( - 'type' => 'radio', - 'label' => __( 'Color Scheme', 'twentyseventeen' ), - 'choices' => array( - 'light' => __( 'Light', 'twentyseventeen' ), - 'dark' => __( 'Dark', 'twentyseventeen' ), - 'custom' => __( 'Custom', 'twentyseventeen' ), - ), - 'section' => 'colors', - 'priority' => 5, - ) ); + $wp_customize->add_control( + 'colorscheme', + array( + 'type' => 'radio', + 'label' => __( 'Color Scheme', 'twentyseventeen' ), + 'choices' => array( + 'light' => __( 'Light', 'twentyseventeen' ), + 'dark' => __( 'Dark', 'twentyseventeen' ), + 'custom' => __( 'Custom', 'twentyseventeen' ), + ), + 'section' => 'colors', + 'priority' => 5, + ) + ); - $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'colorscheme_hue', array( - 'mode' => 'hue', - 'section' => 'colors', - 'priority' => 6, - ) ) ); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'colorscheme_hue', + array( + 'mode' => 'hue', + 'section' => 'colors', + 'priority' => 6, + ) + ) + ); /** * Theme options. */ - $wp_customize->add_section( 'theme_options', array( - 'title' => __( 'Theme Options', 'twentyseventeen' ), - 'priority' => 130, // Before Additional CSS. - ) ); + $wp_customize->add_section( + 'theme_options', + array( + 'title' => __( 'Theme Options', 'twentyseventeen' ), + 'priority' => 130, // Before Additional CSS. + ) + ); - $wp_customize->add_setting( 'page_layout', array( - 'default' => 'two-column', - 'sanitize_callback' => 'twentyseventeen_sanitize_page_layout', - 'transport' => 'postMessage', - ) ); + $wp_customize->add_setting( + 'page_layout', + array( + 'default' => 'two-column', + 'sanitize_callback' => 'twentyseventeen_sanitize_page_layout', + 'transport' => 'postMessage', + ) + ); - $wp_customize->add_control( 'page_layout', array( - 'label' => __( 'Page Layout', 'twentyseventeen' ), - 'section' => 'theme_options', - 'type' => 'radio', - 'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ), - 'choices' => array( - 'one-column' => __( 'One Column', 'twentyseventeen' ), - 'two-column' => __( 'Two Column', 'twentyseventeen' ), - ), - 'active_callback' => 'twentyseventeen_is_view_with_layout_option', - ) ); + $wp_customize->add_control( + 'page_layout', + array( + 'label' => __( 'Page Layout', 'twentyseventeen' ), + 'section' => 'theme_options', + 'type' => 'radio', + 'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ), + 'choices' => array( + 'one-column' => __( 'One Column', 'twentyseventeen' ), + 'two-column' => __( 'Two Column', 'twentyseventeen' ), + ), + 'active_callback' => 'twentyseventeen_is_view_with_layout_option', + ) + ); /** * Filter number of front page sections in Twenty Seventeen. @@ -96,27 +126,36 @@ function twentyseventeen_customize_register( $wp_customize ) { // Create a setting and control for each of the sections available in the theme. for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) { - $wp_customize->add_setting( 'panel_' . $i, array( - 'default' => false, - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) ); + $wp_customize->add_setting( + 'panel_' . $i, + array( + 'default' => false, + 'sanitize_callback' => 'absint', + 'transport' => 'postMessage', + ) + ); - $wp_customize->add_control( 'panel_' . $i, array( - /* translators: %d is the front page section number */ - 'label' => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ), - 'description' => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ), - 'section' => 'theme_options', - 'type' => 'dropdown-pages', - 'allow_addition' => true, - 'active_callback' => 'twentyseventeen_is_static_front_page', - ) ); + $wp_customize->add_control( + 'panel_' . $i, + array( + /* translators: %d is the front page section number */ + 'label' => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ), + 'description' => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ), + 'section' => 'theme_options', + 'type' => 'dropdown-pages', + 'allow_addition' => true, + 'active_callback' => 'twentyseventeen_is_static_front_page', + ) + ); - $wp_customize->selective_refresh->add_partial( 'panel_' . $i, array( - 'selector' => '#panel' . $i, - 'render_callback' => 'twentyseventeen_front_page_section', - 'container_inclusive' => true, - ) ); + $wp_customize->selective_refresh->add_partial( + 'panel_' . $i, + array( + 'selector' => '#panel' . $i, + 'render_callback' => 'twentyseventeen_front_page_section', + 'container_inclusive' => true, + ) + ); } } add_action( 'customize_register', 'twentyseventeen_customize_register' ); diff --git a/wp-content/themes/twentyseventeen/inc/icon-functions.php b/wp-content/themes/twentyseventeen/inc/icon-functions.php index 0a3c513..2dee5f4 100644 --- a/wp-content/themes/twentyseventeen/inc/icon-functions.php +++ b/wp-content/themes/twentyseventeen/inc/icon-functions.php @@ -46,10 +46,10 @@ function twentyseventeen_get_svg( $args = array() ) { // Set defaults. $defaults = array( - 'icon' => '', - 'title' => '', - 'desc' => '', - 'fallback' => false, + 'icon' => '', + 'title' => '', + 'desc' => '', + 'fallback' => false, ); // Parse args. diff --git a/wp-content/themes/twentyseventeen/inc/template-functions.php b/wp-content/themes/twentyseventeen/inc/template-functions.php index 9ecbe56..b9e0d88 100644 --- a/wp-content/themes/twentyseventeen/inc/template-functions.php +++ b/wp-content/themes/twentyseventeen/inc/template-functions.php @@ -59,7 +59,7 @@ function twentyseventeen_body_classes( $classes ) { } // Get the colorscheme or the default if there isn't one. - $colors = twentyseventeen_sanitize_colorscheme( get_theme_mod( 'colorscheme', 'light' ) ); + $colors = twentyseventeen_sanitize_colorscheme( get_theme_mod( 'colorscheme', 'light' ) ); $classes[] = 'colors-' . $colors; return $classes; @@ -95,7 +95,7 @@ function twentyseventeen_panel_count() { } /** - * Checks to see if we're on the homepage or not. + * Checks to see if we're on the front page or not. */ function twentyseventeen_is_frontpage() { return ( is_front_page() && ! is_home() ); diff --git a/wp-content/themes/twentyseventeen/inc/template-tags.php b/wp-content/themes/twentyseventeen/inc/template-tags.php index a99230d..2c24e4e 100644 --- a/wp-content/themes/twentyseventeen/inc/template-tags.php +++ b/wp-content/themes/twentyseventeen/inc/template-tags.php @@ -10,83 +10,84 @@ */ if ( ! function_exists( 'twentyseventeen_posted_on' ) ) : -/** - * Prints HTML with meta information for the current post-date/time and author. - */ -function twentyseventeen_posted_on() { + /** + * Prints HTML with meta information for the current post-date/time and author. + */ + function twentyseventeen_posted_on() { - // Get the author name; wrap it in a link. - $byline = sprintf( - /* translators: %s: post author */ - __( 'by %s', 'twentyseventeen' ), - '' . get_the_author() . '' - ); + // Get the author name; wrap it in a link. + $byline = sprintf( + /* translators: %s: post author */ + __( 'by %s', 'twentyseventeen' ), + '' . get_the_author() . '' + ); - // Finally, let's write all of this to the page. - echo '' . twentyseventeen_time_link() . ''; -} + // Finally, let's write all of this to the page. + echo '' . twentyseventeen_time_link() . ''; + } endif; if ( ! function_exists( 'twentyseventeen_time_link' ) ) : -/** - * Gets a nicely formatted string for the published date. - */ -function twentyseventeen_time_link() { - $time_string = ''; - if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { - $time_string = ''; + /** + * Gets a nicely formatted string for the published date. + */ + function twentyseventeen_time_link() { + $time_string = ''; + if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { + $time_string = ''; + } + + $time_string = sprintf( + $time_string, + get_the_date( DATE_W3C ), + get_the_date(), + get_the_modified_date( DATE_W3C ), + get_the_modified_date() + ); + + // Wrap the time string in a link, and preface it with 'Posted on'. + return sprintf( + /* translators: %s: post date */ + __( 'Posted on %s', 'twentyseventeen' ), + '' . $time_string . '' + ); } - - $time_string = sprintf( $time_string, - get_the_date( DATE_W3C ), - get_the_date(), - get_the_modified_date( DATE_W3C ), - get_the_modified_date() - ); - - // Wrap the time string in a link, and preface it with 'Posted on'. - return sprintf( - /* translators: %s: post date */ - __( 'Posted on %s', 'twentyseventeen' ), - '' . $time_string . '' - ); -} endif; if ( ! function_exists( 'twentyseventeen_entry_footer' ) ) : -/** - * Prints HTML with meta information for the categories, tags and comments. - */ -function twentyseventeen_entry_footer() { + /** + * Prints HTML with meta information for the categories, tags and comments. + */ + function twentyseventeen_entry_footer() { - /* translators: used between list items, there is a space after the comma */ - $separate_meta = __( ', ', 'twentyseventeen' ); + /* translators: used between list items, there is a space after the comma */ + $separate_meta = __( ', ', 'twentyseventeen' ); - // Get Categories for posts. - $categories_list = get_the_category_list( $separate_meta ); + // Get Categories for posts. + $categories_list = get_the_category_list( $separate_meta ); - // Get Tags for posts. - $tags_list = get_the_tag_list( '', $separate_meta ); + // Get Tags for posts. + $tags_list = get_the_tag_list( '', $separate_meta ); - // We don't want to output .entry-footer if it will be empty, so make sure its not. - if ( ( ( twentyseventeen_categorized_blog() && $categories_list ) || $tags_list ) || get_edit_post_link() ) { + // We don't want to output .entry-footer if it will be empty, so make sure its not. + if ( ( ( twentyseventeen_categorized_blog() && $categories_list ) || $tags_list ) || get_edit_post_link() ) { - echo '
'; + echo '
'; if ( 'post' === get_post_type() ) { if ( ( $categories_list && twentyseventeen_categorized_blog() ) || $tags_list ) { echo ''; // Make sure there's more than one category before displaying. - if ( $categories_list && twentyseventeen_categorized_blog() ) { - echo '' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) . '' . __( 'Categories', 'twentyseventeen' ) . '' . $categories_list . ''; - } + if ( $categories_list && twentyseventeen_categorized_blog() ) { + echo '' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) . '' . __( 'Categories', 'twentyseventeen' ) . '' . $categories_list . ''; + } - if ( $tags_list && ! is_wp_error( $tags_list ) ) { - echo '' . twentyseventeen_get_svg( array( 'icon' => 'hashtag' ) ) . '' . __( 'Tags', 'twentyseventeen' ) . '' . $tags_list . ''; - } + if ( $tags_list && ! is_wp_error( $tags_list ) ) { + echo '' . twentyseventeen_get_svg( array( 'icon' => 'hashtag' ) ) . '' . __( 'Tags', 'twentyseventeen' ) . '' . $tags_list . ''; + } echo ''; } @@ -94,32 +95,32 @@ function twentyseventeen_entry_footer() { twentyseventeen_edit_link(); - echo '
'; + echo '
'; + } } -} endif; if ( ! function_exists( 'twentyseventeen_edit_link' ) ) : -/** - * Returns an accessibility-friendly link to edit a post or page. - * - * This also gives us a little context about what exactly we're editing - * (post or page?) so that users understand a bit more where they are in terms - * of the template hierarchy and their content. Helpful when/if the single-page - * layout with multiple posts/pages shown gets confusing. - */ -function twentyseventeen_edit_link() { - edit_post_link( - sprintf( - /* translators: %s: Name of current post */ - __( 'Edit "%s"', 'twentyseventeen' ), - get_the_title() - ), - '', - '' - ); -} + /** + * Returns an accessibility-friendly link to edit a post or page. + * + * This also gives us a little context about what exactly we're editing + * (post or page?) so that users understand a bit more where they are in terms + * of the template hierarchy and their content. Helpful when/if the single-page + * layout with multiple posts/pages shown gets confusing. + */ + function twentyseventeen_edit_link() { + edit_post_link( + sprintf( + /* translators: %s: Name of current post */ + __( 'Edit "%s"', 'twentyseventeen' ), + get_the_title() + ), + '', + '' + ); + } endif; /** @@ -132,7 +133,7 @@ function twentyseventeen_front_page_section( $partial = null, $id = 0 ) { if ( is_a( $partial, 'WP_Customize_Partial' ) ) { // Find out the id and set it up during a selective refresh. global $twentyseventeencounter; - $id = str_replace( 'panel_', '', $partial->id ); + $id = str_replace( 'panel_', '', $partial->id ); $twentyseventeencounter = $id; } @@ -161,12 +162,14 @@ function twentyseventeen_categorized_blog() { if ( false === $category_count ) { // Create an array of all the categories that are attached to posts. - $categories = get_categories( array( - 'fields' => 'ids', - 'hide_empty' => 1, - // We only need to know if there is more than one category. - 'number' => 2, - ) ); + $categories = get_categories( + array( + 'fields' => 'ids', + 'hide_empty' => 1, + // We only need to know if there is more than one category. + 'number' => 2, + ) + ); // Count the number of categories that are attached to the posts. $category_count = count( $categories ); @@ -194,4 +197,22 @@ function twentyseventeen_category_transient_flusher() { delete_transient( 'twentyseventeen_categories' ); } add_action( 'edit_category', 'twentyseventeen_category_transient_flusher' ); -add_action( 'save_post', 'twentyseventeen_category_transient_flusher' ); +add_action( 'save_post', 'twentyseventeen_category_transient_flusher' ); + +if ( ! function_exists( 'wp_body_open' ) ) : + /** + * Fire the wp_body_open action. + * + * Added for backwards compatibility to support pre 5.2.0 WordPress versions. + * + * @since Twenty Seventeen 2.2 + */ + function wp_body_open() { + /** + * Triggered after the opening tag. + * + * @since Twenty Seventeen 2.2 + */ + do_action( 'wp_body_open' ); + } +endif; diff --git a/wp-content/themes/twentyseventeen/index.php b/wp-content/themes/twentyseventeen/index.php index 78d1b4c..36788a6 100644 --- a/wp-content/themes/twentyseventeen/index.php +++ b/wp-content/themes/twentyseventeen/index.php @@ -7,7 +7,7 @@ * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists. * - * @link https://codex.wordpress.org/Template_Hierarchy + * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ * * @package WordPress * @subpackage Twenty_Seventeen @@ -35,7 +35,8 @@ get_header(); ?> if ( have_posts() ) : /* Start the Loop */ - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); /* * Include the Post-Format-specific template for the content. @@ -46,11 +47,13 @@ get_header(); ?> endwhile; - the_posts_pagination( array( - 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . __( 'Previous page', 'twentyseventeen' ) . '', - 'next_text' => '' . __( 'Next page', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), - 'before_page_number' => '' . __( 'Page', 'twentyseventeen' ) . ' ', - ) ); + the_posts_pagination( + array( + 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . __( 'Previous page', 'twentyseventeen' ) . '', + 'next_text' => '' . __( 'Next page', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), + 'before_page_number' => '' . __( 'Page', 'twentyseventeen' ) . ' ', + ) + ); else : @@ -64,4 +67,5 @@ get_header(); ?>
-
- endwhile; // End of the loop. - the_posts_pagination( array( - 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . __( 'Previous page', 'twentyseventeen' ) . '', - 'next_text' => '' . __( 'Next page', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), - 'before_page_number' => '' . __( 'Page', 'twentyseventeen' ) . ' ', - ) ); + the_posts_pagination( + array( + 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . __( 'Previous page', 'twentyseventeen' ) . '', + 'next_text' => '' . __( 'Next page', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), + 'before_page_number' => '' . __( 'Page', 'twentyseventeen' ) . ' ', + ) + ); - else : ?> + else : + ?>

- comments_template(); endif; - the_post_navigation( array( - 'prev_text' => '' . __( 'Previous Post', 'twentyseventeen' ) . ' ' . twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '%title', - 'next_text' => '' . __( 'Next Post', 'twentyseventeen' ) . ' %title' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ) . '', - ) ); + the_post_navigation( + array( + 'prev_text' => '' . __( 'Previous Post', 'twentyseventeen' ) . ' ' . twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '%title', + 'next_text' => '' . __( 'Next Post', 'twentyseventeen' ) . ' %title' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ) . '', + ) + ); endwhile; // End of the loop. ?> @@ -40,4 +43,5 @@ get_header(); ?> - button ), button:focus, input[type="button"]:hover, input[type="button"]:focus, @@ -1646,6 +1646,7 @@ body.home.title-tagline-hidden.has-header-video .custom-logo-link img { body:not(.title-tagline-hidden) .site-branding-text { display: inline-block; + max-width: 100%; vertical-align: middle; } @@ -1748,7 +1749,6 @@ body:not(.title-tagline-hidden) .site-branding-text { @supports ( object-fit: cover ) { .has-header-image .custom-header-media img, .has-header-video .custom-header-media video, - .has-header-video .custom-header-media iframe, .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media img { height: 100%; left: 0; diff --git a/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php b/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php index 1a4c288..ea309d8 100644 --- a/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php +++ b/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php @@ -12,17 +12,20 @@ + is_active_sidebar( 'sidebar-3' ) ) : + ?>