Changeset 51320
- Timestamp:
- 07/02/2021 07:07:01 PM (3 years ago)
- Location:
- branches/5.8
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
-
branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js
r49575 r51320 1 1 /** 2 2 * Get luminance from a HEX color. 3 * 4 * @since Twenty Twenty-One 1.0 3 5 * 4 6 * @param {string} hex - The hex color. … … 13 15 /** 14 16 * Get RGB from HEX. 17 * 18 * @since Twenty Twenty-One 1.0 15 19 * 16 20 * @param {string} hex - The hex color. -
branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/palette-colorpicker.js
r49216 r51320 6 6 * Removed the hue picker script because we don't use it here 7 7 * Added the "palettes" argument in wpColorPicker(). 8 * 9 * @since Twenty Twenty-One 1.0 8 10 */ 9 11 wp.customize.controlConstructor['twenty-twenty-one-color'] = wp.customize.Control.extend( { -
branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/polyfills.js
r49320 r51320 7 7 /** 8 8 * Polyfill for Element.closest() because we need to support IE11. 9 * 10 * @since Twenty Twenty-One 1.0 9 11 * 10 12 * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest … … 30 32 * Polyfill for NodeList.foreach() because we need to support IE11. 31 33 * 34 * @since Twenty Twenty-One 1.0 35 * 32 36 * @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach 33 37 */ -
branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js
r51072 r51320 7 7 /** 8 8 * Toggle an attribute's value 9 * 10 * @since Twenty Twenty-One 1.0 9 11 * 10 12 * @param {Element} el - The element. 11 13 * @param {boolean} withListeners - Whether we want to add/remove listeners or not. 12 * @since Twenty Twenty-One 1.013 14 */ 14 15 function twentytwentyoneToggleAriaExpanded( el, withListeners ) { … … 38 39 * Changes the position of submenus so they always fit the screen horizontally. 39 40 * 41 * @since Twenty Twenty-One 1.0 42 * 40 43 * @param {Element} li - The li element. 41 44 */ … … 66 69 * Handle clicks on submenu toggles. 67 70 * 71 * @since Twenty Twenty-One 1.0 72 * 68 73 * @param {Element} el - The element. 69 74 */ … … 92 97 /** 93 98 * Menu Toggle Behaviors 99 * 100 * @since Twenty Twenty-One 1.0 94 101 * 95 102 * @param {string} id - The ID. … … 113 120 }; 114 121 } 122 115 123 /** 116 124 * Trap keyboard navigation in the menu modal. 117 * Adapted from TwentyTwenty 125 * Adapted from Twenty Twenty. 126 * 127 * @since Twenty Twenty-One 1.0 118 128 */ 119 129 document.addEventListener( 'keydown', function( event ) { … … 159 169 /** 160 170 * Close menu and scroll to anchor when an anchor link is clicked. 161 * Adapted from TwentyTwenty. 171 * Adapted from Twenty Twenty. 172 * 173 * @since Twenty Twenty-One 1.1 162 174 */ 163 175 document.addEventListener( 'click', function( event ) { -
branches/5.8/src/wp-content/themes/twentytwentyone/assets/js/skip-link-focus-fix.js
r49216 r51320 7 7 * 8 8 * Learn more: https://git.io/vWdr2 9 * 10 * @since Twenty Twenty-One 1.0 9 11 */ 10 12 ( function() { -
branches/5.8/src/wp-content/themes/twentytwentyone/functions.php
r49865 r51320 96 96 ); 97 97 98 /* *98 /* 99 99 * Add support for core custom logo. 100 100 * … … 486 486 * thus it does not warrant having an entire dedicated blocking script being loaded. 487 487 * 488 * @since Twenty Twenty-One 1.0 489 * 488 490 * @link https://git.io/vWdr2 489 491 */ … … 604 606 */ 605 607 function twentytwentyone_the_html_classes() { 608 /** 609 * Filters the classes for the main <html> element. 610 * 611 * @since Twenty Twenty-One 1.0 612 * 613 * @param string The list of classes. Default empty string. 614 */ 606 615 $classes = apply_filters( 'twentytwentyone_html_classes', '' ); 607 616 if ( ! $classes ) { -
branches/5.8/src/wp-content/themes/twentytwentyone/image.php
r50233 r51320 25 25 * Filter the default image attachment size. 26 26 * 27 * @param string $image_size Image size. Default 'large'. 27 * @since Twenty Twenty-One 1.0 28 * 29 * @param string $image_size Image size. Default 'full'. 28 30 */ 29 31 $image_size = apply_filters( 'twenty_twenty_one_attachment_size', 'full' ); -
branches/5.8/src/wp-content/themes/twentytwentyone/inc/menu-functions.php
r51319 r51320 55 55 * Displays SVG icons in the footer navigation. 56 56 * 57 * @since Twenty Twenty-One 1.0 58 * 57 59 * @param string $item_output The menu item's starting HTML output. 58 60 * @param WP_Post $item Menu item data object. -
branches/5.8/src/wp-content/themes/twentytwentyone/inc/template-functions.php
r51319 r51320 104 104 */ 105 105 function twenty_twenty_one_can_show_post_thumbnail() { 106 /** 107 * Filters whether post thumbnail can be displayed. 108 * 109 * @since Twenty Twenty-One 1.0 110 * 111 * @param bool $show_post_thumbnail Whether to show post thumbnail. 112 */ 106 113 return apply_filters( 107 114 'twenty_twenty_one_can_show_post_thumbnail', … … 122 129 123 130 /** 124 * Creates continue reading text 131 * Creates continue reading text. 132 * 133 * @since Twenty Twenty-One 1.0 125 134 */ 126 135 function twenty_twenty_one_continue_reading_text() { … … 135 144 136 145 /** 137 * Create the continue reading link for excerpt. 146 * Creates the continue reading link for excerpt. 147 * 148 * @since Twenty Twenty-One 1.0 138 149 */ 139 150 function twenty_twenty_one_continue_reading_link_excerpt() { … … 147 158 148 159 /** 149 * Create the continue reading link. 160 * Creates the continue reading link. 161 * 162 * @since Twenty Twenty-One 1.0 150 163 */ 151 164 function twenty_twenty_one_continue_reading_link() { … … 160 173 if ( ! function_exists( 'twenty_twenty_one_post_title' ) ) { 161 174 /** 162 * Add a title to posts and pages that are missing titles.175 * Adds a title to posts and pages that are missing titles. 163 176 * 164 177 * @since Twenty Twenty-One 1.0 … … 190 203 * Changes the default navigation arrows to svg icons 191 204 * 205 * @since Twenty Twenty-One 1.0 206 * 192 207 * @param string $calendar_output The generated HTML of the calendar. 193 208 * @return string … … 205 220 * Return CSS for non-latin language, if available, or null 206 221 * 207 * @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor". 222 * @since Twenty Twenty-One 1.0 223 * 224 * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor". 208 225 * @return string 209 226 */ … … 213 230 $locale = get_bloginfo( 'language' ); 214 231 215 // Define fallback fonts for non-latin languages. 232 /** 233 * Filters the fallback fonts for non-latin languages. 234 * 235 * @since Twenty Twenty-One 1.0 236 * 237 * @param array $font_family An array of locales and font families. 238 */ 216 239 $font_family = apply_filters( 217 240 'twenty_twenty_one_get_localized_font_family_types', … … 283 306 } 284 307 285 // Define elements to apply fallback fonts to. 308 /** 309 * Filters the elements to apply fallback fonts to. 310 * 311 * @since Twenty Twenty-One 1.0 312 * 313 * @param array $elements An array of elements for "front-end", "block-editor", or "classic-editor". 314 */ 286 315 $elements = apply_filters( 287 316 'twenty_twenty_one_get_localized_font_family_elements', … … 369 398 370 399 if ( $blocks_content ) { 400 /** This filter is documented in wp-includes/post-template.php */ 371 401 echo apply_filters( 'the_content', $blocks_content ); // phpcs:ignore WordPress.Security.EscapeOutput 372 402 return true;
Note: See TracChangeset
for help on using the changeset viewer.