~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-includes/widgets/class-wp-widget-recent-comments.php

  • Committer: Nick Moffitt
  • Date: 2016-04-14 10:43:32 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: nick.moffitt@canonical.com-20160414104332-61kvsia27qpmjquk
new upstream release 4.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
         * @access public
24
24
         */
25
25
        public function __construct() {
26
 
                $widget_ops = array('classname' => 'widget_recent_comments', 'description' => __( 'Your site’s most recent comments.' ) );
27
 
                parent::__construct('recent-comments', __('Recent Comments'), $widget_ops);
 
26
                $widget_ops = array(
 
27
                        'classname' => 'widget_recent_comments',
 
28
                        'description' => __( 'Your site’s most recent comments.' ),
 
29
                        'customize_selective_refresh' => true,
 
30
                );
 
31
                parent::__construct( 'recent-comments', __( 'Recent Comments' ), $widget_ops );
28
32
                $this->alt_option_name = 'widget_recent_comments';
29
33
 
30
 
                if ( is_active_widget(false, false, $this->id_base) )
31
 
                        add_action( 'wp_head', array($this, 'recent_comments_style') );
 
34
                if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {
 
35
                        add_action( 'wp_head', array( $this, 'recent_comments_style' ) );
 
36
                }
32
37
        }
33
38
 
34
39
        /**