Changeset 59009
- Timestamp:
- 09/11/2024 12:06:15 PM (4 months ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/translation-install.php
r58813 r59009 15 15 * @param string $type Type of translations. Accepts 'plugins', 'themes', 'core'. 16 16 * @param array|object $args Translation API arguments. Optional. 17 * @return array|WP_Error On success an associative array of translations, WP_Error on failure. 17 * @return array|WP_Error { 18 * On success an associative array of translations, WP_Error on failure. 19 * 20 * @type array $translations { 21 * List of translations, each an array of data. 22 * 23 * @type array ...$0 { 24 * @type string $language Language code. 25 * @type string $version WordPress version. 26 * @type string $updated Date the translation was last updated, in MySQL datetime format. 27 * @type string $english_name English name of the language. 28 * @type string $native_name Native name of the language. 29 * @type string $package URL to download the translation package. 30 * @type string[] $iso Array of ISO language codes. 31 * @type array $strings Array of translated strings used in the installation process. 32 * } 33 * } 34 * } 18 35 */ 19 36 function translations_api( $type, $args = null ) { … … 101 118 * @since 4.0.0 102 119 * 103 * @param array|WP_Error $res Response as an associative array or WP_Error. 120 * @param array|WP_Error $res { 121 * On success an associative array of translations, WP_Error on failure. 122 * 123 * @type array $translations { 124 * List of translations, each an array of data. 125 * 126 * @type array ...$0 { 127 * @type string $language Language code. 128 * @type string $version WordPress version. 129 * @type string $updated Date the translation was last updated, in MySQL datetime format. 130 * @type string $english_name English name of the language. 131 * @type string $native_name Native name of the language. 132 * @type string $package URL to download the translation package. 133 * @type string[] $iso Array of ISO language codes. 134 * @type array $strings Array of translated strings used in the installation process. 135 * } 136 * } 137 * } 104 138 * @param string $type The type of translations being requested. 105 139 * @param object $args Translation API arguments. … … 115 149 * @see translations_api() 116 150 * 117 * @return array[] Array of translations, each an array of data, keyed by the language. If the API response results 118 * in an error, an empty array will be returned. 151 * @return array { 152 * Array of translations keyed by the language code, each an associative array of data. 153 * If the API response results in an error, an empty array will be returned. 154 * 155 * @type array ...$0 { 156 * @type string $language Language code. 157 * @type string $version WordPress version. 158 * @type string $updated Date the translation was last updated, in MySQL datetime format. 159 * @type string $english_name English name of the language. 160 * @type string $native_name Native name of the language. 161 * @type string $package URL to download the translation package. 162 * @type string[] $iso Array of ISO language codes. 163 * @type array $strings Array of translated strings used in the installation process. 164 * } 165 * } 119 166 */ 120 167 function wp_get_available_translations() { … … 133 180 134 181 $translations = array(); 135 // Key the array with the language code for now.182 // Key the array with the language code. 136 183 foreach ( $api['translations'] as $translation ) { 137 184 $translations[ $translation['language'] ] = $translation; -
trunk/src/wp-includes/blocks.php
r58801 r59009 1433 1433 * 1434 1434 * @param array $block { 1435 * A representative array of a single parsed block object. See WP_Block_Parser_Block.1435 * An associative array of a single parsed block object. See WP_Block_Parser_Block. 1436 1436 * 1437 1437 * @type string $blockName Name of block. … … 1474 1474 * 1475 1475 * @type array ...$0 { 1476 * A representative array of a single parsed block object. See WP_Block_Parser_Block.1476 * An associative array of a single parsed block object. See WP_Block_Parser_Block. 1477 1477 * 1478 1478 * @type string $blockName Name of block. … … 1516 1516 * @see serialize_block() 1517 1517 * 1518 * @param array $block A representative array of a single parsed block object. See WP_Block_Parser_Block.1518 * @param array $block An associative array of a single parsed block object. See WP_Block_Parser_Block. 1519 1519 * @param callable $pre_callback Callback to run on each block in the tree before it is traversed and serialized. 1520 1520 * It is called with the following arguments: &$block, $parent_block, $previous_block. … … 1998 1998 * 1999 1999 * @param array $parsed_block { 2000 * A representative array of the block being rendered. See WP_Block_Parser_Block.2000 * An associative array of the block being rendered. See WP_Block_Parser_Block. 2001 2001 * 2002 2002 * @type string $blockName Name of block. … … 2022 2022 * @param string|null $pre_render The pre-rendered content. Default null. 2023 2023 * @param array $parsed_block { 2024 * A representative array of the block being rendered. See WP_Block_Parser_Block.2024 * An associative array of the block being rendered. See WP_Block_Parser_Block. 2025 2025 * 2026 2026 * @type string $blockName Name of block. … … 2048 2048 * 2049 2049 * @param array $parsed_block { 2050 * A representative array of the block being rendered. See WP_Block_Parser_Block.2050 * An associative array of the block being rendered. See WP_Block_Parser_Block. 2051 2051 * 2052 2052 * @type string $blockName Name of block. … … 2096 2096 * @param array $context Default context. 2097 2097 * @param array $parsed_block { 2098 * A representative array of the block being rendered. See WP_Block_Parser_Block.2098 * An associative array of the block being rendered. See WP_Block_Parser_Block. 2099 2099 * 2100 2100 * @type string $blockName Name of block. … … 2125 2125 * 2126 2126 * @type array ...$0 { 2127 * A representative array of a single parsed block object. See WP_Block_Parser_Block.2127 * An associative array of a single parsed block object. See WP_Block_Parser_Block. 2128 2128 * 2129 2129 * @type string $blockName Name of block. -
trunk/src/wp-includes/class-wp-application-passwords.php
r55732 r59009 72 72 * Application password details, or a WP_Error instance if an error occurs. 73 73 * 74 * @type string $0 The unhashed generated application password.74 * @type string $0 The generated application password in plain text. 75 75 * @type array $1 { 76 76 * The details about the created password. … … 142 142 * @type null $last_ip Null. 143 143 * } 144 * @param string $new_password The unhashed generated application password.144 * @param string $new_password The generated application password in plain text. 145 145 * @param array $args { 146 146 * Arguments used to create the application password. … … 162 162 * @param int $user_id User ID. 163 163 * @return array { 164 * The list of app passwords.164 * The list of application passwords. 165 165 * 166 166 * @type array ...$0 { … … 205 205 * @param int $user_id User ID. 206 206 * @param string $uuid The password's UUID. 207 * @return array|null The application password if found, null otherwise. 207 * @return array|null { 208 * The application password if found, null otherwise. 209 * 210 * @type string $uuid The unique identifier for the application password. 211 * @type string $app_id A UUID provided by the application to uniquely identify it. 212 * @type string $name The name of the application password. 213 * @type string $password A one-way hash of the password. 214 * @type int $created Unix timestamp of when the password was created. 215 * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. 216 * @type string|null $last_ip The IP address the application password was last used by. 217 * } 208 218 */ 209 219 public static function get_user_application_password( $user_id, $uuid ) { … … 247 257 * @param int $user_id User ID. 248 258 * @param string $uuid The password's UUID. 249 * @param array $update Information about the application password to update. 259 * @param array $update { 260 * Information about the application password to update. 261 * 262 * @type string $uuid The unique identifier for the application password. 263 * @type string $app_id A UUID provided by the application to uniquely identify it. 264 * @type string $name The name of the application password. 265 * @type string $password A one-way hash of the password. 266 * @type int $created Unix timestamp of when the password was created. 267 * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. 268 * @type string|null $last_ip The IP address the application password was last used by. 269 * } 250 270 * @return true|WP_Error True if successful, otherwise a WP_Error instance is returned on error. 251 271 */ … … 283 303 * 284 304 * @param int $user_id The user ID. 285 * @param array $item The updated app password details. 305 * @param array $item { 306 * The updated application password details. 307 * 308 * @type string $uuid The unique identifier for the application password. 309 * @type string $app_id A UUID provided by the application to uniquely identify it. 310 * @type string $name The name of the application password. 311 * @type string $password A one-way hash of the password. 312 * @type int $created Unix timestamp of when the password was created. 313 * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. 314 * @type string|null $last_ip The IP address the application password was last used by. 315 * } 286 316 * @param array $update The information to update. 287 317 */ … … 405 435 * 406 436 * @param int $user_id User ID. 407 * @param array $passwords Application passwords. 408 * 409 * @return bool 437 * @param array $passwords { 438 * The list of application passwords. 439 * 440 * @type array ...$0 { 441 * @type string $uuid The unique identifier for the application password. 442 * @type string $app_id A UUID provided by the application to uniquely identify it. 443 * @type string $name The name of the application password. 444 * @type string $password A one-way hash of the password. 445 * @type int $created Unix timestamp of when the password was created. 446 * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used. 447 * @type string|null $last_ip The IP address the application password was last used by. 448 * } 449 * } 450 * @return int|bool User meta ID if the key didn't exist (ie. this is the first time that an application password 451 * has been saved for the user), true on successful update, false on failure or if the value passed 452 * is the same as the one that is already in the database. 410 453 */ 411 454 protected static function set_user_application_passwords( $user_id, $passwords ) { -
trunk/src/wp-includes/class-wp-block.php
r58398 r59009 115 115 * 116 116 * @param array $block { 117 * A representative array of a single parsed block object. See WP_Block_Parser_Block.117 * An associative array of a single parsed block object. See WP_Block_Parser_Block. 118 118 * 119 119 * @type string $blockName Name of block. -
trunk/src/wp-includes/class-wp-http.php
r57936 r59009 146 146 * 147 147 * } 148 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. 149 * A WP_Error instance upon error. 148 * @return array|WP_Error { 149 * Array of response data, or a WP_Error instance upon error. 150 * 151 * @type \WpOrg\Requests\Utility\CaseInsensitiveDictionary $headers Response headers keyed by name. 152 * @type string $body Response body. 153 * @type array $response { 154 * Array of HTTP response data. 155 * 156 * @type int|false $code HTTP response status code. 157 * @type string|false $message HTTP response message. 158 * } 159 * @type WP_HTTP_Cookie[] $cookies Array of cookies set by the server. 160 * @type string|null $filename Optional. Filename of the response. 161 * @type WP_HTTP_Requests_Response|null $http_response Response object. 162 * } 150 163 */ 151 164 public function request( $url, $args = array() ) { -
trunk/src/wp-includes/class-wp-site-query.php
r58454 r59009 264 264 * 265 265 * @param string|array $query Array or URL query string of parameters. 266 * @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids',267 * or the number of sites when 'count' is passed as a query var.266 * @return WP_Site[]|int[]|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', 267 * or the number of sites when 'count' is passed as a query var. 268 268 */ 269 269 public function query( $query ) { … … 280 280 * @global wpdb $wpdb WordPress database abstraction object. 281 281 * 282 * @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids',283 * or the number of sites when 'count' is passed as a query var.282 * @return WP_Site[]|int[]|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', 283 * or the number of sites when 'count' is passed as a query var. 284 284 */ 285 285 public function get_sites() { … … 334 334 * of the current WP_Site_Query instance. 335 335 * 336 * @param array|int|null $site_data Return an array of site data to short-circuit WP's site query,337 * the site count as an integer if `$this->query_vars['count']` is set,338 * or null to run the normal queries.339 * @param WP_Site_Query $query The WP_Site_Query instance, passed by reference.336 * @param WP_Site[]|int[]|int|null $site_data Return an array of site data to short-circuit WP's site query, 337 * the site count as an integer if `$this->query_vars['count']` is set, 338 * or null to run the normal queries. 339 * @param WP_Site_Query $query The WP_Site_Query instance, passed by reference. 340 340 */ 341 341 $site_data = apply_filters_ref_array( 'sites_pre_query', array( $site_data, &$this ) ); -
trunk/src/wp-includes/http.php
r58934 r59009 46 46 * See WP_Http::request() for information on accepted arguments. 47 47 * @return array|WP_Error The response or WP_Error on failure. 48 * See WP_Http::request() for information on return value. 48 49 */ 49 50 function wp_safe_remote_request( $url, $args = array() ) { … … 72 73 * See WP_Http::request() for information on accepted arguments. 73 74 * @return array|WP_Error The response or WP_Error on failure. 75 * See WP_Http::request() for information on return value. 74 76 */ 75 77 function wp_safe_remote_get( $url, $args = array() ) { … … 98 100 * See WP_Http::request() for information on accepted arguments. 99 101 * @return array|WP_Error The response or WP_Error on failure. 102 * See WP_Http::request() for information on return value. 100 103 */ 101 104 function wp_safe_remote_post( $url, $args = array() ) { … … 124 127 * See WP_Http::request() for information on accepted arguments. 125 128 * @return array|WP_Error The response or WP_Error on failure. 129 * See WP_Http::request() for information on return value. 126 130 */ 127 131 function wp_safe_remote_head( $url, $args = array() ) { … … 147 151 * @param array $args Optional. Request arguments. Default empty array. 148 152 * See WP_Http::request() for information on accepted arguments. 149 * @return array|WP_Error { 150 * The response array or a WP_Error on failure. 151 * 152 * @type string[] $headers Array of response headers keyed by their name. 153 * @type string $body Response body. 154 * @type array $response { 155 * Data about the HTTP response. 156 * 157 * @type int|false $code HTTP response code. 158 * @type string|false $message HTTP response message. 159 * } 160 * @type WP_HTTP_Cookie[] $cookies Array of response cookies. 161 * @type WP_HTTP_Requests_Response|null $http_response Raw HTTP response object. 162 * } 153 * @return array|WP_Error The response array or a WP_Error on failure. 154 * See WP_Http::request() for information on return value. 163 155 */ 164 156 function wp_remote_request( $url, $args = array() ) { … … 179 171 * See WP_Http::request() for information on accepted arguments. 180 172 * @return array|WP_Error The response or WP_Error on failure. 173 * See WP_Http::request() for information on return value. 181 174 */ 182 175 function wp_remote_get( $url, $args = array() ) { … … 197 190 * See WP_Http::request() for information on accepted arguments. 198 191 * @return array|WP_Error The response or WP_Error on failure. 192 * See WP_Http::request() for information on return value. 199 193 */ 200 194 function wp_remote_post( $url, $args = array() ) { … … 215 209 * See WP_Http::request() for information on accepted arguments. 216 210 * @return array|WP_Error The response or WP_Error on failure. 211 * See WP_Http::request() for information on return value. 217 212 */ 218 213 function wp_remote_head( $url, $args = array() ) { -
trunk/src/wp-includes/ms-site.php
r58962 r59009 440 440 * @param string|array $args Optional. Array or string of arguments. See WP_Site_Query::__construct() 441 441 * for information on accepted arguments. Default empty array. 442 * @return array|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids',443 * or the number of sites when 'count' is passed as a query var.442 * @return WP_Site[]|int[]|int List of WP_Site objects, a list of site IDs when 'fields' is set to 'ids', 443 * or the number of sites when 'count' is passed as a query var. 444 444 */ 445 445 function get_sites( $args = array() ) { -
trunk/src/wp-includes/pluggable.php
r58838 r59009 2565 2565 if ( ! function_exists( 'wp_hash_password' ) ) : 2566 2566 /** 2567 * Creates a hash (encrypt)of a plain text password.2567 * Creates a hash of a plain text password. 2568 2568 * 2569 2569 * For integration with other applications, this function can be overwritten to 2570 * instead use the other package password checking algorithm.2570 * instead use the other package password hashing algorithm. 2571 2571 * 2572 2572 * @since 2.5.0 … … 2592 2592 if ( ! function_exists( 'wp_check_password' ) ) : 2593 2593 /** 2594 * Checks the plaintext password against the encrypted Password.2594 * Checks a plaintext password against a hashed password. 2595 2595 * 2596 2596 * Maintains compatibility between old version and the new cookie authentication … … 2600 2600 * 2601 2601 * For integration with other applications, this function can be overwritten to 2602 * instead use the other package password checking algorithm.2602 * instead use the other package password hashing algorithm. 2603 2603 * 2604 2604 * @since 2.5.0 … … 2793 2793 if ( ! function_exists( 'wp_set_password' ) ) : 2794 2794 /** 2795 * Updates the user's password with a new encrypted one.2795 * Updates the user's password with a new hashed one. 2796 2796 * 2797 2797 * For integration with other applications, this function can be overwritten to -
trunk/src/wp-includes/post.php
r58962 r59009 7795 7795 * @param int|WP_Post $post Post ID or post object where thumbnail should be attached. 7796 7796 * @param int $thumbnail_id Thumbnail to attach. 7797 * @return int|bool True on success, false on failure. 7797 * @return int|bool Post meta ID if the key didn't exist (ie. this is the first time that 7798 * a thumbnail has been saved for the post), true on successful update, 7799 * false on failure or if the value passed is the same as the one that 7800 * is already in the database. 7798 7801 */ 7799 7802 function set_post_thumbnail( $post, $thumbnail_id ) { -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
r58783 r59009 517 517 /* 518 518 * Verify if the current user has edit_theme_options capability. 519 * This capability is required to edit/view/delete templates.519 * This capability is required to edit/view/delete global styles. 520 520 */ 521 521 if ( ! current_user_can( 'edit_theme_options' ) ) { … … 597 597 /* 598 598 * Verify if the current user has edit_theme_options capability. 599 * This capability is required to edit/view/delete templates.599 * This capability is required to edit/view/delete global styles. 600 600 */ 601 601 if ( ! current_user_can( 'edit_theme_options' ) ) { -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php
r58783 r59009 103 103 104 104 /** 105 * Creates a single post.105 * Creates a single nav menu item. 106 106 * 107 107 * @since 5.9.0 … … 268 268 269 269 /** 270 * Deletes a single menu item.270 * Deletes a single nav menu item. 271 271 * 272 272 * @since 5.9.0 … … 318 318 319 319 /** 320 * Prepares a single postfor create or update.320 * Prepares a single nav menu item for create or update. 321 321 * 322 322 * @since 5.9.0 … … 483 483 484 484 /** 485 * Prepares a single postoutput for response.485 * Prepares a single nav menu item output for response. 486 486 * 487 487 * @since 5.9.0 … … 679 679 680 680 /** 681 * Retrieves Link Description Objects that should be added to the Schema for the posts collection.681 * Retrieves Link Description Objects that should be added to the Schema for the nav menu items collection. 682 682 * 683 683 * @since 5.9.0 … … 706 706 707 707 /** 708 * Retrieves the term's schema, conforming to JSON Schema.708 * Retrieves the nav menu item's schema, conforming to JSON Schema. 709 709 * 710 710 * @since 5.9.0 … … 927 927 928 928 /** 929 * Retrieves the query params for the posts collection.929 * Retrieves the query params for the nav menu items collection. 930 930 * 931 931 * @since 5.9.0
Note: See TracChangeset
for help on using the changeset viewer.