Changeset 3009 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-tags.php
- Timestamp:
- 04/26/2016 07:33:28 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-tags.php
r2986 r3009 1 1 <?php 2 namespace WordPressdotorg\Plugin_Directory\Theme; 3 use WordPressdotorg\Plugin_Directory\Template; 2 4 3 5 // Various Template tags … … 30 32 31 33 function wporg_plugins_download_link() { 32 $filename = sprintf( "%s.%s.zip", get_post()->post_name, wporg_plugins_the_version() ); 33 return esc_url( "https://downloads.wordpress.org/plugin/{$filename}" ); 34 } 35 36 function worg_plugins_template_active_installs( $full = true ) { 37 $count = WordPressdotorg\Plugin_Directory\Template::get_active_installs_count(); 38 39 if ( $count <= 10 ) { 40 $text = __( 'Less than 10', 'wporg-plugins' ); 41 } elseif ( $count >= 1000000 ) { 42 $text = __( '1+ million', 'wporg-plugins' ); 43 } else { 44 $text = number_format_i18n( $count ) . '+'; 45 } 46 return $full ? sprintf( __( '%s active installs', 'wporg-plugins' ), $text ) : $text; 34 return esc_url( sprintf( "https://downloads.wordpress.org/plugin/%s.%s.zip", get_post()->post_name, wporg_plugins_the_version() ) ); 47 35 } 48 36
Note: See TracChangeset
for help on using the changeset viewer.