Making WordPress.org

Ticket #5079: 5079.diff

File 5079.diff, 1.8 KB (added by dufresnesteven, 4 years ago)

TODO: I wasn't sure the best way to get the date modified. Anybody know how? Google Structured Data tool doesn't get upset without it, but i'm sure we should find a reliable way.

  • wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-download.php

    diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-download.php wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-download.php
    index 57233502a..067ee23be 100644
    add_filter( 'jetpack_images_pre_get_images', function() { 
    6868
    6969get_header();
    7070the_post();
     71
     72$graph_tags = custom_open_graph_tags();
     73$meta_description  = isset( $graph_tags[ 'description' ] ) ? $graph_tags[ 'description' ] : '';
     74$site_url = get_site_url();
    7175?>
     76
     77<script type="application/ld+json">
     78[
     79    {
     80        "@context": "http://schema.org",
     81        "@type": [
     82            "SoftwareApplication",
     83            "Product"
     84        ],
     85        "name": "WordPress",
     86        "operatingSystem": ["Linux","Windows","Unix","Apache","NGINX"],
     87        "url": "<?php echo $site_url; ?>/download/",
     88        "description": "<?php echo $meta_description; ?>",
     89        "softwareVersion": "<?php echo esc_attr( $latest_release_version ); ?>",
     90        "fileFormat": "application/zip",
     91        "downloadUrl": "<?php echo esc_url( $latest_release_zip_url ); ?>",
     92                "applicationCategory": "WebApplication",
     93        "offers": {
     94            "@type": "Offer",
     95            "url": "<?php echo $site_url; ?>/download/",
     96            "price": "0.00",
     97            "priceCurrency": "USD",
     98            "seller": {
     99                "@type": "Organization",
     100                "name": "WordPress.org",
     101                "url": "<?php echo $site_url; ?>"
     102            }
     103        }
     104    }
     105]
     106</script>
     107
    72108        <main id="main" class="site-main col-12" role="main">
    73109
    74110                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>