From 92c153aa8cd01cef8fa31b21644264d8d37462f9 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 8 Nov 2014 20:56:22 +0000 Subject: [PATCH] Fix the syntax for some status-related documentation introduced in [30155]. * Variables in DocBlocks should be backtick-escaped * Parameter and return types should be as specific as possible * `@param` types and variables should align with each other, but not intentionally with the `@return` description See #30230. Built from https://develop.svn.wordpress.org/trunk@30284 git-svn-id: http://core.svn.wordpress.org/trunk@30284 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ajax-actions.php | 3 +-- wp-includes/post.php | 2 +- wp-includes/revision.php | 6 +++--- wp-includes/version.php | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index a4835b77e5..5448f24c53 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -1149,8 +1149,7 @@ function wp_ajax_add_meta() { if ( isset($_POST['metakeyselect']) && '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) ) wp_die( 1 ); - // If the post is an autodraft, save the post as a draft and then - // attempt to save the meta. + // If the post is an autodraft, save the post as a draft and then attempt to save the meta. if ( $post->post_status == 'auto-draft' ) { $save_POST = $_POST; // Backup $_POST $_POST = array(); // Make it empty for edit_post() diff --git a/wp-includes/post.php b/wp-includes/post.php index 7fa0d7e8ad..68f89d660b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1069,7 +1069,7 @@ function get_post_status_object( $post_status ) { * @see register_post_status() * * @param array|string $args Optional. Array or string of post status arguments to compare against - * properties of the global $wp_post_statuses objects. Default empty array. + * properties of the global `$wp_post_statuses objects`. Default empty array. * @param string $output Optional. The type of output to return, either 'names' or 'objects'. Default 'names'. * @param string $operator Optional. The logical operation to perform. 'or' means only one element * from the array needs to match; 'and' means all elements must match. diff --git a/wp-includes/revision.php b/wp-includes/revision.php index 2661accd7f..6bdbf505b7 100644 --- a/wp-includes/revision.php +++ b/wp-includes/revision.php @@ -77,8 +77,8 @@ function _wp_post_revision_fields( $post = null, $autosave = false ) { * * @since 2.6.0 * - * @param int $post_id The ID of the post to save as a revision. - * @return mixed Null or 0 if error, new revision ID, if success. + * @param int $post_id The ID of the post to save as a revision. + * @return null|int Null or 0 if error, new revision ID, if success. */ function wp_save_post_revision( $post_id ) { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) @@ -455,7 +455,7 @@ function wp_revisions_enabled( $post ) { * * @since 3.6.0 * - * @param object $post The post object. + * @param WP_Post $post The post object. * @return int The number of revisions to keep. */ function wp_revisions_to_keep( $post ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index f1cad4fa00..ee3a8a1d11 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30283'; +$wp_version = '4.1-alpha-30284'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.