Changeset 9689 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-download.php
- Timestamp:
- 04/03/2020 01:45:43 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-download.php
r9538 r9689 47 47 48 48 $latest_release_version = WP_CORE_LATEST_RELEASE; 49 $latest_release_zip_ts = defined( 'WPORG_WP_RELEASES_PATH' ) ? filemtime( WPORG_WP_RELEASES_PATH . 'wordpress-' . WP_CORE_LATEST_RELEASE . '.zip' ) : time(); 49 50 $latest_release_zip_url = 'https://wordpress.org/latest.zip'; 50 51 $latest_release_targz_url = 'https://wordpress.org/latest.tar.gz'; … … 55 56 $locale = get_locale(); 56 57 $latest_release_version = $rosetta_release['version']; 58 $latest_release_zip_ts = $rosetta_release['builton']; 57 59 $latest_release_zip_url = home_url( "latest-{$locale}.zip" ); 58 60 $latest_release_targz_url = home_url( "latest-{$locale}.tar.gz" ); … … 63 65 add_filter( 'jetpack_images_pre_get_images', function() { 64 66 return new \WP_Error(); 67 } ); 68 69 // Add Schema.org structured data. 70 add_action( 'wp_head', function() use( $latest_release_version, $latest_release_zip_url, $latest_release_zip_ts ) { 71 $graph_tags = custom_open_graph_tags(); 72 $description = $graph_tags[ 'description' ] ?? ''; 73 ?> 74 <script type="application/ld+json"> 75 [ 76 { 77 "@context": "http://schema.org", 78 "@type": [ 79 "SoftwareApplication", 80 "Product" 81 ], 82 "name": "WordPress", 83 "operatingSystem": [ "Linux", "Windows", "Unix", "Apache", "NGINX" ], 84 "url": "<?php the_permalink(); ?>", 85 "description": <?php echo wp_json_encode( $description ); ?>, 86 "softwareVersion": <?php echo wp_json_encode( $latest_release_version ); ?>, 87 "fileFormat": "application/zip", 88 "downloadUrl": "<?php echo esc_url( $latest_release_zip_url ); ?>", 89 "dateModified": "<?php echo gmdate( 'Y-m-d\TH:i:s\+00:00', $latest_release_zip_ts ); ?>", 90 "applicationCategory": "WebApplication", 91 "offers": { 92 "@type": "Offer", 93 "url": "<?php the_permalink(); ?>", 94 "price": "0.00", 95 "priceCurrency": "USD", 96 "seller": { 97 "@type": "Organization", 98 "name": "WordPress.org", 99 "url": "https://wordpress.org" 100 } 101 } 102 } 103 ] 104 </script> 105 <?php 65 106 } ); 66 107
Note: See TracChangeset
for help on using the changeset viewer.