Title: Mm Ajax Login
Author: Braad
Published: <strong>23. August 2015</strong>
Last modified: 7. Dezember 2015

---

Search plugins

![](https://ps.w.org/mm-ajax-login/assets/banner-772x250.png?rev=1228672)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/mm-ajax-login/assets/icon-128x128.png?rev=1228294)

# Mm Ajax Login

 By [Braad](https://profiles.wordpress.org/braad/)

[Download](https://downloads.wordpress.org/plugin/mm-ajax-login.1.0.0.zip)

 * [Details](https://de-ch.wordpress.org/plugins/mm-ajax-login/#description)
 * [Reviews](https://de-ch.wordpress.org/plugins/mm-ajax-login/#reviews)
 *  [Installation](https://de-ch.wordpress.org/plugins/mm-ajax-login/#installation)
 * [Development](https://de-ch.wordpress.org/plugins/mm-ajax-login/#developers)

 [Support](https://wordpress.org/support/plugin/mm-ajax-login/)

## Description

This plugin allows you to create special links that check whether a user is logged
in and then follow the link if they are or show an ajax-powered login form in a 
simple lightbox if they are not. Once the user fills out the login form with valid
credentials they will be logged in and redirected to the page the link points to.

#### Scenario

Let’s say you’ve got a page on your site that only logged in users are able to access.
It could be a private page or ideally it is a page that is set up to show a standard
login form to users who are not logged in. With this plugin you could add the class‚
ajax-login-trigger‘ to all the links that point to that page, then when a user clicks
one of these links an ajax request is sent to the server to check whether the user
is already logged in, and if they are the user is redirected to the page without
ever noticing that the login check was done, or if they aren’t logged in they’ll
see a login form appear in a simple lightbox. When the user fills out the form, 
a second ajax request is sent to the server to attempt to log them in, and if successful
the user is redirected to the page.

#### Customize It!

This plugin includes lots of hooks and filters that allow for all sorts of customizations
and unique use cases. Here’s a quick list:

Actions:

    ```
    mm_ajax_login_before_form_outside
    mm_ajax_login_before_form_inside
    mm_ajax_login_extra_buttons
    mm_ajax_login_after_form_inside
    mm_ajax_login_after_form_outside
    ```

Filters:

    ```
    mm_ajax_login_trigger_selector
    mm_ajax_login_form_title
    mm_ajax_login_status_message
    mm_ajax_login_username_label
    mm_ajax_login_password_label
    mm_ajax_login_rememberme_text
    mm_ajax_login_lost_password_text
    mm_ajax_login_button_text
    mm_ajax_login_custom_login_action
    mm_ajax_login_email_login_fail_message
    mm_ajax_login_success_message
    mm_ajax_login_fail_message
    mm_ajax_login_allow_email_login
    ```

Many things are possible with these hooks. The hooks `mm_ajax_login_before_form_inside`
and `mm_ajax_login_after_form_inside` allow you to add any custom input elements
to the form. When the login form is submitted all of the values from the input elements
included in the form will get passed to the PHP function that processes the ajax
request, which will then pass the data to the `mm_ajax_login_custom_login_action`
filter. You can intercept the incoming data using this filter and proceed with any
custom action you want, like registering new users and logging them in during the
same action.

#### Filter Examples

**Use a custom selector for the trigger link:**

    ```
    add_filter( 'mm_ajax_login_trigger_selector', 'prefix_custom_login_trigger' );
    function prefix_custom_login_trigger( $selector ) {

        // Custom selector goes here.
        $selector = '.my-custom-selector';

        return $selector;
    }
    ```

**Use a custom status message:**

    ```
    add_filter( 'mm_ajax_login_status_message', 'prefix_custom_status_message' );
    function prefix_custom_status_message( $status_message ) {

        // Custom status message goes here.
        $status_message = 'Magic happening...';

        return $status_message;
    }
    ```

This plugin is [on Github](https://github.com/MIGHTYminnow/mm-ajax-login) and pull
requests are always welcome.

## Screenshots

[⌊The login form in twentyfifteen⌉⌊The login form in twentyfifteen⌉[

The login form in twentyfifteen

[⌊The login form in twentyfourteen⌉⌊The login form in twentyfourteen⌉[

The login form in twentyfourteen

[⌊The login form in twentytwelve⌉⌊The login form in twentytwelve⌉[

The login form in twentytwelve

## Installation

#### Manual Installation

 1. Upload the entire /mm-ajax-login directory to the /wp-content/plugins/ directory.
 2. Activate Mm Ajax Login through the ‚Plugins‘ menu in WordPress.

#### Better Installation

 1. Go to Plugins > Add New in your WordPress admin and search for Mm Ajax Login.
 2. Click Install.

## FAQ

  Can I use any selector I want?

Yes! The included filter `mm_ajax_login_trigger_selector` allows you to specify 
any custom selector you want as a string. The default value is `.ajax-login-trigger`.

  Can the form be styled?

Yes! The default CSS is designed to be minimal and work with the existing styles
included in your theme, but you can write additional CSS to take full control over
the lightbox and form.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Mm Ajax Login” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ Braad ](https://profiles.wordpress.org/braad/)
 *   [ MIGHTYminnow ](https://profiles.wordpress.org/mightyminnow/)

“Mm Ajax Login” has been translated into 1 locale. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/mm-ajax-login/contributors)
for their contributions.

[Translate “Mm Ajax Login” into your language.](https://translate.wordpress.org/projects/wp-plugins/mm-ajax-login)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/mm-ajax-login/), check
out the [SVN repository](https://plugins.svn.wordpress.org/mm-ajax-login/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/mm-ajax-login/) 
by [RSS](https://plugins.trac.wordpress.org/log/mm-ajax-login/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * First release

## Meta

 *  Version **1.0.0**
 *  Last updated **11 Jahren ago**
 *  Active installations **10+**
 *  WordPress version ** 3.8 or higher **
 *  Tested up to **4.4.34**
 *  Languages
 * [English (US)](https://wordpress.org/plugins/mm-ajax-login/) und [Swedish](https://sv.wordpress.org/plugins/mm-ajax-login/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/mm-ajax-login)
 * Tags
 * [ajax](https://de-ch.wordpress.org/plugins/tags/ajax/)[form](https://de-ch.wordpress.org/plugins/tags/form/)
   [lightbox](https://de-ch.wordpress.org/plugins/tags/lightbox/)[login](https://de-ch.wordpress.org/plugins/tags/login/)
 *  [Advanced View](https://de-ch.wordpress.org/plugins/mm-ajax-login/advanced/)

## Ratings

Es wurden noch keine Rezensionen eingereicht.

[Your review](https://wordpress.org/support/plugin/mm-ajax-login/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/mm-ajax-login/reviews/)

## Contributors

 *   [ Braad ](https://profiles.wordpress.org/braad/)
 *   [ MIGHTYminnow ](https://profiles.wordpress.org/mightyminnow/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/mm-ajax-login/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://wordpress.org/plugins/mm-ajax-login)