mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Notice fixes from filosofo and Viper007Bond. see #7509
git-svn-id: https://develop.svn.wordpress.org/trunk@9506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -62,6 +62,10 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||
$redirect = $original;
|
||||
$redirect_url = false;
|
||||
|
||||
// Notice fixing
|
||||
if ( !isset($redirect['path']) ) $redirect['path'] = '';
|
||||
if ( !isset($redirect['query']) ) $redirect['query'] = '';
|
||||
|
||||
if ( is_singular() && 1 > $wp_query->post_count && ($id = get_query_var('p')) ) {
|
||||
|
||||
$vars = $wpdb->get_results( $wpdb->prepare("SELECT post_type, post_parent FROM $wpdb->posts WHERE ID = %d", $id) );
|
||||
|
||||
@@ -277,8 +277,10 @@ function sanitize_category_field( $field, $value, $cat_id, $context ) {
|
||||
function &get_tags( $args = '' ) {
|
||||
$tags = get_terms( 'post_tag', $args );
|
||||
|
||||
if ( empty( $tags ) )
|
||||
return array();
|
||||
if ( empty( $tags ) ) {
|
||||
$return = array();
|
||||
return $return;
|
||||
}
|
||||
|
||||
$tags = apply_filters( 'get_tags', $tags, $args );
|
||||
return $tags;
|
||||
|
||||
@@ -1626,10 +1626,14 @@ class WP_Rewrite {
|
||||
}
|
||||
|
||||
$site_root = parse_url(get_option('siteurl'));
|
||||
$site_root = trailingslashit($site_root['path']);
|
||||
if ( isset( $site_root['path'] ) ) {
|
||||
$site_root = trailingslashit($site_root['path']);
|
||||
}
|
||||
|
||||
$home_root = parse_url(get_option('home'));
|
||||
$home_root = trailingslashit($home_root['path']);
|
||||
if ( isset( $home_root['path'] ) ) {
|
||||
$home_root = trailingslashit($home_root['path']);
|
||||
}
|
||||
|
||||
$rules = "<IfModule mod_rewrite.c>\n";
|
||||
$rules .= "RewriteEngine On\n";
|
||||
|
||||
@@ -1551,6 +1551,8 @@ function wp_widget_rss_output( $rss, $args = array() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0 );
|
||||
$args = wp_parse_args( $args, $default_args );
|
||||
extract( $args, EXTR_SKIP );
|
||||
|
||||
$items = (int) $items;
|
||||
|
||||
Reference in New Issue
Block a user