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-plugin-directory-compat.php

    r3892 r3900  
    111111    }
    112112
    113     /**
    114      * Return a custom view header string so that get_breadcrumbs will display it.
    115      */
    116     public function get_view_header() {
     113    public function do_view_header() {
    117114        $slug        = esc_attr( $this->slug );
    118115        $description = esc_html__( 'Description', 'wporg-forums' );
    119116        $support     = esc_html__( 'Support', 'wporg-forums' );
    120117        $reviews     = esc_html__( 'Reviews', 'wporg-forums' );
    121 
    122         $header = <<<EOT
     118        ?>
    123119        <ul id="sections">
    124120            <li class="section-description">
    125                 <a href="//wordpress.org/plugins/{$slug}/">{$description}</a>
     121                <a href="//wordpress.org/plugins/<?php echo $slug; ?>/"><?php echo $description; ?></a>
    126122            </li>
    127123            <li class="section-support">
    128                 <a href="//wordpress.org/support/plugin/{$slug}/">{$support}</a>
     124                <a href="//wordpress.org/support/plugin/<?php echo $slug; ?>/"><?php echo $support; ?></a>
    129125            <li>
    130126            <li class="section-reviews">
    131                 <a href="//wordpress.org/support/plugin/{$slug}/reviews/">{$reviews}</a>
     127                <a href="//wordpress.org/support/plugin/<?php echo $slug; ?>/reviews/"><?php echo $reviews; ?></a>
    132128            </li>
    133             </ul>
    134 EOT;
    135         return $header;
     129        </ul>
     130        <?php
    136131    }
    137132}
Note: See TracChangeset for help on using the changeset viewer.