Ticket #21826: 21826.patch

File 21826.patch, 2.4 KB (added by ethitter, 9 months ago)
  • wp-admin/includes/class-wp-themes-list-table.php

     
    151151                        $delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : ''; 
    152152                        unset( $actions['delete'] ); 
    153153 
     154                        $screenshot = apply_filters( 'theme_list_screenshot', $screenshot = $theme->get_screenshot(), $theme ); 
     155 
    154156                        ?> 
    155157 
    156                         <a href="<?php echo $preview_link; ?>" class="screenshot hide-if-customize"> 
    157                                 <?php if ( $screenshot = $theme->get_screenshot() ) : ?> 
     158                        <?php if ( ! empty( $screenshot ) ) : ?> 
     159                                <a href="<?php echo $preview_link; ?>" class="screenshot hide-if-customize"> 
    158160                                        <img src="<?php echo esc_url( $screenshot ); ?>" alt="" /> 
    159                                 <?php endif; ?> 
    160                         </a> 
    161                         <a href="<?php echo wp_customize_url( $stylesheet ); ?>" class="screenshot load-customize hide-if-no-customize"> 
    162                                 <?php if ( $screenshot = $theme->get_screenshot() ) : ?> 
     161                                </a> 
     162 
     163                                <a href="<?php echo wp_customize_url( $stylesheet ); ?>" class="screenshot load-customize hide-if-no-customize"> 
    163164                                        <img src="<?php echo esc_url( $screenshot ); ?>" alt="" /> 
    164                                 <?php endif; ?> 
    165                         </a> 
     165                                </a> 
     166                        <?php endif; ?> 
    166167 
    167                         <h3><?php echo $title; ?></h3> 
    168                         <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 
     168                        <h3><?php echo apply_filters( 'theme_list_title', $title, $theme ); ?></h3> 
     169 
     170                        <?php $author = apply_filters( 'theme_list_author', $author, $theme ); if ( ! empty( $author ) ) : ?> 
     171                                <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 
     172                        <?php endif; ?> 
     173 
    169174                        <div class="action-links"> 
    170175                                <ul> 
    171176                                        <?php foreach ( $actions as $action ): ?> 
     
    179184                        </div> 
    180185 
    181186                        <div class="themedetaildiv hide-if-js"> 
    182                                 <p><strong><?php _e('Version: '); ?></strong><?php echo $version; ?></p> 
    183                                 <p><?php echo $theme->display('Description'); ?></p> 
     187                                <?php $version = apply_filters( 'theme_list_version', $version, $theme ); if ( ! empty( $version ) ) : ?> 
     188                                        <p><strong><?php _e( 'Version: ' ); ?></strong><?php echo esc_html( $version ); ?></p> 
     189                                <?php endif; ?> 
     190 
     191                                <p><?php echo apply_filters( 'theme_list_description', $theme->display( 'Description' ), $theme ); ?></p> 
    184192                        </div> 
    185193 
    186194                        </div>