Changeset 46551
- Timestamp:
- 10/15/2019 06:45:02 PM (5 years ago)
- Location:
- trunk/src/wp-content/themes/twentytwenty
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/.stylelintrc.json
r46271 r46551 1 1 { 2 "extends": "stylelint-config-wordpress", 2 "extends": [ 3 "stylelint-config-wordpress" 4 ], 5 "plugins": ["stylelint-a11y"], 3 6 "rules": { 4 7 "font-family-no-missing-generic-family-keyword": null, 5 "no-descending-specificity": null 8 "no-descending-specificity": null, 9 "a11y/no-outline-none": true, 10 "a11y/selector-pseudo-class-focus": true 6 11 } 7 12 } -
trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css
r46446 r46551 58 58 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 59 59 font-style: normal; 60 src: url(../fonts/inter/Inter-upright .var.woff2) format("woff2");60 src: url(../fonts/inter/Inter-upright-var.woff2) format("woff2"); 61 61 } 62 62 … … 65 65 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 66 66 font-style: italic; 67 src: url(../fonts/inter/Inter-italic .var.woff2) format("woff2");67 src: url(../fonts/inter/Inter-italic-var.woff2) format("woff2"); 68 68 } 69 69 -
trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css
r46446 r46551 58 58 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 59 59 font-style: normal; 60 src: url(../fonts/inter/Inter-upright .var.woff2) format("woff2");60 src: url(../fonts/inter/Inter-upright-var.woff2) format("woff2"); 61 61 } 62 62 … … 65 65 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 66 66 font-style: italic; 67 src: url(../fonts/inter/Inter-italic .var.woff2) format("woff2");67 src: url(../fonts/inter/Inter-italic-var.woff2) format("woff2"); 68 68 } 69 69 -
trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-classic-rtl.css
r46446 r46551 31 31 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 32 32 font-style: normal; 33 src: url(../fonts/inter/Inter-upright .var.woff2) format("woff2");33 src: url(../fonts/inter/Inter-upright-var.woff2) format("woff2"); 34 34 } 35 35 … … 38 38 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 39 39 font-style: italic; 40 src: url(../fonts/inter/Inter-italic .var.woff2) format("woff2");40 src: url(../fonts/inter/Inter-italic-var.woff2) format("woff2"); 41 41 } 42 42 -
trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-classic.css
r46446 r46551 31 31 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 32 32 font-style: normal; 33 src: url(../fonts/inter/Inter-upright .var.woff2) format("woff2");33 src: url(../fonts/inter/Inter-upright-var.woff2) format("woff2"); 34 34 } 35 35 … … 38 38 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 39 39 font-style: italic; 40 src: url(../fonts/inter/Inter-italic .var.woff2) format("woff2");40 src: url(../fonts/inter/Inter-italic-var.woff2) format("woff2"); 41 41 } 42 42 -
trunk/src/wp-content/themes/twentytwenty/assets/js/index.js
r46447 r46551 93 93 // Handle cover modals when they're toggled 94 94 onToggle: function() { 95 document.querySelector( '.cover-modal' ).addEventListener( 'toggled', function( event ) { 96 var modal, body; 97 98 modal = event.target; 99 body = document.body; 100 101 if ( modal.classList.contains( 'active' ) ) { 102 body.classList.add( 'showing-modal' ); 103 } else { 104 body.classList.remove( 'showing-modal' ); 105 body.classList.add( 'hiding-modal' ); 106 107 // Remove the hiding class after a delay, when animations have been run 108 setTimeout( function() { 109 body.classList.remove( 'hiding-modal' ); 110 }, 500 ); 111 } 95 document.querySelectorAll( '.cover-modal' ).forEach( function( element ) { 96 element.addEventListener( 'toggled', function( event ) { 97 var modal, body; 98 99 modal = event.target; 100 body = document.body; 101 102 if ( modal.classList.contains( 'active' ) ) { 103 body.classList.add( 'showing-modal' ); 104 } else { 105 body.classList.remove( 'showing-modal' ); 106 body.classList.add( 'hiding-modal' ); 107 108 // Remove the hiding class after a delay, when animations have been run 109 setTimeout( function() { 110 body.classList.remove( 'hiding-modal' ); 111 }, 500 ); 112 } 113 } ); 112 114 } ); 113 115 }, … … 414 416 // If the current menu item is in a sub level, expand all the levels higher up on load 415 417 this.expandLevel(); 416 this. goBackToCloseButton();418 this.keepFocusInModal(); 417 419 }, 418 420 … … 434 436 }, 435 437 436 // If the current menu item is the last one, return to close button when tab 437 goBackToCloseButton: function() { 438 document.addEventListener( 'keydown', function( event ) { 439 var closeMenuButton, mobileMenu, isDesktop, menuLinks, firstLevelmenuLinks, lastMenuLinkToggleButton, lastToogleSubMenuLinkNotOpened, lastMenuLinkHasSubClosedMenu, socialLinks, hasSocialMenu, lastModalMenuItems, focusedElementParentLi, focusedElementIsInsideModal, lastMenuItem, isFirstModalItem, isLastModalItem; 440 441 closeMenuButton = document.querySelector( '.toggle.close-nav-toggle' ); 442 mobileMenu = document.querySelector( '.mobile-menu' ); 443 444 if ( mobileMenu ) { 445 return false; 446 } 447 448 isDesktop = window.getComputedStyle( mobileMenu, null ).getPropertyValue( 'display' ) === 'none'; 449 450 menuLinks = isDesktop ? 451 document.querySelectorAll( '.menu-modal .expanded-menu .modal-menu li' ) : 452 document.querySelectorAll( '.menu-modal .mobile-menu .modal-menu li' ); 453 454 firstLevelmenuLinks = isDesktop ? 455 document.querySelectorAll( '.menu-modal .expanded-menu .modal-menu > li' ) : 456 document.querySelectorAll( '.menu-modal .mobile-menu .modal-menu > li' ); 457 458 if ( firstLevelmenuLinks ) { 459 return false; 460 } 461 462 lastMenuLinkToggleButton = firstLevelmenuLinks[firstLevelmenuLinks.length - 1].querySelector( '.sub-menu-toggle' ) || undefined; 463 lastMenuLinkHasSubClosedMenu = lastMenuLinkToggleButton && ! lastMenuLinkToggleButton.classList.contains( 'active' ); 464 465 lastToogleSubMenuLinkNotOpened = isDesktop ? 466 document.querySelector( '.menu-modal .expanded-menu .modal-menu .sub-menu .sub-menu-toggle:not(.active)' ) : 467 document.querySelector( '.menu-modal .mobile-menu .sub-menu .sub-menu-toggle:not(.active)' ); 468 469 socialLinks = document.querySelectorAll( '.menu-modal .social-menu li' ); 470 hasSocialMenu = document.querySelectorAll( '.menu-modal .social-menu' ).length > 0; 471 lastModalMenuItems = hasSocialMenu ? socialLinks : menuLinks; 472 focusedElementParentLi = twentytwentyFindParents( event.target, 'li' ); 473 focusedElementIsInsideModal = twentytwentyFindParents( event.target, '.menu-modal' ).length > 0; 474 475 lastMenuItem = lastModalMenuItems[lastModalMenuItems.length - 1]; 476 477 isFirstModalItem = event.target === closeMenuButton; 478 479 isLastModalItem = focusedElementIsInsideModal && focusedElementParentLi[0] ? 480 focusedElementParentLi[0].className === lastMenuItem.className : 481 undefined; 482 483 if ( lastMenuLinkToggleButton && lastMenuLinkHasSubClosedMenu && ! hasSocialMenu ) { // Last 1st level item has submenu and is closed 484 isLastModalItem = event.target === lastMenuLinkToggleButton; 485 lastMenuItem = lastMenuLinkToggleButton; 486 } 487 if ( lastMenuLinkToggleButton && ! lastMenuLinkHasSubClosedMenu && ! hasSocialMenu ) { // Last 1st level item has submenu is opened 488 isLastModalItem = event.target === lastToogleSubMenuLinkNotOpened || event.target === menuLinks[menuLinks.length - 1].querySelector( 'a' ); 489 lastMenuItem = lastToogleSubMenuLinkNotOpened || menuLinks[menuLinks.length - 1].querySelector( 'a' ); 490 } 491 492 if ( ! event.shiftKey && event.key === 'Tab' && isLastModalItem ) { 493 // Forward 494 event.preventDefault(); 495 closeMenuButton.focus(); 496 } 497 if ( event.shiftKey && event.key === 'Tab' && isFirstModalItem ) { 498 // Backward 499 event.preventDefault(); 500 if ( lastMenuItem.querySelector( 'a' ) ) { 501 lastMenuItem.querySelector( 'a' ).focus(); 502 } else { 503 lastMenuItem.focus(); 438 keepFocusInModal: function() { 439 var _doc = document; 440 441 _doc.addEventListener( 'keydown', function( event ) { 442 var clickedEl = twentytwenty.toggles.clickedEl, 443 toggleTarget, modal, selectors, elements, menuType, bottomMenu, activeEl, lastEl, firstEl, tabKey, shiftKey; 444 445 if ( clickedEl && _doc.body.classList.contains( 'showing-modal' ) ) { 446 toggleTarget = clickedEl.dataset.toggleTarget; 447 selectors = 'input, a, button'; 448 modal = _doc.querySelector( toggleTarget ); 449 450 elements = modal.querySelectorAll( selectors ); 451 elements = Array.prototype.slice.call( elements ); 452 453 if ( '.menu-modal' === toggleTarget ) { 454 menuType = window.matchMedia( '(min-width: 1000px)' ).matches; 455 menuType = menuType ? '.expanded-menu' : '.mobile-menu'; 456 457 elements = elements.filter( function( element ) { 458 return null !== element.closest( menuType ) && null !== element.offsetParent; 459 } ); 460 461 elements.unshift( _doc.querySelector( '.close-nav-toggle' ) ); 462 463 bottomMenu = _doc.querySelector( '.menu-bottom > nav' ); 464 465 if ( bottomMenu ) { 466 bottomMenu.querySelectorAll( selectors ).forEach( function( element ) { 467 elements.push( element ); 468 } ); 469 } 470 } 471 472 lastEl = elements[ elements.length - 1 ]; 473 firstEl = elements[0]; 474 activeEl = _doc.activeElement; 475 tabKey = event.keyCode === 9; 476 shiftKey = event.shiftKey; 477 478 if ( ! shiftKey && tabKey && lastEl === activeEl ) { 479 event.preventDefault(); 480 firstEl.focus(); 481 } 482 483 if ( shiftKey && tabKey && firstEl === activeEl ) { 484 event.preventDefault(); 485 lastEl.focus(); 504 486 } 505 487 } … … 646 628 twentytwentyToggleAttribute( toggle, 'aria-expanded', 'true', 'false' ); 647 629 630 if ( self.clickedEl && -1 !== toggle.getAttribute( 'class' ).indexOf( 'close-' ) ) { 631 twentytwentyToggleAttribute( self.clickedEl, 'aria-expanded', 'true', 'false' ); 632 } 633 648 634 // Toggle body class 649 635 if ( toggle.dataset.toggleBodyClass ) { 650 _doc. querySelector( 'body' ).classList.toggle( toggle.dataset.toggleBodyClass );636 _doc.body.classList.toggle( toggle.dataset.toggleBodyClass ); 651 637 } 652 638 … … 778 764 falseVal = false; 779 765 } 780 if ( element [ attribute ]!== trueVal ) {766 if ( element.getAttribute( attribute ) !== trueVal ) { 781 767 element.setAttribute( attribute, trueVal ); 782 768 } else { -
trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php
r46446 r46551 26 26 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 27 27 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 28 29 /** 30 * Removes the background image section. 31 * The theme only supports the background color option. 32 */ 33 $wp_customize->remove_section( 'background_image' ); 28 34 29 35 $wp_customize->selective_refresh->add_partial( -
trunk/src/wp-content/themes/twentytwenty/functions.php
r46446 r46551 460 460 'name' => _x( 'Large', 'Name of the large font size in the block editor', 'twentytwenty' ), 461 461 'shortName' => _x( 'L', 'Short name of the large font size in the block editor.', 'twentytwenty' ), 462 'size' => 2 4,462 'size' => 26.25, 463 463 'slug' => 'large', 464 464 ), … … 481 481 482 482 add_action( 'after_setup_theme', 'twentytwenty_block_editor_settings' ); 483 484 /**485 * Read More Link486 * Overwrite default (more ...) tag487 */488 function twentytwenty_read_more_tag() {489 return sprintf(490 '<a href="%1$s" class="more-link faux-button">%2$s <span class="screen-reader-text">"%3$s"</span></a>',491 esc_url( get_permalink( get_the_ID() ) ),492 __( 'Continue reading', 'twentytwenty' ),493 esc_html( get_the_title( get_the_ID() ) )494 );495 }496 add_filter( 'the_content_more_link', 'twentytwenty_read_more_tag' );497 483 498 484 /** … … 648 634 ), 649 635 'background' => array( 650 'color' => array( '.social-icons a', ' .overlay-header .header-inner', 'body:not(.overlay-header) .primary-menu ul', '.header-footer-group button', '.header-footer-group .button', '.header-footer-group .faux-button', '.header-footer-group .wp-block-button:not(.is-style-outline) .wp-block-button__link', '.header-footer-group .wp-block-file__button', '.header-footer-group input[type="button"]', '.header-footer-group input[type="reset"]', '.header-footer-group input[type="submit"]' ),636 'color' => array( '.social-icons a', 'body:not(.overlay-header) .primary-menu ul', '.header-footer-group button', '.header-footer-group .button', '.header-footer-group .faux-button', '.header-footer-group .wp-block-button:not(.is-style-outline) .wp-block-button__link', '.header-footer-group .wp-block-file__button', '.header-footer-group input[type="button"]', '.header-footer-group input[type="reset"]', '.header-footer-group input[type="submit"]' ), 651 637 'background' => array( '#site-header', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal', '.menu-modal-inner', '.search-modal-inner', '.archive-header', '.singular .entry-header', '.singular .featured-media:before', '.wp-block-pullquote:before' ), 652 638 ), -
trunk/src/wp-content/themes/twentytwenty/header.php
r46446 r46551 122 122 } 123 123 124 $header_toggles_classes = ''; 124 if ( true === $enable_header_search || has_nav_menu( 'expanded' ) ) { 125 ?> 125 126 126 if ( ! has_nav_menu( 'expanded' ) && false === $enable_header_search ) { 127 $header_toggles_classes .= ' hide-on-desktop'; 128 } 129 ?> 130 131 <div class="header-toggles hide-no-js<?php echo $header_toggles_classes; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>"> 127 <div class="header-toggles hide-no-js"> 132 128 133 129 <?php 134 $nav_toggle_wrapper_classes = ''; 130 if ( has_nav_menu( 'expanded' ) ) { 131 ?> 135 132 136 // Add a class indicating whether the navigation toggle wrapper can be hidden on desktop. 137 if ( has_nav_menu( 'expanded' ) ) { 138 $nav_toggle_wrapper_classes .= ' has-expanded-menu'; 133 <div class="toggle-wrapper nav-toggle-wrapper has-expanded-menu"> 134 135 <button class="toggle nav-toggle desktop-nav-toggle" data-toggle-target=".menu-modal" data-toggle-body-class="showing-menu-modal" aria-expanded="false" data-set-focus=".close-nav-toggle"> 136 <span class="toggle-inner"> 137 <span class="toggle-text"><?php _e( 'Menu', 'twentytwenty' ); ?></span> 138 <span class="toggle-icon"> 139 <?php twentytwenty_the_theme_svg( 'ellipsis' ); ?> 140 </span> 141 </span> 142 </button><!-- .nav-toggle --> 143 144 </div><!-- .nav-toggle-wrapper --> 145 146 <?php 139 147 } 140 ?>141 148 142 <div class="toggle-wrapper nav-toggle-wrapper<?php echo $nav_toggle_wrapper_classes; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>">143 144 <button class="toggle nav-toggle desktop-nav-toggle" data-toggle-target=".menu-modal" data-toggle-body-class="showing-menu-modal" aria-expanded="false" data-set-focus=".close-nav-toggle">145 <span class="toggle-inner">146 <span class="toggle-text"><?php _e( 'Menu', 'twentytwenty' ); ?></span>147 <span class="toggle-icon">148 <?php twentytwenty_the_theme_svg( 'ellipsis' ); ?>149 </span>150 </span>151 </button><!-- .nav-toggle -->152 153 </div><!-- .nav-toggle-wrapper -->154 155 <?php156 149 if ( true === $enable_header_search ) { 157 150 ?> … … 172 165 ?> 173 166 174 </div><!-- .header-toggles --> 167 </div><!-- .header-toggles --> 168 <?php 169 } 170 ?> 175 171 176 172 </div><!-- .header-navigation-wrapper --> -
trunk/src/wp-content/themes/twentytwenty/style-rtl.css
r46446 r46551 258 258 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 259 259 font-style: normal; 260 src: url(./assets/fonts/inter/Inter-upright.var.woff2) format("woff2"); 260 font-display: swap; 261 src: url(./assets/fonts/inter/Inter-upright-var.woff2) format("woff2"); 261 262 } 262 263 … … 265 266 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 266 267 font-style: italic; 267 src: url(./assets/fonts/inter/Inter-italic.var.woff2) format("woff2"); 268 font-display: swap; 269 src: url(./assets/fonts/inter/Inter-italic-var.woff2) format("woff2"); 268 270 } 269 271 … … 535 537 border-color: #cd2653; 536 538 border-style: solid; 537 border-width: 0 0 .2rem 0 0;539 border-width: 0 0 0 0.2rem; 538 540 color: inherit; 539 541 font-size: 1em; 540 542 margin: 4rem 0; 541 padding: 0.5rem 2rem 0.5rem 0;543 padding: 0.5rem 0 0.5rem 2rem; 542 544 } 543 545 … … 1561 1563 1562 1564 .primary-menu a:hover, 1563 .primary-menu a:focus { 1565 .primary-menu a:focus, 1566 .primary-menu .current_page_ancestor { 1564 1567 text-decoration: underline; 1565 1568 } … … 1667 1670 .primary-menu ul ul::after { 1668 1671 border-bottom-color: transparent; 1669 border- right-color: #000;1672 border-left-color: #000; 1670 1673 bottom: auto; 1671 1674 left: -1.6rem; … … 1673 1676 } 1674 1677 1678 .rtl .primary-menu ul ul::after { 1679 transform: rotate(-180deg); 1680 } 1675 1681 1676 1682 /* -------------------------------------------------------------------------- */ … … 1801 1807 .modal-menu a:focus, 1802 1808 .modal-menu a:hover, 1803 .modal-menu li.current-menu-item > .ancestor-wrapper > a { 1809 .modal-menu li.current-menu-item > .ancestor-wrapper > a, 1810 .modal-menu li.current_page_ancestor > .ancestor-wrapper > a { 1804 1811 text-decoration: underline; 1805 1812 } … … 2614 2621 2615 2622 .has-text-align-left { 2616 text-align: right;2623 text-align: left; 2617 2624 } 2618 2625 … … 3172 3179 3173 3180 .wp-block-quote[style="text-align:right"] { 3174 border-width: 0 0 0 0.2rem;3175 padding: 0 0 0 2rem;3181 border-width: 0 0.2rem 0 0; 3182 padding: 0 2rem 0 0; 3176 3183 } 3177 3184 … … 4013 4020 /* Widget: RSS ------------------------------- */ 4014 4021 4015 .widget_rss a.rsswidget:first-of-type {4022 .widget_rss .widget-title a.rsswidget:first-of-type { 4016 4023 display: none; 4017 4024 } … … 4993 5000 } 4994 5001 5002 .alignleft { 5003 margin: 0.3rem 0 2rem 2rem; 5004 } 5005 5006 .alignright { 5007 margin: 0.3rem 2rem 2rem 0; 5008 } 5009 4995 5010 .alignwide, 4996 5011 .alignfull { -
trunk/src/wp-content/themes/twentytwenty/style.css
r46446 r46551 258 258 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 259 259 font-style: normal; 260 src: url(./assets/fonts/inter/Inter-upright.var.woff2) format("woff2"); 260 font-display: swap; 261 src: url(./assets/fonts/inter/Inter-upright-var.woff2) format("woff2"); 261 262 } 262 263 … … 265 266 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 266 267 font-style: italic; 267 src: url(./assets/fonts/inter/Inter-italic.var.woff2) format("woff2"); 268 font-display: swap; 269 src: url(./assets/fonts/inter/Inter-italic-var.woff2) format("woff2"); 268 270 } 269 271 … … 535 537 border-color: #cd2653; 536 538 border-style: solid; 539 540 /*rtl:ignore*/ 537 541 border-width: 0 0 0 0.2rem; 538 542 color: inherit; 539 543 font-size: 1em; 540 544 margin: 4rem 0; 545 546 /*rtl:ignore*/ 541 547 padding: 0.5rem 0 0.5rem 2rem; 542 548 } … … 1563 1569 1564 1570 .primary-menu a:hover, 1565 .primary-menu a:focus { 1571 .primary-menu a:focus, 1572 .primary-menu .current_page_ancestor { 1566 1573 text-decoration: underline; 1567 1574 } … … 1669 1676 .primary-menu ul ul::after { 1670 1677 border-bottom-color: transparent; 1678 1679 /*rtl:ignore*/ 1671 1680 border-left-color: #000; 1672 1681 bottom: auto; … … 1675 1684 } 1676 1685 1686 .rtl .primary-menu ul ul::after { 1687 transform: rotate(180deg); 1688 } 1677 1689 1678 1690 /* -------------------------------------------------------------------------- */ … … 1803 1815 .modal-menu a:focus, 1804 1816 .modal-menu a:hover, 1805 .modal-menu li.current-menu-item > .ancestor-wrapper > a { 1817 .modal-menu li.current-menu-item > .ancestor-wrapper > a, 1818 .modal-menu li.current_page_ancestor > .ancestor-wrapper > a { 1806 1819 text-decoration: underline; 1807 1820 } … … 2616 2629 2617 2630 .has-text-align-left { 2631 2632 /*rtl:ignore*/ 2618 2633 text-align: left; 2619 2634 } … … 3174 3189 3175 3190 .wp-block-quote[style="text-align:right"] { 3191 3192 /*rtl:begin:ignore*/ 3176 3193 border-width: 0 0.2rem 0 0; 3177 3194 padding: 0 2rem 0 0; 3195 3196 /*rtl:end:ignore*/ 3178 3197 } 3179 3198 … … 4019 4038 /* Widget: RSS ------------------------------- */ 4020 4039 4021 .widget_rss a.rsswidget:first-of-type {4040 .widget_rss .widget-title a.rsswidget:first-of-type { 4022 4041 display: none; 4023 4042 } … … 5007 5026 } 5008 5027 5028 .alignleft { 5029 margin: 0.3rem 2rem 2rem 0; 5030 } 5031 5032 .alignright { 5033 margin: 0.3rem 0 2rem 2rem; 5034 } 5035 5009 5036 .alignwide, 5010 5037 .alignfull { -
trunk/src/wp-content/themes/twentytwenty/template-parts/content-cover.php
r46446 r46551 167 167 * or if there's a comment number – and check for password. 168 168 * */ 169 if ( ( 'post' === $post->post_type ||comments_open() || get_comments_number() ) && ! post_password_required() ) {169 if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) { 170 170 ?> 171 171 -
trunk/src/wp-content/themes/twentytwenty/template-parts/content.php
r46446 r46551 34 34 the_excerpt(); 35 35 } else { 36 the_content( );36 the_content( sprintf( '<span class="faux-button">%1$s</span> <span class="screen-reader-text">"%2$s"</span>', __( 'Continue reading', 'twentytwenty' ), get_the_title() ) ); 37 37 } 38 38 ?> … … 76 76 * or if there's a comment number – and check for password. 77 77 * */ 78 if ( ( 'post' === $post->post_type ||comments_open() || get_comments_number() ) && ! post_password_required() ) {78 if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) { 79 79 ?> 80 80 -
trunk/src/wp-content/themes/twentytwenty/template-parts/modal-search.php
r46446 r46551 23 23 ?> 24 24 25 <button class="toggle search-untoggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field">25 <button class="toggle search-untoggle close-search-toggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field"> 26 26 <span class="screen-reader-text"><?php _e( 'Close search', 'twentytwenty' ); ?></span> 27 27 <?php twentytwenty_the_theme_svg( 'cross' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.