zentheme/wpikaday 问题修复 & 功能扩展

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

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

zentheme/wpikaday

Composer 安装命令:

composer require zentheme/wpikaday

包简介

A Pikaday calendar Control for Wordpress customizer.

README 文档

README

This module provides a Wordpress customizer Control based on the Pikaday Datepicker project. The module is available via composer so it can be added to a plugin or theme.

The Pikaday Datepicker has a pretty comprehensive range of config options, most of which are available to the Control, you can check them out on the Pikaday Project page on Github.

Install with composer

Download and install Composer by following the official instructions. For usage, see the documentation.

Run the following in your terminal to install the module with Composer.

$ composer require zentheme/wpikaday

As this project uses PSR-4 autoloading you will need to use Composers autoloader.

Using the Control

Below is a simple example of how the control might be used in a plugin or theme. The example assumes that the vendor/autoload.php file has already been included.

use Zentheme\Customizer\Control\PikadayControl;

// Projects customizer configuration
add_action( 'customize_register', function( $wpCustomize ) {
    // Add a section...
    $wpCustomize->add_section( 'pikaday_section', [
        'title' => 'Pikaday Section'
    ] );
    
    // Then a setting...
    $wpCustomize->add_setting( 'pikaday_setting', [
        'default' => '',
        'transport' => 'postMessage'
    ] );
    
    // ...and finally add the Pikaday control
    $wpCustomize->add_control( 
        new PikadayControl( $wpCustomize, 'pikaday_control', [
            'label' => 'Pikaday Calendar',
            'section' => 'pikaday_section',
            'settings' => 'pikaday_setting',
            'position' => 'bottom right',   // position the  datepicker
            'format' => 'MMMM Do YYYY'      // define the date format
            // ... add any other valid Pikaday params here
        ] )
    );
} );

Notes

Author

John Dundon

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固