定制 enricodeleo/wp-client-ajax-login 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

enricodeleo/wp-client-ajax-login

最新稳定版本:0.1.8

Composer 安装命令:

composer require enricodeleo/wp-client-ajax-login

包简介

A simple plugin that allows login to wordpress through the client's browser via AJAX.

README 文档

README

A simple helper plugin that allows login to wordpress through the client's browser via AJAX.

How to install

Composer

If you're using Composer to manage your codebase add this plugin to your dependencies running:

composer require enricodeleo/wp-client-ajax-login 0.1.8

Or manually add it to your composer.json:

"require": {
  "enricodeleo/wp-client-ajax-login": "0.1.8"
}

Legacy way

Download this repo as a zip file and extract it to your wp-content/plugins directory.

OR

Install this plugin via the official Wordpress Plugin registry https://wordpress.org/plugins/wp-client-ajax-login/admin/.

Usage

This plugin is an helper and doesn't add anything to your wordpress theme. You might want to use it in conjunction with your frontend custom code.

You can use vanilla Javascript, Angular, or any framework that suits your needs.

Here's an example with jQuery:

$.ajax({
    type: "POST",
    url: "http://yoursite.dev/wp-admin/admin-ajax.php", //change this url acoording to your wp site
    xhrFields: {
        withCredentials: true
    },
    data: {
        user: "username", //hard-coded for example purposes
        pwd: "password", //hard-coded for example purposes
        action: "clientAjaxLogin"
    },
    success: function(resp) {
        var respObj = JSON.parse( resp );
        if( respObj.success ) {
            window.location = respObj.success;
        } else {
            console.log( respObj.error );
        }
    }
});

Of course you can bind the ajax call to an event like submitting a form.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: Shell

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固