nimos/wp-nonce-wrapper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

nimos/wp-nonce-wrapper

Composer 安装命令:

composer require nimos/wp-nonce-wrapper

包简介

README 文档

README

This wrapper provides Wordpress' nonce functionality in an object-oriented environment.

Installation

To install the package, run composer require nimos/wp-nonce-wrapper.
Alternatively, you can download the zip file from Github, and run composer update to install the dependencies.

Usage

Create a Nonce:

$nonce = WpNonceWrapper::create_nonce();

Generate a nonce URL for 'http://example.com':

$url = WpNonceWrapper::nonce_url( 'http://example.com' );

Generate hidden input to use a nonce in a form:

WpNonceWrapper::nonce_field();

Verify a Nonce:

$valid = WpNonceWrapper::verify_nonce( $nonce );

Display an are you sure dialogue, to manually confirm an action:

WpNonceWrapper::nonce_ays( $someAction );

Testing

To run the tests, run vendor\bin\phpunit tests\WrapperTest.php
You will likely have to update WP_DIR in the test file to point to your Wordpress installation.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-04-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固