Changeset 7349 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/template-tags.php
- Timestamp:
- 06/29/2018 02:51:26 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/template-tags.php
r6277 r7349 33 33 * Retrieve the localised downloads link. 34 34 * 35 * Uses the 'txt-download' page if exists, falling back to the 'releases' page for older sites, and finally, the english downloads page. 35 * Uses the 'txt-download' page if exists, falling back to the 'releases' page for older sites, 36 * and finally, the english downloads page. 36 37 */ 37 38 function get_downloads_url() { … … 39 40 40 41 if ( is_null( $downloads_url ) ) { 41 $releases_page = get_page_by_path( 'txt-download' ); 42 $downloads_url = 'https://wordpress.org/downloads/'; 43 $downloads_page = get_page_by_path( 'txt-download' ); 42 44 43 if ( ! $ releases_page ) {44 $ releases_page = get_page_by_path( 'releases' );45 if ( ! $downloads_page ) { 46 $downloads_page = get_page_by_path( 'download' ); 45 47 } 46 48 47 if ( $releases_page ) {48 $downloads_ url = get_permalink( $releases_page);49 if ( ! $downloads_page ) { 50 $downloads_page = get_page_by_path( 'releases' ); 49 51 } 50 52 51 if ( ! $downloads_url) {52 $downloads_url = 'https://wordpress.org/downloads/';53 if ( $downloads_page ) { 54 $downloads_url = get_permalink( $downloads_page ); 53 55 } 54 56 }
Note: See TracChangeset
for help on using the changeset viewer.