~canonical-sysadmins/wordpress/5.0

« back to all changes in this revision

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

  • Committer: Barry Price
  • Date: 2017-11-17 04:49:02 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: barry.price@canonical.com-20171117044902-5frux4ycbq6g9fyf
Merge WP4.9 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
         * @since 4.4.0
22
22
         *
23
23
         * @static
24
 
         * @access private
25
24
         * @var int
26
25
         */
27
26
        private static $instance = 0;
30
29
         * Sets up a new Calendar widget instance.
31
30
         *
32
31
         * @since 2.8.0
33
 
         * @access public
34
32
         */
35
33
        public function __construct() {
36
34
                $widget_ops = array(
45
43
         * Outputs the content for the current Calendar widget instance.
46
44
         *
47
45
         * @since 2.8.0
48
 
         * @access public
49
46
         *
50
47
         * @param array $args     Display arguments including 'before_title', 'after_title',
51
48
         *                        'before_widget', and 'after_widget'.
52
49
         * @param array $instance The settings for the particular instance of the widget.
53
50
         */
54
51
        public function widget( $args, $instance ) {
 
52
                $title = ! empty( $instance['title'] ) ? $instance['title'] : '';
 
53
 
55
54
                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
56
 
                $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
 
55
                $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
57
56
 
58
57
                echo $args['before_widget'];
59
58
                if ( $title ) {
75
74
         * Handles updating settings for the current Calendar widget instance.
76
75
         *
77
76
         * @since 2.8.0
78
 
         * @access public
79
77
         *
80
78
         * @param array $new_instance New settings for this instance as input by the user via
81
79
         *                            WP_Widget::form().
93
91
         * Outputs the settings form for the Calendar widget.
94
92
         *
95
93
         * @since 2.8.0
96
 
         * @access public
97
94
         *
98
95
         * @param array $instance Current settings.
99
96
         */