Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add application-passwords plugin #17

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "plugins/disable-emojis"]
path = plugins/disable-emojis
url = https:/ryanhellyer/disable-emojis
[submodule "plugins/application-passwords"]
path = plugins/application-passwords
url = https:/WordPress/application-passwords.git
15 changes: 13 additions & 2 deletions client-mu-plugins/plugin-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/*
* We recommend all plugins for your site are
* loaded in code, either from a file like this
* one or from your theme (if the plugins are
* one or from your theme (if the plugins are
* specific to your theme and do not need to be
* loaded as early as this in the WordPress boot
* sequence.
*
*
* @see https://vip.wordpress.com/documentation/vip-go/understanding-your-vip-go-codebase/
*/

Expand Down Expand Up @@ -42,3 +42,14 @@ function cmu_always_multi_author( $transient ) {
return true;
}
add_filter( 'pre_transient_is_multi_author', 'cmu_always_multi_author' );

/**
* Allow api login using application-passwords even when account normally
* requires 2FA authentication.
*/
add_filter( 'two_factor_user_api_login_enable', function( $enable ) {
if ( did_action( 'application_password_did_authenticate' ) ) {
return true;
}
return $enable;
} );
1 change: 1 addition & 0 deletions plugins/application-passwords
Submodule application-passwords added at 0b8990