Changeset 12596
- Timestamp:
- 05/18/2023 04:13:33 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme-single.php
r12338 r12596 1 1 <?php 2 $is_commercial = has_term( 'commercial', 'theme_business_model', $theme ); 3 $external_support_url = $is_commercial ? get_post_meta( $theme->ID, 'external_support_url', true ) : ''; 4 $is_community = has_term( 'community', 'theme_business_model', $theme ); 5 $external_repository_url = $is_community ? get_post_meta( $theme->ID, 'external_repository_url', true ) : ''; 6 $can_configure_categorization_options = current_user_can( 'theme_configure_categorization_options', $theme ); 2 // $post = WP_Post, $theme = Theme info object 3 4 $is_commercial = has_term( 'commercial', 'theme_business_model', $post ); 5 $external_support_url = $is_commercial ? get_post_meta( $post->ID, 'external_support_url', true ) : ''; 6 $is_community = has_term( 'community', 'theme_business_model', $post ); 7 $external_repository_url = $is_community ? get_post_meta( $post->ID, 'external_repository_url', true ) : ''; 8 $can_configure_categorization_options = current_user_can( 'theme_configure_categorization_options', $post ); 7 9 ?> 8 10 <div> … … 246 248 247 249 <div class="theme-report"> 248 249 250 251 252 253 254 255 256 257 258 259 260 250 <h2><?php _e( 'Report', 'wporg-themes' ); ?></h2> 251 <p><?php _e( 'Does this theme have major issues?', 'wporg-themes' ); ?></p> 252 <?php 253 $report_url = add_query_arg( 254 urlencode_deep( array_filter( array( 255 'rep-theme' => "https://wordpress.org/themes/{$theme->slug}/", 256 'rep-subject' => "Reported Theme: {$theme->name}", // Not translated, email subject. 257 'rep-name' => wp_get_current_user()->user_login, 258 ) ) ), 259 'https://make.wordpress.org/themes/report-theme/' 260 ); 261 ?> 262 <a rel="nofollow" href="<?php echo esc_url( $report_url ); ?>" class="button button-secondary"><?php _e( 'Report this theme', 'wporg-themes' ); ?></a> 261 263 </div><!-- .theme-report --> 262 264
Note: See TracChangeset
for help on using the changeset viewer.