From 387ac8c9b588d457bdbe49f1e97f7df40448cc4e Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Thu, 26 Nov 2009 11:29:54 +0000 Subject: [PATCH] Fix notices and phpdoc, props hakre, fixes #10758 git-svn-id: https://develop.svn.wordpress.org/trunk@12284 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/post.php | 24 ++++++++++++----------- wp-admin/includes/widgets.php | 4 ++-- wp-admin/upload.php | 2 +- wp-comments-post.php | 2 +- wp-includes/author-template.php | 2 +- wp-includes/comment.php | 2 +- wp-includes/post.php | 11 +++++++++-- wp-includes/vars.php | 34 +++++++++++++++++---------------- wp-trackback.php | 14 +++++++------- 9 files changed, 53 insertions(+), 42 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 8829a7fa83..588bc50895 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -933,10 +933,10 @@ function postbox_classes( $id, $page ) { * * @since unknown * - * @param unknown_type $id - * @param unknown_type $title - * @param unknown_type $name - * @return unknown + * @param int|object $id Post ID or post object. + * @param string $title (optional) Title + * @param string $name (optional) Name + * @return array With two entries of type string */ function get_sample_permalink($id, $title = null, $name = null) { $post = &get_post($id); @@ -951,7 +951,7 @@ function get_sample_permalink($id, $title = null, $name = null) { // drafts, so we will fake, that our post is published if (in_array($post->post_status, array('draft', 'pending'))) { $post->post_status = 'publish'; - $post->post_name = sanitize_title($post->post_name? $post->post_name : $post->post_title, $post->ID); + $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID); } $post->post_name = wp_unique_post_slug($post->post_name, $post->ID, $post->post_status, $post->post_type, $post->post_parent); @@ -959,7 +959,7 @@ function get_sample_permalink($id, $title = null, $name = null) { // If the user wants to set a new name -- override the current one // Note: if empty name is supplied -- use the title instead, see #6072 if (!is_null($name)) { - $post->post_name = sanitize_title($name? $name : $title, $post->ID); + $post->post_name = sanitize_title($name ? $name : $title, $post->ID); } $post->filter = 'sample'; @@ -987,14 +987,16 @@ function get_sample_permalink($id, $title = null, $name = null) { } /** - * {@internal Missing Short Description}} + * sample permalink html * + * intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor. + * * @since unknown * - * @param unknown_type $id - * @param unknown_type $new_title - * @param unknown_type $new_slug - * @return unknown + * @param int|object $id Post ID or post object. + * @param string $new_title (optional) New title + * @param string $new_slug (optional) New slug + * @return string intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor. */ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $post = &get_post($id); diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index d452b56092..ac3cd05c25 100644 --- a/wp-admin/includes/widgets.php +++ b/wp-admin/includes/widgets.php @@ -190,8 +190,8 @@ function wp_widget_control( $sidebar_args ) { - - + + diff --git a/wp-admin/upload.php b/wp-admin/upload.php index bfdf76e4d1..8853bb715d 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -308,7 +308,7 @@ if ( !is_singular() && !isset($_GET['detached']) && !$is_trash ) { if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) : ?>