Making WordPress.org


Ignore:
Timestamp:
05/30/2019 05:42:25 AM (6 years ago)
Author:
dd32
Message:

Theme Directory: Expose the PHP & WordPress version requirements within wordpress.org/themes based on the data extracted from readme.txt.

Props flixos90 for initial work, dd32.
See #3718.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme-single.php

    r7996 r8895  
    3939                <div class="theme-meta-info">
    4040                    <p class="version">
    41                         <?php printf( __( 'Version: %s', 'wporg-themes' ), '<strong>' . $theme->version . '</strong>' ); ?>
     41                        <?php printf( __( 'Version: %s', 'wporg-themes' ), '<strong>' . esc_html( $theme->version ) . '</strong>' ); ?>
    4242                    </p>
    4343                    <p class="updated">
     
    5858                    ?>
    5959                    <p class="active_installs"><?php printf( __( 'Active Installations: %s', 'wporg-themes' ), '<strong>' . $active_installs . '</strong>' ); ?></p>
     60                    <?php if ( ! empty( $theme->requires ) ) { ?>
     61                    <p class="requires">
     62                        <?php printf( __( 'WordPress Version: %s', 'wporg-themes' ), '<strong>' . sprintf( __( '%s or higher', 'wporg-themes' ), esc_html( $theme->requires ) ) . '</strong>' ); ?>
     63                    </p>
     64                    <?php } ?>
     65                    <?php if ( ! empty( $theme->requires_php ) ) { ?>
     66                    <p class="requires_php">
     67                        <?php printf( __( 'PHP Version: %s', 'wporg-themes' ), '<strong>' . sprintf( __( '%s or higher', 'wporg-themes' ), esc_html( $theme->requires_php ) ) . '</strong>' ); ?>
     68                    </p>
     69                    <?php } ?>
    6070                    <?php if ( $theme->theme_url ) { ?>
    61                     <a href="<?php echo esc_url( $theme->theme_url ); ?>"><?php _e( 'Theme Homepage', 'wporg-themes' ); ?></a>
     71                    <p class="theme_homapge"><a href="<?php echo esc_url( $theme->theme_url ); ?>"><?php _e( 'Theme Homepage', 'wporg-themes' ); ?></a></p>
    6272                    <?php } ?>
    6373                </div>
Note: See TracChangeset for help on using the changeset viewer.