From b60222700e4c970153a935e1c2703b8cf422544a Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Thu, 22 Sep 2011 12:02:31 +0000 Subject: [PATCH] Documentation fixes. See #18560. - Add missing parameters - Add missing @param data types - s/format_where/where_format/ git-svn-id: https://develop.svn.wordpress.org/trunk@18753 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-editor.php | 6 +++--- wp-includes/post.php | 2 +- wp-includes/wp-db.php | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index e7faf80702..b0f3f41fed 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -33,9 +33,9 @@ class WP_Editor { /** * Outputs the HTML and enqueues the JavaScript for a single instance of the editor. * - * @param $content The initial content of the editor. - * @param $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers). - * @param $settings See below for description. + * @param string $content The initial content of the editor. + * @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers). + * @param array $settings See below for description. */ function editor( $content, $editor_id, $settings = array() ) { diff --git a/wp-includes/post.php b/wp-includes/post.php index f0d16ef789..93bdb0a36b 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5195,7 +5195,7 @@ function set_post_thumbnail( $post, $thumbnail_id ) { * * @since 3.1.0 * - * @param $format string Post format + * @param string $format Post format * @return string Link */ function get_post_format_link( $format ) { diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index a02496651a..d56688edf1 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -555,6 +555,7 @@ class wpdb { * @since 2.5.0 * * @param string $prefix Alphanumeric name for the new prefix. + * @param bool $set_table_names Optional. Whether the table names, e.g. wpdb::$posts, should be updated or not. * @return string|WP_Error Old prefix or WP_Error on error */ function set_prefix( $prefix, $set_table_names = true ) { @@ -726,7 +727,7 @@ class wpdb { * @param resource $dbh Optional link identifier. * @return null Always null. */ - function select( $db, $dbh = null) { + function select( $db, $dbh = null ) { if ( is_null($dbh) ) $dbh = $this->dbh; @@ -1178,6 +1179,7 @@ class wpdb { * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped). * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data. * A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. + * @param string $type Optional. What type of operation is this? INSERT or REPLACE. Defaults to INSERT. * @return int|false The number of rows affected, or false on error. */ function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) { @@ -1217,7 +1219,7 @@ class wpdb { * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw". * @param array|string $format Optional. An array of formats to be mapped to each of the values in $data. If string, that format will be used for all of the values in $data. * A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. - * @param array|string $format_where Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings. + * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings. * @return int|false The number of rows updated, or false on error. */ function update( $table, $data, $where, $format = null, $where_format = null ) {