Changeset 48591
- Timestamp:
- 07/23/2020 09:53:43 PM (5 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/bookmark.php
r48586 r48591 15 15 * 16 16 * @param int|stdClass $bookmark 17 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond18 * to an stdClass object, an associative array, or a numeric array, respectively.19 * Default OBJECT.17 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 18 * correspond to an stdClass object, an associative array, or a numeric array, 19 * respectively. Default OBJECT. 20 20 * @param string $filter Optional. How to sanitize bookmark fields. Default 'raw'. 21 21 * @return array|object|null Type returned depends on $output value. -
trunk/src/wp-includes/category.php
r48586 r48591 81 81 * @since 1.5.1 82 82 * 83 * @param int|object $category Category ID or Category row object84 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, 85 * whichcorrespond to a WP_Term object, an associative array, or a numeric array,83 * @param int|object $category Category ID or category row object. 84 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 85 * correspond to a WP_Term object, an associative array, or a numeric array, 86 86 * respectively. Default OBJECT. 87 87 * @param string $filter Optional. How to sanitize category fields. Default 'raw'. … … 117 117 * @param string $category_path URL containing category slugs. 118 118 * @param bool $full_match Optional. Whether full path should be matched. 119 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, 120 * whichcorrespond to a WP_Term object, an associative array, or a numeric array,119 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 120 * correspond to a WP_Term object, an associative array, or a numeric array, 121 121 * respectively. Default OBJECT. 122 122 * @return WP_Term|array|WP_Error|null Type is based on $output value. … … 330 330 * 331 331 * @param int|WP_Term|object $tag A tag ID or object. 332 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, 333 * whichcorrespond to a WP_Term object, an associative array, or a numeric array,332 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 333 * correspond to a WP_Term object, an associative array, or a numeric array, 334 334 * respectively. Default OBJECT. 335 335 * @param string $filter Optional. How to sanitize tag fields. Default 'raw'. … … 372 372 * @access private 373 373 * 374 * @param array|object|WP_Term $category Category Row object or array374 * @param array|object|WP_Term $category Category row object or array. 375 375 */ 376 376 function _make_cat_compat( &$category ) { -
trunk/src/wp-includes/class-wp-user.php
r48590 r48591 57 57 * 58 58 * @since 2.0.0 59 * @var bool[] Array of key/value pairs where keys represent a capability name and boolean values60 * represent whether the user has that capability.59 * @var bool[] Array of key/value pairs where keys represent a capability name 60 * and boolean values represent whether the user has that capability. 61 61 */ 62 62 public $caps = array(); … … 82 82 * 83 83 * @since 2.0.0 84 * @var bool[] Array of key/value pairs where keys represent a capability name and boolean values85 * represent whether the user has that capability.84 * @var bool[] Array of key/value pairs where keys represent a capability name 85 * and boolean values represent whether the user has that capability. 86 86 */ 87 87 public $allcaps = array(); … … 483 483 484 484 /** 485 * Retrieves all of the capabilities of the roles of the user, and merges them with individual user capabilities. 486 * 487 * All of the capabilities of the roles of the user are merged with the user's individual capabilities. This means 488 * that the user can be denied specific capabilities that their role might have, but the user is specifically denied. 489 * 490 * @since 2.0.0 491 * 492 * @return bool[] Array of key/value pairs where keys represent a capability name and boolean values 493 * represent whether the user has that capability. 485 * Retrieves all of the capabilities of the user's roles, and merges them with 486 * individual user capabilities. 487 * 488 * All of the capabilities of the user's roles are merged with the user's individual 489 * capabilities. This means that the user can be denied specific capabilities that 490 * their role might have, but the user is specifically denied. 491 * 492 * @since 2.0.0 493 * 494 * @return bool[] Array of key/value pairs where keys represent a capability name 495 * and boolean values represent whether the user has that capability. 494 496 */ 495 497 public function get_role_caps() { … … 767 769 * @since 3.7.0 Added the `$user` parameter. 768 770 * 769 * @param bool[] $allcaps Array of key/value pairs where keys represent a capability name and boolean values770 * represent whether the user has that capability.771 * @param bool[] $allcaps Array of key/value pairs where keys represent a capability name 772 * and boolean values represent whether the user has that capability. 771 773 * @param string[] $caps Required primitive capabilities for the requested capability. 772 774 * @param array $args { -
trunk/src/wp-includes/comment.php
r48590 r48591 188 188 * 189 189 * @param WP_Comment|string|int $comment Comment to retrieve. 190 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 191 * a WP_Comment object, an associative array, or a numeric array, respectively. Default OBJECT. 190 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 191 * correspond to a WP_Comment object, an associative array, or a numeric array, 192 * respectively. Default OBJECT. 192 193 * @return WP_Comment|array|null Depends on $output value. 193 194 */ -
trunk/src/wp-includes/functions.php
r48590 r48591 7525 7525 * 7526 7526 * @param string $directory Full path of a directory. 7527 * @param string|array $exclude Optional. Full path of a subdirectory to exclude from the total, or array of7528 * paths. Expected without trailing slash(es).7529 * @param int $max_execution_time Maximum time to run before giving up. In seconds. 7530 * The timeout is globaland is measured from the moment WordPress started to load.7527 * @param string|array $exclude Optional. Full path of a subdirectory to exclude from the total, 7528 * or array of paths. Expected without trailing slash(es). 7529 * @param int $max_execution_time Maximum time to run before giving up. In seconds. The timeout is global 7530 * and is measured from the moment WordPress started to load. 7531 7531 * @return int|false|null Size in bytes if a valid directory. False if not. Null if timeout. 7532 7532 */ -
trunk/src/wp-includes/meta.php
r48590 r48591 485 485 * 486 486 * If the meta field does not exist, the result depends on get_metadata_default(). 487 * By default, an empty string is returned if `$single` is true, or an empty array if it's false. 487 * By default, an empty string is returned if `$single` is true, or an empty array 488 * if it's false. 488 489 * 489 490 * @since 2.9.0 … … 592 593 * Retrieves default metadata value for the specified object. 593 594 * 594 * By default, an empty string is returned if `$single` is true, or an empty array if it's false. 595 * By default, an empty string is returned if `$single` is true, or an empty array 596 * if it's false. 595 597 * 596 598 * @since 5.5.0 … … 1414 1416 } 1415 1417 1416 // If this meta type does not have sub 1418 // If this meta type does not have subtypes, then the default is keyed as an empty string. 1417 1419 if ( isset( $defaults[''] ) ) { 1418 1420 $metadata = $defaults['']; -
trunk/src/wp-includes/post.php
r48590 r48591 634 634 * 635 635 * @param mixed $args Optional. User defined arguments for replacing the defaults. Default empty. 636 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 637 * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. 636 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 637 * correspond to a WP_Post object, an associative array, or a numeric array, 638 * respectively. Default OBJECT. 638 639 * @return WP_Post[]|int[] Array of post objects or post IDs. 639 640 */ … … 752 753 * 753 754 * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post. 754 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 755 * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. 755 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 756 * correspond to a WP_Post object, an associative array, or a numeric array, 757 * respectively. Default OBJECT. 756 758 * @param string $filter Optional. Type of filter to apply. Accepts 'raw', 'edit', 'db', 757 759 * or 'display'. Default 'raw'. … … 3506 3508 * 3507 3509 * @param array $args Optional. Arguments to retrieve posts. Default empty array. 3508 * @param string $output Optional. The required return type. One of OBJECT or ARRAY_A, which correspond to 3509 * a WP_Post object or an associative array, respectively. Default ARRAY_A. 3510 * @return array|false Array of recent posts, where the type of each element is determined by $output parameter. 3511 * Empty array on failure. 3510 * @param string $output Optional. The required return type. One of OBJECT or ARRAY_A, which 3511 * correspond to a WP_Post object or an associative array, respectively. 3512 * Default ARRAY_A. 3513 * @return array|false Array of recent posts, where the type of each element is determined 3514 * by the `$output` parameter. Empty array on failure. 3512 3515 */ 3513 3516 function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) { … … 5049 5052 * 5050 5053 * @param int|WP_Post $page Page object or page ID. Passed by reference. 5051 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 5052 * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. 5054 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 5055 * correspond to a WP_Post object, an associative array, or a numeric array, 5056 * respectively. Default OBJECT. 5053 5057 * @param string $filter Optional. How the return value should be filtered. Accepts 'raw', 5054 5058 * 'edit', 'db', 'display'. Default 'raw'. … … 5067 5071 * 5068 5072 * @param string $page_path Page path. 5069 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 5070 * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. 5073 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 5074 * correspond to a WP_Post object, an associative array, or a numeric array, 5075 * respectively. Default OBJECT. 5071 5076 * @param string|array $post_type Optional. Post type or array of post types. Default 'page'. 5072 5077 * @return WP_Post|array|null WP_Post (or array) on success, or null on failure. … … 5169 5174 * 5170 5175 * @param string $page_title Page title. 5171 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 5172 * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. 5176 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 5177 * correspond to a WP_Post object, an associative array, or a numeric array, 5178 * respectively. Default OBJECT. 5173 5179 * @param string|array $post_type Optional. Post type or array of post types. Default 'page'. 5174 5180 * @return WP_Post|array|null WP_Post (or array) on success, or null on failure. -
trunk/src/wp-includes/revision.php
r48438 r48591 355 355 * 356 356 * @param int|WP_Post $post The post ID or object. 357 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 358 * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. 357 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 358 * correspond to a WP_Post object, an associative array, or a numeric array, 359 * respectively. Default OBJECT. 359 360 * @param string $filter Optional sanitation filter. See sanitize_post(). 360 361 * @return WP_Post|array|null WP_Post (or array) on success, or null on failure. -
trunk/src/wp-includes/taxonomy.php
r48590 r48591 840 840 * @see sanitize_term_field() The $context param lists the available values for get_term_by() $filter param. 841 841 * 842 * @param int|WP_Term|object $term If integer, term data will be fetched from the database, or from the cache if 843 * available. If stdClass object (as in the results of a database query), will apply 844 * filters and return a `WP_Term` object corresponding to the `$term` data. If 845 * `WP_Term`, will return `$term`. 846 * @param string $taxonomy Optional. Taxonomy name that $term is part of. 842 * @param int|WP_Term|object $term If integer, term data will be fetched from the database, 843 * or from the cache if available. 844 * If stdClass object (as in the results of a database query), 845 * will apply filters and return a `WP_Term` object with the `$term` data. 846 * If `WP_Term`, will return `$term`. 847 * @param string $taxonomy Optional. Taxonomy name that `$term` is part of. 847 848 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 848 * correspond to a WP_Term object, an associative array, or a numeric array849 * correspond to a WP_Term object, an associative array, or a numeric array, 849 850 * respectively. Default OBJECT. 850 851 * @param string $filter Optional. How to sanitize term fields. Default 'raw'. 851 * @return WP_Term|array|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT', 852 * a WP_Term instance is returned. If taxonomy does not exist, a WP_Error is 853 * returned. Returns null for miscellaneous failure. 852 * @return WP_Term|array|WP_Error|null WP_Term instance (or array) on success, depending on the `$output` value. 853 * WP_Error if `$taxonomy` does not exist. Null for miscellaneous failure. 854 854 */ 855 855 function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) { … … 957 957 * @param string|int $value Search for this term value. 958 958 * @param string $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'. 959 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to 960 * a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT. 959 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 960 * correspond to a WP_Term object, an associative array, or a numeric array, 961 * respectively. Default OBJECT. 961 962 * @param string $filter Optional. How to sanitize term fields. Default 'raw'. 962 * @return WP_Term|array|false WP_Term instance (or array) on success . Will return false if `$taxonomy` does not exist963 * or `$term` was not found.963 * @return WP_Term|array|false WP_Term instance (or array) on success, depending on the `$output` value. 964 * False if `$taxonomy` does not exist or `$term` was not found. 964 965 */ 965 966 function get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) { -
trunk/src/wp-includes/wp-db.php
r48590 r48591 2577 2577 * 2578 2578 * @param string|null $query SQL query. 2579 * @param string $output Optional. The required return type. Possible values include2580 * OBJECT, ARRAY_A, or ARRAY_N, which correspond to an stdClass object,2581 * an associative array, or a numeric array,respectively. Default OBJECT.2579 * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which 2580 * correspond to an stdClass object, an associative array, or a numeric array, 2581 * respectively. Default OBJECT. 2582 2582 * @param int $y Optional. Row to return. Indexed from 0. 2583 2583 * @return array|object|null|void Database query result in format specified by $output or null on failure.
Note: See TracChangeset
for help on using the changeset viewer.