Making WordPress.org

Changeset 13966


Ignore:
Timestamp:
08/13/2024 04:04:10 AM (2 years ago)
Author:
adamwood
Message:

Learn: Sync with git WordPress/learn@6254c9a

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/functions.php

    r13965 r13966  
    2828 */
    2929add_action( 'after_setup_theme', __NAMESPACE__ . '\setup' );
    30 add_filter( 'wp_get_attachment_image_attributes', __NAMESPACE__ . '\eager_load_first_card_row_images', 10, 3 );
     30add_filter( 'wp_get_attachment_image_attributes', __NAMESPACE__ . '\eager_load_first_card_rows_images', 10, 3 );
    3131add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_assets' );
    3232add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\maybe_enqueue_sensei_assets', 100 );
     
    140140
    141141/**
    142  * Eagerly load the images for the first row of cards, for performance (LCP metric).
     142 * Eagerly load the images for the first 2 rows of cards, for performance (LCP metric).
    143143 *
    144144 * @param array   $attr       The image attributes.
     
    147147 * @return array The modified image attributes.
    148148 */
    149 function eager_load_first_card_row_images( $attr, $attachment, $size ) {
     149function eager_load_first_card_rows_images( $attr, $attachment, $size ) {
    150150        static $image_count = 0;
    151151
     
    153153                $image_count++;
    154154
    155                 if ( $image_count <= 3 ) {
     155                if ( $image_count <= 6 ) {
    156156                        $attr['loading'] = 'eager';
    157157                        $attr['fetchpriority'] = 'high';
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2024/style.css

    r13965 r13966  
    55 * Author URI: http://wordpress.org/
    66 * Description: A theme for learn.wordpress.org, built in 2024.
    7  * Version: 1.0.0-82f8a22
     7 * Version: 1.0.0-cfb2a66
    88 * License: GNU General Public License v2 or later
    99 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.