Making WordPress.org

Changeset 8042


Ignore:
Timestamp:
01/08/2019 05:00:14 AM (6 years ago)
Author:
dd32
Message:

WordPress Main Theme: Pull in the latest count of plugins on WordPress.org from a new constant rather than hard-coding it.

Props vaishalipanchal for original patch, dd32.
Fixes #3870.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/front-page.php

    r6967 r8042  
    100100                </ul>
    101101                <p>
    102                     <?php
    103                     /* translators: %s: Link to Plugin Directory. */
    104                     printf( __( 'Extend WordPress with over 45,000 plugins to help your website meet your needs. Add an online store, galleries, mailing lists, forums, analytics, and <a href="%s">much more</a>.', 'wporg' ), esc_url( home_url( '/plugins/' ) ) );
    105                     ?>
     102                <?php
     103                    $plugin_count = defined( 'WP_PLUGIN_COUNT' ) ? WP_PLUGIN_COUNT : 54000;
     104                    printf(
     105                        /* translators: 1: Rounded number of plugins. 2: Link to Plugin Directory. */
     106                        _n( 'Extend WordPress with over %1s plugin to help your website meet your needs. Add an online store, galleries, mailing lists, forums, analytics, and <a href="%2s">much more</a>.', 'Extend WordPress with over %1s plugins to help your website meet your needs. Add an online store, galleries, mailing lists, forums, analytics, and <a href="%2s">much more</a>.', $plugin_count, esc_url( home_url( '/plugins/' ) ), 'wporg' ),
     107                        esc_html( number_format_i18n( $plugin_count ) ),
     108                        esc_url( home_url( '/plugins/' ) )
     109                    );
     110                ?>
    106111                </p>
    107112            </section>
Note: See TracChangeset for help on using the changeset viewer.