equal
deleted
inserted
replaced
164 * @param string $redirect Path to redirect to on logout. |
164 * @param string $redirect Path to redirect to on logout. |
165 */ |
165 */ |
166 function wp_logout_url($redirect = '') { |
166 function wp_logout_url($redirect = '') { |
167 $args = array( 'action' => 'logout' ); |
167 $args = array( 'action' => 'logout' ); |
168 if ( !empty($redirect) ) { |
168 if ( !empty($redirect) ) { |
169 $args['redirect_to'] = $redirect; |
169 $args['redirect_to'] = urlencode( $redirect ); |
170 } |
170 } |
171 |
171 |
172 $logout_url = add_query_arg($args, site_url('wp-login.php', 'login')); |
172 $logout_url = add_query_arg($args, site_url('wp-login.php', 'login')); |
173 $logout_url = wp_nonce_url( $logout_url, 'log-out' ); |
173 $logout_url = wp_nonce_url( $logout_url, 'log-out' ); |
174 |
174 |
815 } |
815 } |
816 if ( $arcresults ) { |
816 if ( $arcresults ) { |
817 $afterafter = $after; |
817 $afterafter = $after; |
818 foreach ( (array) $arcresults as $arcresult ) { |
818 foreach ( (array) $arcresults as $arcresult ) { |
819 $url = get_month_link( $arcresult->year, $arcresult->month ); |
819 $url = get_month_link( $arcresult->year, $arcresult->month ); |
|
820 /* translators: 1: month name, 2: 4-digit year */ |
820 $text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year); |
821 $text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year); |
821 if ( $show_post_count ) |
822 if ( $show_post_count ) |
822 $after = ' ('.$arcresult->posts.')' . $afterafter; |
823 $after = ' ('.$arcresult->posts.')' . $afterafter; |
823 $output .= get_archives_link($url, $text, $format, $before, $after); |
824 $output .= get_archives_link($url, $text, $format, $before, $after); |
824 } |
825 } |
1164 } |
1165 } |
1165 add_action( 'save_post', 'delete_get_calendar_cache' ); |
1166 add_action( 'save_post', 'delete_get_calendar_cache' ); |
1166 add_action( 'delete_post', 'delete_get_calendar_cache' ); |
1167 add_action( 'delete_post', 'delete_get_calendar_cache' ); |
1167 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' ); |
1168 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' ); |
1168 add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' ); |
1169 add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' ); |
1169 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' ); |
|
1170 |
1170 |
1171 /** |
1171 /** |
1172 * Display all of the allowed tags in HTML format with attributes. |
1172 * Display all of the allowed tags in HTML format with attributes. |
1173 * |
1173 * |
1174 * This is useful for displaying in the comment area, which elements and |
1174 * This is useful for displaying in the comment area, which elements and |
1703 * @since 2.3.0 |
1703 * @since 2.3.0 |
1704 * |
1704 * |
1705 * @return string |
1705 * @return string |
1706 */ |
1706 */ |
1707 function get_search_query() { |
1707 function get_search_query() { |
1708 return apply_filters( 'get_search_query', stripslashes( get_query_var( 's' ) ) ); |
1708 return apply_filters( 'get_search_query', get_query_var( 's' ) ); |
1709 } |
1709 } |
1710 |
1710 |
1711 /** |
1711 /** |
1712 * Display the contents of the search query variable. |
1712 * Display the contents of the search query variable. |
1713 * |
1713 * |