Making WordPress.org


Ignore:
Timestamp:
09/01/2016 02:18:57 AM (10 years ago)
Author:
jmdodd
Message:

Support Forums: Add plugin/theme new topic handlers.

Displays the new topic form with hidden input fields for the compat and plugin/theme slug at the bottom of the support and reviews views.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-theme-directory-compat.php

    r3892 r3900  
    105105        }
    106106
    107 
    108         /**
    109          * Return a custom view header string so that get_breadcrumbs will display it.
    110          */
    111         public function get_view_header() {
     107        public function do_view_header() {
    112108                $slug        = esc_attr( $this->slug );
    113109                $description = esc_html__( 'Description', 'wporg-forums' );
    114110                $support     = esc_html__( 'Support', 'wporg-forums' );
    115111                $reviews     = esc_html__( 'Reviews', 'wporg-forums' );
    116 
    117                 $header = <<<EOT
     112                ?>
    118113                <ul id="sections">
    119114                        <li class="section-description">
    120                                 <a href="//wordpress.org/themes/{$slug}/">{$description}</a>
     115                                <a href="//wordpress.org/themes/<?php echo $slug; ?>/"><?php echo $description; ?></a>
    121116                        </li>
    122117                        <li class="section-support">
    123                                 <a href="//wordpress.org/support/theme/{$slug}/">{$support}</a>
     118                                <a href="//wordpress.org/support/theme/<?php echo $slug; ?>/"><?php echo $support; ?></a>
    124119                        <li>
    125120                        <li class="section-reviews">
    126                                 <a href="//wordpress.org/support/theme/{$slug}/reviews/">{$reviews}</a>
     121                                <a href="//wordpress.org/support/theme/<?php echo $slug; ?>/reviews/"><?php echo $reviews; ?></a>
    127122                        </li>
    128                         </ul>
    129 EOT;
    130                 return $header;
     123                </ul>
     124                <?php
    131125        }
    132126}
Note: See TracChangeset for help on using the changeset viewer.