{"id":38381,"date":"2015-08-23T05:47:16","date_gmt":"2015-08-23T05:47:16","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/mm-ajax-login\/"},"modified":"2015-12-07T14:36:02","modified_gmt":"2015-12-07T14:36:02","slug":"mm-ajax-login","status":"publish","type":"plugin","link":"https:\/\/dzo.wordpress.org\/plugins\/mm-ajax-login\/","author":13934819,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"1.0.0","tested":"4.4.34","requires":"3.8","requires_php":"","requires_plugins":"","header_name":"Mm Ajax Login","header_author":"MIGHTYminnow, Braad Martin","header_description":"","assets_banners_color":"333333","last_updated":"2015-12-07 14:36:02","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/wordpress.org\/plugins\/mm-ajax-login","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/mm-ajax-login\/","header_author_uri":"http:\/\/mightyminnow.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2097,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0.0":"<p>First Release<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1228294","resolution":"128x128","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1228672","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1228294","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1228294","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1228294","resolution":"3","location":"assets"}},"screenshots":{"1":"The login form in twentyfifteen","2":"The login form in twentyfourteen","3":"The login form in twentytwelve"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[221,361,237,602],"plugin_category":[38,42,59],"plugin_contributors":[80938,78527],"plugin_business_model":[],"class_list":["post-38381","plugin","type-plugin","status-publish","hentry","plugin_tags-ajax","plugin_tags-form","plugin_tags-lightbox","plugin_tags-login","plugin_category-authentication","plugin_category-contact-forms","plugin_category-utilities-and-tools","plugin_contributors-braad","plugin_contributors-mightyminnow","plugin_committers-braad"],"banners":{"banner":"https:\/\/ps.w.org\/mm-ajax-login\/assets\/banner-772x250.png?rev=1228672","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/mm-ajax-login\/assets\/icon-128x128.png?rev=1228294","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/mm-ajax-login\/assets\/screenshot-1.png?rev=1228294","caption":"The login form in twentyfifteen"},{"src":"https:\/\/ps.w.org\/mm-ajax-login\/assets\/screenshot-2.png?rev=1228294","caption":"The login form in twentyfourteen"},{"src":"https:\/\/ps.w.org\/mm-ajax-login\/assets\/screenshot-3.png?rev=1228294","caption":"The login form in twentytwelve"}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<h4>Scenario<\/h4>\n\n<p>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.<\/p>\n\n<h4>Customize It!<\/h4>\n\n<p>This plugin includes lots of hooks and filters that allow for all sorts of customizations and unique use cases. Here's a quick list:<\/p>\n\n<p>Actions:<\/p>\n\n<pre><code>mm_ajax_login_before_form_outside\nmm_ajax_login_before_form_inside\nmm_ajax_login_extra_buttons\nmm_ajax_login_after_form_inside\nmm_ajax_login_after_form_outside\n<\/code><\/pre>\n\n<p>Filters:<\/p>\n\n<pre><code>mm_ajax_login_trigger_selector\nmm_ajax_login_form_title\nmm_ajax_login_status_message\nmm_ajax_login_username_label\nmm_ajax_login_password_label\nmm_ajax_login_rememberme_text\nmm_ajax_login_lost_password_text\nmm_ajax_login_button_text\nmm_ajax_login_custom_login_action\nmm_ajax_login_email_login_fail_message\nmm_ajax_login_success_message\nmm_ajax_login_fail_message\nmm_ajax_login_allow_email_login\n<\/code><\/pre>\n\n<p>Many things are possible with these hooks. The hooks <code>mm_ajax_login_before_form_inside<\/code> and <code>mm_ajax_login_after_form_inside<\/code> 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 <code>mm_ajax_login_custom_login_action<\/code> 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.<\/p>\n\n<h4>Filter Examples<\/h4>\n\n<p><strong>Use a custom selector for the trigger link:<\/strong><\/p>\n\n<pre><code>add_filter( 'mm_ajax_login_trigger_selector', 'prefix_custom_login_trigger' );\nfunction prefix_custom_login_trigger( $selector ) {\n\n    \/\/ Custom selector goes here.\n    $selector = '.my-custom-selector';\n\n    return $selector;\n}\n<\/code><\/pre>\n\n<p><strong>Use a custom status message:<\/strong><\/p>\n\n<pre><code>add_filter( 'mm_ajax_login_status_message', 'prefix_custom_status_message' );\nfunction prefix_custom_status_message( $status_message ) {\n\n    \/\/ Custom status message goes here.\n    $status_message = 'Magic happening...';\n\n    return $status_message;\n}\n<\/code><\/pre>\n\n<p>This plugin is <a href=\"https:\/\/github.com\/MIGHTYminnow\/mm-ajax-login\">on Github<\/a> and pull requests are always welcome.<\/p>\n\n<!--section=installation-->\n<h4>Manual Installation<\/h4>\n\n<ol>\n<li>Upload the entire \/mm-ajax-login directory to the \/wp-content\/plugins\/ directory.<\/li>\n<li>Activate Mm Ajax Login through the 'Plugins' menu in WordPress.<\/li>\n<\/ol>\n\n<h4>Better Installation<\/h4>\n\n<ol>\n<li>Go to Plugins &gt; Add New in your WordPress admin and search for Mm Ajax Login.<\/li>\n<li>Click Install.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Can I use any selector I want?<\/dt>\n<dd><p>Yes! The included filter <code>mm_ajax_login_trigger_selector<\/code> allows you to specify any custom selector you want as a string. The default value is <code>.ajax-login-trigger<\/code>.<\/p><\/dd>\n<dt>Can the form be styled?<\/dt>\n<dd><p>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.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release<\/li>\n<\/ul>","raw_excerpt":"A custom lightbox login form that serves as a gatekeeper for links with the class &quot;ajax-login-trigger&quot;.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/38381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=38381"}],"author":[{"embeddable":true,"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/braad"}],"wp:attachment":[{"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=38381"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=38381"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=38381"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=38381"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=38381"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/dzo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=38381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}