cferdinandi / gmt-wordpress-for-web-apps

[DEPRECATED] A plugin that provides the essential components you need to power your web app with WordPress.
MIT License
66 stars 12 forks source link

[DEPRECATED] WordPress for Web Apps

Deprecation Notice: This plugin is no longer be maintained or updated.

A plugin that provides the essential components you need to power your web app with WordPress.

Download WordPress for Web Apps

Getting Started

Getting started with WordPress for Web Apps is as simple as installing a plugin:

  1. Upload the wordpress-for-web-apps folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.

To make sure you always get the latest updates, it’s recommended that you also install the GitHub Updater plugin.

Using WordPress for Web Apps

Configure all of your settings under Settings > Web Apps in the WordPress Dashboard.

Shortcodes

User Access

All pages will now include a metabox labeled User Access. Select Everyone, Only Logged In Users, or Only Logged Out Users as desired and publish or update your page.

Action Hooks

wpwebapp_after_login

Runs after a user has logged in. Passes in the user's $username as an argument.

do_action( 'wpwebapp_after_login', $username );

wpwebapp_after_signup

Runs after a user has signed up. Passes in the new user's $username and $email as arguments.

do_action( 'wpwebapp_after_signup', $username, $email );

wpwebapp_after_email_change

Runs after a user has changed their email address. Passes in the user's $user_id and $old_email as arguments.

do_action( 'wpwebapp_after_email_change', $user_id, $old_email );

wpwebapp_after_password_change

Runs after a user's password has been changed. Passes in the user's $user_id as an argument.

do_action( 'wpwebapp_after_password_change', $user_id );

wpwebapp_after_password_forgot_email_sent

Runs after a password reset email is sent to a user. Passes in the user's $user_id as an argument.

do_action( 'wpwebapp_after_password_forgot_email_sent', $user_id );

wpwebapp_after_password_reset

Runs after a user's password has been reset. Passes in the user's $user_id as an argument.

do_action( 'wpwebapp_after_password_reset', $user_id );

wpwebapp_after_delete_user

Runs after a user deletes their account. Passes in the former user's $username and $email as arguments.

do_action( 'wpwebapp_after_delete_user',  $username, $email );

Redirecting after login or signup

To redirect a user back to their current page after login or sign up, add the referrer={{current URL}} query string to the login or sign up page URL, where {{current URL}} is the URL of the page the user is currently on. You can also use the [wpwa_referrer] shortcode to handle this dynamically.

CSS Hooks

Every form and input includes a unique id you can hook into for styling. Additionally, form element categories also include shared classes you can use to easily style like elements in a consistent way.

How to Contribute

To contribute to this project, please consult the Contribution Guidelines.

License

The code is available under the MIT License.