Making WordPress.org


Ignore:
Timestamp:
07/02/2018 11:21:31 PM (7 years ago)
Author:
obenland
Message:

Main: Make releases page work with w.org

See #3673.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-releases.php

    r7184 r7357  
    1010namespace WordPressdotorg\MainTheme;
    1111
    12 $releases = $GLOBALS['rosetta']->rosetta->get_releases_breakdown();
     12if ( defined( 'IS_ROSETTA_NETWORK' ) && IS_ROSETTA_NETWORK ) {
     13    $releases = $GLOBALS['rosetta']->rosetta->get_releases_breakdown();
     14} else {
     15    $releases = \WordPressdotorg\Releases\get_breakdown();
     16}
    1317
    1418the_post();
     
    2226
    2327        <div class="entry-content">
     28            <p>
     29                <strong><?php esc_html_e( 'This is an archive of every release we’ve done that we have a record of.', 'wporg' ); ?></strong><br />
     30                <?php
     31                printf(
     32                    /* translators: Stable branch */
     33                    wp_kses_post( __( 'None of these are safe to use, except the <strong>latest</strong> in the %s series, which is actively maintained.', 'wporg' ) ),
     34                    esc_html( WP_CORE_STABLE_BRANCH )
     35                );
     36                ?>
     37            </p>
     38            <p>
     39                <?php
     40                printf(
     41                    /* translators: Roadmap URL */
     42                    wp_kses_post( __( 'Curious about which jazzers we highlighted for each release? <a href="%s">It’s on the roadmap</a>.', 'wporg' ) ),
     43                    esc_url( home_url( '/about/roadmap/' ) )
     44                );
     45                ?>
     46            </p>
     47
    2448            <?php
    2549            if ( ! empty( $releases ) ) :
     
    2852                    <h3 id="latest"><?php esc_html_e( 'Latest release', 'wporg' ); ?></h3>
    2953                    <table class="releases latest">
     54                        <col width="15%" />
     55                        <col width="25%" />
     56                        <col width="15%" />
     57                        <col width="15%" />
     58                        <col width="15%" />
    3059                        <?php release_row( $releases['latest'] ); ?>
    3160                    </table>
     
    4877                        </h3>
    4978                        <table class="releases">
     79                            <col width="15%" />
     80                            <col width="25%" />
     81                            <col width="15%" />
     82                            <col width="15%" />
     83                            <col width="15%" />
    5084                            <?php
    5185                            foreach ( $branch_release as $release ) :
     
    6195                    ?>
    6296                    <h3 id="betas"><?php esc_html_e( 'Beta &amp; RC releases', 'wporg' ); ?></h3>
     97                    <p><?php esc_html_e( 'These were testing releases and are only available here for archival purposes.', 'wporg' ); ?></p>
    6398                    <table id="beta" class="releases">
     99                        <col width="15%" />
     100                        <col width="25%" />
     101                        <col width="15%" />
     102                        <col width="15%" />
     103                        <col width="15%" />
    64104                        <?php
    65105                        foreach ( $releases['betas'] as $release ) :
     
    71111                    <?php
    72112                endif; // Any betas.
     113
     114                if ( ! empty( $releases['mu'] ) ) :
     115                    ?>
     116                    <h3 id="mu"><?php esc_html_e( 'MU releases', 'wporg' ); ?></h3>
     117                    <p><?php esc_html_e( 'WordPress MU releases made prior to MU being merged into WordPress 3.0', 'wporg' ); ?></p>
     118                    <table class="releases">
     119                        <col width="15%" />
     120                        <col width="30%" />
     121                        <col width="15%" />
     122                        <col width="15%" />
     123                        <col width="15%" />
     124                        <?php
     125                        foreach ( $releases['mu'] as $release ) :
     126                            release_row( $release );
     127                        endforeach;
     128                        ?>
     129                    </table>
     130
     131                    <?php
     132                endif; // Any MUs.
    73133            else : // No releases.
    74134                echo '<p>' . esc_html__( 'There are no releases, yet.', 'wporg' ) . '</p>';
Note: See TracChangeset for help on using the changeset viewer.