WordPress.org

Making WordPress.org

Changeset 6091


Ignore:
Timestamp:
11/09/2017 12:23:30 AM (2 years ago)
Author:
obenland
Message:

Main: Implement release rows for release archive

This was still missing from the original Rosetta theme, causing a fatal error on the releases page.
Also moves this into a slug-based page template, so it doesn't require editing the page after switching themes.

See #2861.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main
Files:
2 added
1 deleted
1 edited
1 copied

Legend:

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

    r6063 r6091  
    4444}
    4545add_action( 'widgets_init', __NAMESPACE__ . '\widgets' );
     46
     47/**
     48 * Custom template tags.
     49 */
     50require_once get_stylesheet_directory() . '/inc/template-tags.php';
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-releases.php

    r6088 r6091  
    11<?php
    22/**
    3  * Template Name: Releases
     3 * Template for displaying a release archive page.
    44 *
    55 * @package WordPressdotorg\MainTheme
     
    2121            if ( ! empty( $releases ) ) :
    2222                if ( isset( $releases['latest'] ) ) :
    23                     rosetta_release_row( null, null, null, true );
     23                    release_row( [], '', '', true );
    2424                    ?>
    2525                    <h3 id="latest"><?php _e( 'Latest release', 'wporg' ); ?></h3>
    2626                    <table class="releases latest">
    27                         <?php echo rosetta_release_row( $releases['latest'], 'alt' ); ?>
     27                        <?php release_row( $releases['latest'], 'alt' ); ?>
    2828                    </table>
    2929                    <?php
     
    3434
    3535                    foreach ( $releases['branches'] as $branch => $branch_release ):
    36                         rosetta_release_row( null, null, null, true );
     36                        release_row( [], '', '', true );
    3737                        ?>
    3838                        <h3><?php printf( __( '%s Branch', 'wporg' ), $branch );?></h3>
     
    4040                            <?php
    4141                            foreach ( $branch_release as $release ) :
    42                                 rosetta_release_row( $release, 'alt' );
     42                                release_row( $release, 'alt' );
    4343                            endforeach;
    4444                            ?>
     
    4646                        <?php
    4747                    endforeach;
    48                 endif; # any branches
     48                endif; // any branches
    4949
    5050                if ( ! empty( $releases['betas'] ) ) :
     
    5353                    <table id="beta" class="releases">
    5454                        <?php
    55                         rosetta_release_row( null, null, null, true );
     55                        release_row( [], '', '', true );
    5656                        foreach ( $releases['betas'] as $release ):
    57                             rosetta_release_row( $release, 'alt', 'beta-first' );
     57                            release_row( $release, 'alt', 'beta-first' );
    5858                        endforeach;
    5959                        ?>
     
    6161
    6262                    <?php
    63                 endif; # any betas
    64             else: # no releases
     63                endif; // any betas
     64            else: // no releases
    6565                echo '<p>' . __( 'There are no releases, yet.', 'wporg' ) . '</p>';
    66             endif; # if releases
     66            endif; // if releases
    6767            ?>
    6868        </div><!-- .entry-content -->
     
    7171        edit_post_link(
    7272            sprintf(
    73             /* translators: %s: Name of current post */
     73                /* translators: %s: Name of current post */
    7474                esc_html__( 'Edit %s', 'wporg' ),
    7575                the_title( '<span class="screen-reader-text">"', '"</span>', false )
Note: See TracChangeset for help on using the changeset viewer.