Changeset 13176 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-theme-directory-compat.php
- Timestamp:
- 02/06/2024 02:10:30 AM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-theme-directory-compat.php
r12411 r13176 127 127 } 128 128 129 $icon = ''; 129 130 $theme = sprintf( '<a href="//wordpress.org/themes/%s/">%s</a>', esc_attr( $this->slug() ), esc_html( $this->theme->post_title ) ); 130 131 $support = sprintf( '<a href="%s">%s</a>', home_url( '/theme/' . esc_attr( $this->slug() ) . '/' ), __( 'Support Threads', 'wporg-forums' ) ); … … 145 146 $create = sprintf( '<a href="#new-post">%s</a>', $create_label ); 146 147 } 148 149 if ( file_exists( WPORGPATH . 'wp-content/plugins/theme-directory/class-wporg-themes-repo-package.php' ) ) { 150 include_once WPORGPATH . 'wp-content/plugins/theme-directory/class-wporg-themes-repo-package.php'; 151 152 if ( class_exists( 'WPORG_Themes_Repo_Package' ) ) { 153 switch_to_blog( WPORG_THEME_DIRECTORY_BLOGID ); 154 $repo_package = new \WPORG_Themes_Repo_Package( $this->theme->ID ); 155 $icon = $repo_package->screenshot_url(); 156 restore_current_blog(); 157 } 158 } 159 147 160 ?> 148 161 <div> 149 162 <ul> 163 <?php if ( ! empty( $icon ) ) : ?> 164 <li class="theme-meta-icon"><img src="<?php echo esc_url( $icon ); ?>"></li> 165 <?php endif; ?> 150 166 <li><?php echo $theme; ?></li> 151 167 <li><?php echo $support; ?></li>
Note: See TracChangeset
for help on using the changeset viewer.