Make WordPress Core

Changeset 32610


Ignore:
Timestamp:
05/26/2015 07:32:55 PM (9 years ago)
Author:
wonderboymusic
Message:

Fix doc blocks for meta.php

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/meta.php

    r32331 r32610  
    1919 * @global wpdb $wpdb WordPress database abstraction object.
    2020 *
    21  * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    22  * @param int $object_id ID of the object metadata is for
    23  * @param string $meta_key Metadata key
    24  * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
    25  * @param bool $unique Optional, default is false. Whether the specified metadata key should be
    26  *      unique for the object. If true, and the object already has a value for the specified
    27  *      metadata key, no change will be made
    28  * @return int|bool The meta ID on success, false on failure.
     21 * @param string $meta_type  Type of object metadata is for (e.g., comment, post, or user)
     22 * @param int    $object_id  ID of the object metadata is for
     23 * @param string $meta_key   Metadata key
     24 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
     25 * @param bool   $unique     Optional, default is false.
     26 *                           Whether the specified metadata key should be unique for the object.
     27 *                           If true, and the object already has a value for the specified metadata key,
     28 *                           no change will be made.
     29 * @return int|false The meta ID on success, false on failure.
    2930 */
    3031function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = false) {
     
    133134 * @global wpdb $wpdb WordPress database abstraction object.
    134135 *
    135  * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    136  * @param int $object_id ID of the object metadata is for
    137  * @param string $meta_key Metadata key
    138  * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
    139  * @param mixed $prev_value Optional. If specified, only update existing metadata entries with
    140  *      the specified value. Otherwise, update all entries.
     136 * @param string $meta_type  Type of object metadata is for (e.g., comment, post, or user)
     137 * @param int    $object_id ID of the object metadata is for
     138 * @param string $meta_key   Metadata key
     139 * @param mixed  $meta_value Metadata value. Must be serializable if non-scalar.
     140 * @param mixed  $prev_value Optional. If specified, only update existing metadata entries with
     141 *                           the specified value. Otherwise, update all entries.
    141142 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
    142143 */
     
    448449 *
    449450 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    450  * @param int $object_id ID of the object metadata is for
    451  * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for
    452  *      the specified object.
    453  * @param bool $single Optional, default is false. If true, return only the first value of the
    454  *      specified meta_key. This parameter has no effect if meta_key is not specified.
     451 * @param int    $object_id ID of the object metadata is for
     452 * @param string $meta_key  Optional. Metadata key. If not specified, retrieve all metadata for
     453 *                          the specified object.
     454 * @param bool   $single    Optional, default is false.
     455 *                          If true, return only the first value of the specified meta_key.
     456 *                          This parameter has no effect if meta_key is not specified.
    455457 * @return mixed Single metadata value, or array of values
    456458 */
     
    519521 *
    520522 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    521  * @param int $object_id ID of the object metadata is for
    522  * @param string $meta_key Metadata key.
    523  * @return boolean true of the key is set, false if not.
     523 * @param int    $object_id ID of the object metadata is for
     524 * @param string $meta_key  Metadata key.
     525 * @return bool True of the key is set, false if not.
    524526 */
    525527function metadata_exists( $meta_type, $object_id, $meta_key ) {
     
    556558 * @since 3.3.0
    557559 *
     560 * @global wpdb $wpdb
     561 *
    558562 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    559  * @param int $meta_id ID for a specific meta row
    560  * @return object Meta object or false.
     563 * @param int    $meta_id  ID for a specific meta row
     564 * @return object|false Meta object or false.
    561565 */
    562566function get_metadata_by_mid( $meta_type, $meta_id ) {
     
    595599 * @since 3.3.0
    596600 *
    597  * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    598  * @param int $meta_id ID for a specific meta row
     601 * @global wpdb $wpdb
     602 *
     603 * @param string $meta_type  Type of object metadata is for (e.g., comment, post, or user)
     604 * @param int    $meta_id    ID for a specific meta row
    599605 * @param string $meta_value Metadata value
    600  * @param string $meta_key Optional, you can provide a meta key to update it
     606 * @param string $meta_key   Optional, you can provide a meta key to update it
    601607 * @return bool True on successful update, false on failure.
    602608 */
     
    686692 * @since 3.3.0
    687693 *
     694 * @global wpdb $wpdb
     695 *
    688696 * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    689  * @param int $meta_id ID for a specific meta row
     697 * @param int    $meta_id  ID for a specific meta row
    690698 * @return bool True on successful delete, false on failure.
    691699 */
     
    773781 * @global wpdb $wpdb WordPress database abstraction object.
    774782 *
    775  * @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
    776  * @param int|array $object_ids array or comma delimited list of object IDs to update cache for
    777  * @return mixed Metadata cache for the specified objects, or false on failure.
     783 * @param string    $meta_type Type of object metadata is for (e.g., comment, post, or user)
     784 * @param int|array $object_ids Array or comma delimited list of object IDs to update cache for
     785 * @return array|false Metadata cache for the specified objects, or false on failure.
    778786 */
    779787function update_meta_cache($meta_type, $object_ids) {
     
    11541162     * @param string $primary_id_column ID column for the filtered object in $primary_table.
    11551163     * @param object $context           Optional. The main query object.
    1156      * @return array {
     1164     * @return false|array {
    11571165     *     Array containing JOIN and WHERE SQL clauses to append to the main query.
    11581166     *
     
    13251333     * @access public
    13261334     *
     1335     * @global wpdb $wpdb
     1336     *
    13271337     * @param array  $clause       Query clause, passed by reference.
    13281338     * @param array  $parent_query Parent query array.
     
    15791589 *
    15801590 * @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
    1581  * @return mixed Metadata table name, or false if no metadata table exists
     1591 * @return string|false Metadata table name, or false if no metadata table exists
    15821592 */
    15831593function _get_meta_table($type) {
     
    16211631 * @since 3.1.3
    16221632 *
    1623  * @param string $meta_key Meta key
    1624  * @param mixed $meta_value Meta value to sanitize
    1625  * @param string $meta_type Type of meta
     1633 * @param string $meta_key   Meta key
     1634 * @param mixed  $meta_value Meta value to sanitize
     1635 * @param string $meta_type  Type of meta
    16261636 * @return mixed Sanitized $meta_value
    16271637 */
     
    16501660 * @since 3.3.0
    16511661 *
    1652  * @param string $meta_type Type of meta
    1653  * @param string $meta_key Meta key
     1662 * @param string       $meta_type        Type of meta
     1663 * @param string       $meta_key          Meta key
    16541664 * @param string|array $sanitize_callback A function or method to call when sanitizing the value of $meta_key.
    1655  * @param string|array $auth_callback Optional. A function or method to call when performing edit_post_meta, add_post_meta, and delete_post_meta capability checks.
     1665 * @param string|array $auth_callback     Optional. A function or method to call when performing edit_post_meta, add_post_meta, and delete_post_meta capability checks.
    16561666 */
    16571667function register_meta( $meta_type, $meta_key, $sanitize_callback, $auth_callback = null ) {
Note: See TracChangeset for help on using the changeset viewer.