Making WordPress.org

Changeset 5738


Ignore:
Timestamp:
08/03/2017 03:50:24 PM (8 years ago)
Author:
coffee2code
Message:

Theme Directory: Add content to alt attribute for commercial theme shops homepage screenshots.

Fixes #2960.

File:
1 edited

Legend:

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

    r1928 r5738  
    3535                        <div class="themes">
    3636                            <?php foreach ( $theme_shops as $shop ) : ?>
     37                            <?php $shop_name = apply_filters( 'the_title', $shop->shop ); ?>
    3738                            <article id="post-<?php echo esc_attr( $shop->slug ); ?>" class="theme hentry">
    3839                                <div class="theme-screenshot">
    39                                     <img src="<?php echo esc_url( $shop->image ); ?>" alt="">
     40                                    <img src="<?php echo esc_url( $shop->image ); ?>" alt="<?php
     41                                        /* translators: %s: name of theme shop */
     42                                        echo esc_attr( sprintf( __( '%s homepage', 'wporg-themes' ), $shop_name ) );
     43                                    ?>">
    4044                                </div>
    4145                                <a class="more-details url" href="<?php echo esc_url( $shop->url ); ?>" rel="bookmark"><?php echo apply_filters( 'the_content', $shop->haiku ); ?></a>
    42                                 <h3 class="theme-name entry-title"><?php echo apply_filters( 'the_title', $shop->shop ); ?></h3>
     46                                <h3 class="theme-name entry-title"><?php echo $shop_name; ?></h3>
    4347                            </article>
    4448                            <?php endforeach; ?>
Note: See TracChangeset for help on using the changeset viewer.