Changeset 13966
- Timestamp:
- 08/13/2024 04:04:10 AM (2 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024
- Files:
-
- 2 edited
-
functions.php (modified) (4 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/functions.php
r13965 r13966 28 28 */ 29 29 add_action( 'after_setup_theme', __NAMESPACE__ . '\setup' ); 30 add_filter( 'wp_get_attachment_image_attributes', __NAMESPACE__ . '\eager_load_first_card_row _images', 10, 3 );30 add_filter( 'wp_get_attachment_image_attributes', __NAMESPACE__ . '\eager_load_first_card_rows_images', 10, 3 ); 31 31 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_assets' ); 32 32 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\maybe_enqueue_sensei_assets', 100 ); … … 140 140 141 141 /** 142 * Eagerly load the images for the first rowof cards, for performance (LCP metric).142 * Eagerly load the images for the first 2 rows of cards, for performance (LCP metric). 143 143 * 144 144 * @param array $attr The image attributes. … … 147 147 * @return array The modified image attributes. 148 148 */ 149 function eager_load_first_card_row _images( $attr, $attachment, $size ) {149 function eager_load_first_card_rows_images( $attr, $attachment, $size ) { 150 150 static $image_count = 0; 151 151 … … 153 153 $image_count++; 154 154 155 if ( $image_count <= 3) {155 if ( $image_count <= 6 ) { 156 156 $attr['loading'] = 'eager'; 157 157 $attr['fetchpriority'] = 'high'; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/style.css
r13965 r13966 5 5 * Author URI: http://wordpress.org/ 6 6 * Description: A theme for learn.wordpress.org, built in 2024. 7 * Version: 1.0.0- 82f8a227 * Version: 1.0.0-cfb2a66 8 8 * License: GNU General Public License v2 or later 9 9 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)