Fix notices
git-svn-id: http://svn.automattic.com/wordpress/trunk@13068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
107d80fd95
commit
224b82e5e0
|
@ -472,9 +472,9 @@ class WP_Widget_Categories extends WP_Widget {
|
|||
function update( $new_instance, $old_instance ) {
|
||||
$instance = $old_instance;
|
||||
$instance['title'] = strip_tags($new_instance['title']);
|
||||
$instance['count'] = $new_instance['count'] ? 1 : 0;
|
||||
$instance['hierarchical'] = $new_instance['hierarchical'] ? 1 : 0;
|
||||
$instance['dropdown'] = $new_instance['dropdown'] ? 1 : 0;
|
||||
$instance['count'] = !empty($new_instance['count']) ? 1 : 0;
|
||||
$instance['hierarchical'] = !empty($new_instance['hierarchical']) ? 1 : 0;
|
||||
$instance['dropdown'] = !empty($new_instance['dropdown']) ? 1 : 0;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
@ -739,7 +739,7 @@ class WP_Widget_RSS extends WP_Widget {
|
|||
}
|
||||
|
||||
function update($new_instance, $old_instance) {
|
||||
$testurl = $new_instance['url'] != $old_instance['url'];
|
||||
$testurl = ( isset($new_instance['url']) && ($new_instance['url'] != $old_instance['url']) );
|
||||
return wp_widget_rss_process( $new_instance, $testurl );
|
||||
}
|
||||
|
||||
|
@ -939,9 +939,9 @@ function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
|
|||
$items = 10;
|
||||
$url = esc_url_raw(strip_tags( $widget_rss['url'] ));
|
||||
$title = trim(strip_tags( $widget_rss['title'] ));
|
||||
$show_summary = (int) $widget_rss['show_summary'];
|
||||
$show_author = (int) $widget_rss['show_author'];
|
||||
$show_date = (int) $widget_rss['show_date'];
|
||||
$show_summary = isset($widget_rss['show_summary']) ? (int) $widget_rss['show_summary'] : 0;
|
||||
$show_author = isset($widget_rss['show_author']) ? (int) $widget_rss['show_author'] :0;
|
||||
$show_date = isset($widget_rss['show_date']) ? (int) $widget_rss['show_date'] : 0;
|
||||
|
||||
if ( $check_feed ) {
|
||||
$rss = fetch_feed($url);
|
||||
|
|
|
@ -152,7 +152,7 @@ function wp_loginout($redirect = '', $echo = true) {
|
|||
$link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>';
|
||||
else
|
||||
$link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
|
||||
|
||||
|
||||
if ( $echo )
|
||||
echo apply_filters('loginout', $link);
|
||||
else
|
||||
|
@ -300,7 +300,7 @@ function wp_register( $before = '<li>', $after = '</li>', $echo = true ) {
|
|||
} else {
|
||||
$link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
|
||||
}
|
||||
|
||||
|
||||
if ( $echo )
|
||||
echo apply_filters('register', $link);
|
||||
else
|
||||
|
@ -1021,11 +1021,11 @@ function get_calendar($initial = true, $echo = true) {
|
|||
$cache = array();
|
||||
$key = md5( $m . $monthnum . $year );
|
||||
if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) {
|
||||
if ( is_array($cache) && isset( $cache[ $key ] ) ) {
|
||||
if ( is_array($cache) && isset( $cache[ $key ] ) ) {
|
||||
if ( $echo )
|
||||
echo apply_filters( 'get_calendar', $cache[$key] );
|
||||
else
|
||||
return apply_filters( 'get_calendar', $cache[$key] );
|
||||
return apply_filters( 'get_calendar', $cache[$key] );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1087,7 +1087,7 @@ function get_calendar($initial = true, $echo = true) {
|
|||
|
||||
/* translators: Calendar caption: 1: month name, 2: 4-digit year */
|
||||
$calendar_caption = _x('%1$s %2$s', 'calendar caption');
|
||||
$calendar_output .= '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '">
|
||||
$calendar_output = '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '">
|
||||
<caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
|
||||
<thead>
|
||||
<tr>';
|
||||
|
@ -1103,7 +1103,7 @@ function get_calendar($initial = true, $echo = true) {
|
|||
$wd = esc_attr($wd);
|
||||
$calendar_output .= "\n\t\t<th scope=\"col\" title=\"$wd\">$day_name</th>";
|
||||
}
|
||||
|
||||
|
||||
$calendar_output .= '
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -1206,7 +1206,7 @@ function get_calendar($initial = true, $echo = true) {
|
|||
|
||||
$calendar_output .= "\n\t</tr>\n\t</tbody>\n\t</table>";
|
||||
|
||||
$cache[ $key ] = $output;
|
||||
$cache[ $key ] = $calendar_output;
|
||||
wp_cache_set( 'get_calendar', $cache, 'calendar' );
|
||||
|
||||
if ( $echo )
|
||||
|
|
Loading…
Reference in New Issue