Making WordPress.org


Ignore:
Timestamp:
06/06/2018 04:18:07 AM (6 years ago)
Author:
dd32
Message:

Theme Directory: Add a 'Report this theme' button.

Fixes #3626

File:
1 edited

Legend:

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

    r6347 r7272  
    3939                <div class="theme-meta-info">
    4040                    <p class="version">
    41                         <?php printf( __( 'Version: %s', 'wporg-themes' ), '<strong>' . $theme->version . '</strong>' ); ?> 
     41                        <?php printf( __( 'Version: %s', 'wporg-themes' ), '<strong>' . $theme->version . '</strong>' ); ?>
    4242                    </p>
    4343                    <p class="updated">
     
    141141                </div><!-- .theme-support -->
    142142
     143                <div class="theme-report">
     144                        <h4><?php _e( 'Report', 'wporg-themes' ); ?></h4>
     145                        <p><?php _e( 'Does this theme have major issues?', 'wporg-themes' ); ?></p>
     146                        <?php
     147                        $report_url = add_query_arg(
     148                                urlencode_deep( array_filter( array(
     149                                        'rep-theme'   => "https://wordpress.org/themes/{$theme->slug}/",
     150                                        'rep-subject' => "Reported Theme: {$theme->name}", // Not translated, email subject.
     151                                        'rep-name'    => wp_get_current_user()->user_login,
     152                                ) ) ),
     153                                'https://make.wordpress.org/themes/report-theme/'
     154                        );
     155                        ?>
     156                        <a rel="nofollow" href="<?php echo esc_url( $report_url ); ?>" class="button button-secondary"><?php _e( 'Report this theme', 'wporg-themes' ); ?></a>
     157                </div><!-- .theme-report -->
     158
    143159                <div class="theme-translations">
    144160                    <h4><?php _e( 'Translations', 'wporg-themes' ); ?></h4>
Note: See TracChangeset for help on using the changeset viewer.