Make WordPress Core


Ignore:
Timestamp:
03/25/2018 06:09:56 PM (9 years ago)
Author:
johnbillion
Message:

Docs: Document more parameters and properties using typed array notation.

See #41756

File:
1 edited

Legend:

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

    r42832 r42875  
    325325                                 * @since 4.6.0
    326326                                 *
    327                                  * @param bool   $allowed   Whether the user can add the object meta. Default false.
    328                                  * @param string $meta_key  The meta key.
    329                                  * @param int    $object_id Object ID.
    330                                  * @param int    $user_id   User ID.
    331                                  * @param string $cap       Capability name.
    332                                  * @param array  $caps      User capabilities.
     327                                 * @param bool     $allowed   Whether the user can add the object meta. Default false.
     328                                 * @param string   $meta_key  The meta key.
     329                                 * @param int      $object_id Object ID.
     330                                 * @param int      $user_id   User ID.
     331                                 * @param string   $cap       Capability name.
     332                                 * @param string[] $caps      Array of the user's capabilities.
    333333                                 */
    334334                                $allowed = apply_filters( "auth_{$object_type}_meta_{$meta_key}", false, $meta_key, $object_id, $user_id, $cap, $caps );
    … …  
    346346                                 * @since 4.7.0
    347347                                 *
    348                                  * @param bool   $allowed   Whether the user can add the object meta. Default false.
    349                                  * @param string $meta_key  The meta key.
    350                                  * @param int    $object_id Object ID.
    351                                  * @param int    $user_id   User ID.
    352                                  * @param string $cap       Capability name.
    353                                  * @param array  $caps      User capabilities.
     348                                 * @param bool     $allowed   Whether the user can add the object meta. Default false.
     349                                 * @param string   $meta_key  The meta key.
     350                                 * @param int      $object_id Object ID.
     351                                 * @param int      $user_id   User ID.
     352                                 * @param string   $cap       Capability name.
     353                                 * @param string[] $caps      Array of the user's capabilities.
    354354                                 */
    355355                                $allowed = apply_filters( "auth_{$object_type}_{$sub_type}_meta_{$meta_key}", $allowed, $meta_key, $object_id, $user_id, $cap, $caps );
    … …  
    573573         * @since 2.8.0
    574574         *
    575          * @param array  $caps    Returns the user's actual capabilities.
    576          * @param string $cap     Capability name.
    577          * @param int    $user_id The user ID.
    578          * @param array  $args    Adds the context to the cap. Typically the object ID.
     575         * @param string[] $caps    Array of the user's capabilities.
     576         * @param string   $cap     Capability name.
     577         * @param int      $user_id The user ID.
     578         * @param array    $args    Adds the context to the cap. Typically the object ID.
    579579         */
    580580        return apply_filters( 'map_meta_cap', $caps, $cap, $user_id, $args );
    … …  
    913913 * @since 4.9.0
    914914 *
    915  * @param array $allcaps An array of all the user's capabilities.
    916  * @return array Filtered array of the user's capabilities.
     915 * @param bool[] $allcaps An array of all the user's capabilities.
     916 * @return bool[] Filtered array of the user's capabilities.
    917917 */
    918918function wp_maybe_grant_install_languages_cap( $allcaps ) {
Note: See TracChangeset for help on using the changeset viewer.