You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 51054cb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/wp-includes/class-wp-application-passwords.php
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -61,13 +61,15 @@ public static function is_in_use() {
61
61
* @since 5.6.0
62
62
* @since 5.7.0 Returns WP_Error if application name already exists.
63
63
* @since 6.8.0 The hashed password value now uses wp_fast_hash() instead of phpass.
64
+
* @since 7.2.0 Returns WP_Error if the expiration is not in the future.
64
65
*
65
66
* @param int $user_id User ID.
66
67
* @param array $args {
67
68
* Arguments used to create the application password.
68
69
*
69
-
* @type string $name The name of the application password.
70
-
* @type string $app_id A UUID provided by the application to uniquely identify it.
70
+
* @type string $name The name of the application password.
71
+
* @type string $app_id A UUID provided by the application to uniquely identify it.
72
+
* @type int|null $expires Optional. Unix timestamp of when the password expires. Default null.
71
73
* }
72
74
* @return array|WP_Error {
73
75
* Application password details, or a WP_Error instance if an error occurs.
@@ -95,6 +97,17 @@ public static function create_new_application_password( $user_id, $args = array(
95
97
returnnewWP_Error( 'application_password_empty_name', __( 'An application name is required to create an application password.' ), array( 'status' => 400 ) );
0 commit comments