Making WordPress.org

Changeset 3202


Ignore:
Timestamp:
05/20/2016 10:04:55 PM (9 years ago)
Author:
obenland
Message:

Plugin Directory: Make Support widget seatup available to Widgets API.

Lets the title to be overwritable and adheres to widget args for
heading markup.

See #1719.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-support.php

    r3183 r3202  
    2323     */
    2424    public function widget( $args, $instance ) {
     25        $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Support', 'wporg-plugins' ) : $instance['title'], $instance, $this->id_base );
     26
    2527        $post        = get_post();
    2628        $threads     = get_post_meta( $post->ID, 'support_threads', true ) ?: 0;
     
    4244
    4345        echo $args['before_widget'];
    44         ?>
     46        echo $args['before_title'] . $title . $args['after_title'];
    4547
    46         <h4><?php _e( 'Support', 'wporg-plugins' ); ?></h4>
    47 
    48         <?php if ( $resolutions ) : ?>
     48        if ( $resolutions ) : ?>
    4949        <p>
    5050            <?php
Note: See TracChangeset for help on using the changeset viewer.