Make WordPress Core

Changeset 49789


Ignore:
Timestamp:
12/10/2020 11:51:52 PM (4 years ago)
Author:
johnbillion
Message:

Docs: Various docblock corrections.

See #51800

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-post-type.php

    r49496 r49789  
    124124     *
    125125     * @since 4.6.0
    126      * @var bool $show_in_menu
     126     * @var bool|string $show_in_menu
    127127     */
    128128    public $show_in_menu = null;
  • trunk/src/wp-includes/class-wp-query.php

    r49700 r49789  
    17311731     *
    17321732     * @param string $query_var Query variable key.
    1733      * @param mixed  $default   Optional. Value to return if the query variable is not set. Default empty.
     1733     * @param mixed  $default   Optional. Value to return if the query variable is not set. Default empty string.
    17341734     * @return mixed Contents of the query variable.
    17351735     */
  • trunk/src/wp-includes/class-wp-term.php

    r46586 r49789  
    4545     *
    4646     * @since 4.4.0
    47      * @var string
     47     * @var int
    4848     */
    4949    public $term_group = '';
     
    205205     * @since 4.4.0
    206206     *
    207      * @param string $filter Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'raw'.
     207     * @param string $filter Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'rss', or 'raw'.
    208208     */
    209209    public function filter( $filter ) {
  • trunk/src/wp-includes/link-template.php

    r49672 r49789  
    17011701 *
    17021702 * @param bool         $in_same_term   Optional. Whether post should be in a same taxonomy term. Default false.
    1703  * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
     1703 * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty string.
    17041704 * @param bool         $previous       Optional. Whether to retrieve previous post. Default true
    17051705 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
     
    17491749     * @since 4.4.0
    17501750     *
    1751      * @param array $excluded_terms Array of excluded term IDs.
     1751     * @param array|string $excluded_terms Array of excluded term IDs. Empty string if none were provided.
    17521752     */
    17531753    $excluded_terms = apply_filters( "get_{$adjacent}_post_excluded_terms", $excluded_terms );
  • trunk/src/wp-includes/post.php

    r49731 r49789  
    13941394 *                                  Default is value of $has_archive.
    13951395 *         @type bool   $pages      Whether the permastruct should provide for pagination. Default true.
    1396  *         @type const  $ep_mask    Endpoint mask to assign. If not specified and permalink_epmask is set,
     1396 *         @type int    $ep_mask    Endpoint mask to assign. If not specified and permalink_epmask is set,
    13971397 *                                  inherits from $permalink_epmask. If not specified and permalink_epmask
    13981398 *                                  is not set, defaults to EP_PERMALINK.
     
    23352335 * @param object|WP_Post|array $post    The post object or array
    23362336 * @param string               $context Optional. How to sanitize post fields.
    2337  *                                      Accepts 'raw', 'edit', 'db', or 'display'.
    2338  *                                      Default 'display'.
     2337 *                                      Accepts 'raw', 'edit', 'db', 'display',
     2338 *                                      'attribute', or 'js'. Default 'display'.
    23392339 * @return object|WP_Post|array The now sanitized post object or array (will be the
    23402340 *                              same type as `$post`).
     
    25082508             * @param mixed  $value   Value of the prefixed post field.
    25092509             * @param int    $post_id Post ID.
    2510              * @param string $context Context for how to sanitize the field. Possible
    2511              *                        values include 'edit', 'display',
    2512              *                        'attribute' and 'js'.
     2510             * @param string $context Context for how to sanitize the field.
     2511             *                        Accepts 'raw', 'edit', 'db', 'display',
     2512             *                        'attribute', or 'js'. Default 'display'.
    25132513             */
    25142514            $value = apply_filters( "{$field}", $value, $post_id, $context );
  • trunk/src/wp-includes/taxonomy.php

    r49769 r49789  
    15101510
    15111511/**
    1512  * Sanitize Term all fields.
     1512 * Sanitize all term fields.
    15131513 *
    15141514 * Relies on sanitize_term_field() to sanitize the term. The difference is that
    1515  * this function will sanitize <strong>all</strong> fields. The context is based
     1515 * this function will sanitize **all** fields. The context is based
    15161516 * on sanitize_term_field().
    15171517 *
    1518  * The $term is expected to be either an array or an object.
     1518 * The `$term` is expected to be either an array or an object.
    15191519 *
    15201520 * @since 2.3.0
     
    15221522 * @param array|object $term     The term to check.
    15231523 * @param string       $taxonomy The taxonomy name to use.
    1524  * @param string       $context  Optional. Context in which to sanitize the term. Accepts 'edit', 'db',
    1525  *                               'display', 'attribute', or 'js'. Default 'display'.
     1524 * @param string       $context  Optional. Context in which to sanitize the term.
     1525 *                               Accepts 'raw', 'edit', 'db', 'display', 'rss',
     1526 *                               'attribute', or 'js'. Default 'display'.
    15261527 * @return array|object Term with all fields sanitized.
    15271528 */
     
    15731574 * @param int    $term_id  Term ID.
    15741575 * @param string $taxonomy Taxonomy Name.
    1575  * @param string $context  Context in which to sanitize the term field. Accepts 'edit', 'db', 'display',
    1576  *                         'attribute', or 'js'.
     1576 * @param string $context  Context in which to sanitize the term field.
     1577 *                         Accepts 'raw', 'edit', 'db', 'display', 'rss',
     1578 *                         'attribute', or 'js'. Default 'display'.
    15771579 * @return mixed Sanitized field.
    15781580 */
  • trunk/src/wp-includes/user.php

    r49752 r49789  
    307307 * @param string                $username   Username for authentication.
    308308 * @param string                $password   Password for authentication.
    309  * @return WP_User|WP_Error WP_User on success, WP_Error on failure.
     309 * @return WP_User|WP_Error|null WP_User on success, WP_Error on failure, null if
     310 *                               null is passed in and this isn't an API request.
    310311 */
    311312function wp_authenticate_application_password( $input_user, $username, $password ) {
  • trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php

    r46985 r49789  
    2929     * @param array $args Array with elements for the post.
    3030     *
    31      * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
     31     * @return int The post ID on success. The value 0 on failure.
    3232     */
    3333    public function create_object( $args ) {
     
    4141     * @param array $fields  Post data.
    4242     *
    43      * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
     43     * @return int The post ID on success. The value 0 on failure.
    4444     */
    4545    public function update_object( $post_id, $fields ) {
Note: See TracChangeset for help on using the changeset viewer.