Skip to content

Commit 8e1970e

Browse files
committed
perf: Optimize application_password_extras processing
Return early if the provided value is already truthy.
1 parent 0370c54 commit 8e1970e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

projects/plugins/jetpack/_inc/lib/class-jetpack-application-password-extras.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public static function init() {
3434
* @return bool The new value of the filter.
3535
*/
3636
public static function application_password_extras( $original_value ) {
37+
if ( $original_value ) {
38+
return true;
39+
}
40+
3741
// Allow Application Password access to admin-ajax.php
3842
if ( is_admin() && wp_doing_ajax() ) {
3943
return true;

0 commit comments

Comments
 (0)