diff --git a/resources/sprite/login_1x/WordPressCOM.png b/resources/sprite/login_1x/WordPressCOM.png new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@ 'applications/auth/provider/PhabricatorAuthProviderOAuthGitHub.php', 'PhabricatorAuthProviderOAuthGoogle' => 'applications/auth/provider/PhabricatorAuthProviderOAuthGoogle.php', 'PhabricatorAuthProviderOAuthTwitch' => 'applications/auth/provider/PhabricatorAuthProviderOAuthTwitch.php', + 'PhabricatorAuthProviderOAuthWordPress' => 'applications/auth/provider/PhabricatorAuthProviderOAuthWordPress.php', 'PhabricatorAuthProviderPassword' => 'applications/auth/provider/PhabricatorAuthProviderPassword.php', 'PhabricatorAuthProviderPersona' => 'applications/auth/provider/PhabricatorAuthProviderPersona.php', 'PhabricatorAuthRegisterController' => 'applications/auth/controller/PhabricatorAuthRegisterController.php', @@ -4041,6 +4042,7 @@ 'PhabricatorAuthProviderOAuthGitHub' => 'PhabricatorAuthProviderOAuth2', 'PhabricatorAuthProviderOAuthGoogle' => 'PhabricatorAuthProviderOAuth2', 'PhabricatorAuthProviderOAuthTwitch' => 'PhabricatorAuthProviderOAuth2', + 'PhabricatorAuthProviderOAuthWordPress' => 'PhabricatorAuthProviderOAuth2', 'PhabricatorAuthProviderPassword' => 'PhabricatorAuthProvider', 'PhabricatorAuthProviderPersona' => 'PhabricatorAuthProvider', 'PhabricatorAuthRegisterController' => 'PhabricatorAuthController', diff --git a/src/applications/auth/provider/PhabricatorAuthProviderOAuthWordPress.php b/src/applications/auth/provider/PhabricatorAuthProviderOAuthWordPress.php new file mode 100644 --- /dev/null +++ b/src/applications/auth/provider/PhabricatorAuthProviderOAuthWordPress.php @@ -0,0 +1,38 @@ +getLoginURI()); + + return pht( + "To configure WordPress.com OAuth, create a new WordPress.com ". + "Application here:\n\n". + "https://developer.wordpress.com/apps/new/.". + "\n\n". + "You should use these settings in your application:". + "\n\n". + " - **URL:** Set this to your full domain with protocol. For this ". + " Phabricator install, the correct value is: `%s`\n". + " - **Redirect URL**: Set this to: `%s`\n". + "\n\n". + "Once you've created an application, copy the **Client ID** and ". + "**Client Secret** into the fields above.", + $uri, + $callback_uri); + } + + protected function newOAuthAdapter() { + return new PhutilAuthAdapterOAuthWordPress(); + } + + protected function getLoginIcon() { + return 'WordPressCOM'; + } +} diff --git a/webroot/rsrc/css/sprite-login.css b/webroot/rsrc/css/sprite-login.css --- a/webroot/rsrc/css/sprite-login.css +++ b/webroot/rsrc/css/sprite-login.css @@ -86,6 +86,10 @@ background-position: 0px -140px; } -.login-Yahoo { +.login-WordPressCOM { background-position: -35px -140px; } + +.login-Yahoo { + background-position: -70px -140px; +} diff --git a/webroot/rsrc/image/sprite-login-X2.png b/webroot/rsrc/image/sprite-login-X2.png index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@