微慕WordPress小程序商城
  • 微慕官网
  • 微慕产品
  • 增值服务
  • 问答社区
  • 安装文档
  • 联系客服
登录

wordpress插件之Login With Ajax

Wordpress插件 2020-06-09 0 376

Login With Ajax的作者是Marcus Sykes,目前有50,000+个有效安装。已经Tested with 5.4.1版本的wordpress。
Description
Login With Ajax is for sites that need user logins or registrations and would like to avoid the normal wordpress login pages, this plugin adds the capability of placing a login widget in the sidebar with smooth AJAX login effects.
Some of the features:

AJAX-powered, no screen refreshes!

Login
Registration
Remember/Reset Password

Custom Login/Logout redirections

Redirect users to custom URLs on Login and Logout
Redirect users with different roles to custom URLs
WPML – Language-specific redirects

SSL-compatible
Fallback mechanism, will still work on javascript-disabled browsers
Compatible with WordPress, MultiSite, BuddyPress and many other plugins that alter the login/registration form (e.g. captcha plugins)
Customizable, upgrade-safe widgets
shortcode and template tags available
Widget specific option to show link to profile page

If you have any problems with the plugin after reading the FAQ, Other Notes, etc. please visit the support forums.
Translated Languages Available
To view translated languages avaialble or to contribute translations in your language, visit the WordPress translation portal. Any translated languages over 90% will be automatically installed with the plugin, for other languages not fully translated, please see our FAQ.
Notes
Shortcodes & Template Tags
You can use the shortcode [login-with-ajax] or [lwa] and template tag login_with_ajax() with these options :

profile_link – (1 or 0)

If value is 1 (default), a profile link to wp-admin appears.

registration – (1 or 0)

If value is 1 (default), a registration link appears, providing you have registration enabled in your WP settings.

template – (template name/directory)

If this template directory exists, this template will be used. Default is ‘default’ template.

remember – (1 or 0)

If value is 1 (default), a remember password link appears for password recovery

redirect

Successful logins are redirected to this URL

Multilingual Support
We have WPML compatiblity with regards to login/logout redirects. Aside from custom redirect links for each language, you can also use the %LANG% placeholder to dynamically insert the language fragment used to build URLs, such as en for English or es for Spanish.
SSL Logins
To force SSL, see http://codex.wp101.net/Administration_Over_SSL. The plugin will automatically detect the wordpress settings.
Customizing the Widget
You can customize the html widgets in an upgrade-safe manner by copying files and editing them within your theme. Firstly, you need to understand how Login With Ajax loads templates:

When looking for files/templates there is an order of precedence – active child theme (if applicable), active parent themes, and finally the plugin folder:

wp-content/themes/your-theme/plugins/login-with-ajax/
wp-content/themes/parent-theme/plugins/login-with-ajax/
wp-content/plugins/login-with-ajax/widget/

Login With Ajax loads only one CSS and JS file which contains code for all templates. The plugin checks the locations above and loads the one it finds first. The default files are:

wp-content/plugins/login-with-ajax/widget/login-with-ajax.js
wp-content/plugins/login-with-ajax/widget/widget.css

One caveat for JavaScript files, if you’ve enabled WP_DEBUG, then LWA will look for a file called login-with-ajax.source.js, a non-minified version of the normal JS file.

Login With Ajax then checks for template folders which are loaded according to the preference highlighted above.

When a user is logged out, the widget_out.php will be used.
If logged out, then widget_in.php will be used
If either of these files don’t exist in your template, the one located in the default folder will be used (which you can also override in your theme).

Examples
If you wanted to change some text on the default theme, you could simply copy wp-content/plugins/login-with-ajax/widget/default to wp-content/themes/yourtheme/plugins/login-with-ajax/default and edit the files as needed.
If you need to change the CSS file, copy the file wp-content/plugins/login-with-ajax/widget/widget.css over to wp-content/themes/yourtheme/plugins/login-with-ajax/widget.css and edit accordingly.
The JavaScript ajax magic relies on the class names and hierarchical structure within the template files, if you want to modify the templates without adding your own JS, make sure you keep these class names and structure intact.

ajaxAjax loginloginregistrationwordpress小程序微慕小程序
上一篇 wordpress插件之Hide Title
下一篇 wordpress插件之Subscribe to Comments

相关文章

【开源版Free】微慕WordPress小程序开源版插件及小程序源码

【开源版Free】微慕WordPress小程序开源版插件及小程序源码

微慕插件 2022-04-18 42.4K 免费
wordpress插件之Optimus – WordPress Image Optimizer

wordpress插件之Optimus – WordPress Image Optimizer

Wordpress插件 2020-08-30 488
wordpress插件之SVG Support

wordpress插件之SVG Support

Wordpress插件 2020-08-30 562
wordpress插件之WooCommerce Multilingual – run WooCommerce with WPML

wordpress插件之WooCommerce Multilingual – run WooCommerce with WPML

Wordpress插件 2020-08-30 507
联系客服阿里云优惠券腾讯云优惠券
标签
admin analytics backup cache contact form contact form 7 database ecommerce editor elementor email facebook forms gallery GDPR google google analytics gutenberg image images login menu navigation page page builder pages performance post posts responsive security seo shortcode sitemap slider smtp social media spam theme twitter widget widgets woocommerce wordpress小程序 微慕小程序

Copyright © 2021 微慕小程序 - All rights reserved | 湘ICP备17019343号 |

  • 首页
  • 分类
  • 客服
  • 我的
  • 顶部