voceconnect/voce-post-meta-date
Composer 安装命令:
composer require voceconnect/voce-post-meta-date
包简介
Extension of Voce Post Meta Plugin to create date meta fields
关键字:
README 文档
README
Contributors: markparolisi, voceplatforms
Tags: post, meta, date
Requires at least: 3.5.0
Tested up to: 4.0.0
Stable tag: 2.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Description
Extend Voce Post Meta with date/time pickers
Installation
As standard plugin:
See Installing Plugins.
As theme or plugin dependency:
After dropping the plugin into the containing theme or plugin, add the following:
if( ! class_exists( 'Voce_Post_Meta_Date' ) ) { require_once( $path_to_voce_post_meta_date . '/voce-post-meta-date.php' ); }
Usage
Basic Example
<?php add_action('init', function(){ add_metadata_group( 'demo_meta', 'Page Options', array( 'capability' => 'edit_posts' )); add_metadata_field( 'demo_meta', 'demo_key', 'Start Date', 'date' ); add_post_type_support( 'page', 'demo_meta' ); }); ?>
Options
max_date_field - ID of another 'date' field to use as a maximum for this field
min_date_field - ID of another 'date' field to use as a minimum for this field
max_date - Maximum date/time allowed for field (works in conjunction with max_date_field)
min_date - Minimum date/time allowed for field (works in conjunction with min_date_field)
default_text - Text to display if no date is set
default_date - Initial default date to set
year_range - Range of year dropdown, as specified here: http://api.jqueryui.com/datepicker/#option-yearRange
Advanced Example
<?php add_action('init', function(){ add_metadata_group( 'demo_meta', 'Page Options', array( 'capability' => 'edit_posts' )); add_metadata_field( 'demo_meta', 'demo_from', 'From', 'date', array( 'max_date_field' => 'demo_meta_demo_to', 'max_date' => '2013/08/25 2:00', 'default_text' => 'Enter Value, Sir!', )); add_metadata_field( 'demo_meta', 'demo_to', 'To', 'date', array( 'min_date_field' => 'demo_meta_demo_from', 'default_date' => '2013/08/28 5:00', )); // Note: more than one field can use the same max_date_field/min_date_field add_metadata_field( 'demo_meta', 'demo_alt_to', 'Alternative To', 'date', array( 'min_date_field' => 'demo_meta_demo_from', )); add_post_type_support( 'page', 'demo_meta' ); }); ?>
2.1.0 Added 'year_range' argument.
2.0.4 Delete date meta value when one isn't set
2.0.2 Standardizing check for dependencies.
2.0.1 Added check for Voce_Meta_API.
1.2.2
Fixing sanitization function.
1.2.1
Fixing composer dependencies.
1.2
Added sanitization function for return value.
1.1
Added options for max/min date, max/min field, default text, and default value.
1.0
Initial version.
voceconnect/voce-post-meta-date 适用场景与选型建议
voceconnect/voce-post-meta-date 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 10.53k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2013 年 11 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wordpress」 「post meta」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 voceconnect/voce-post-meta-date 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 voceconnect/voce-post-meta-date 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 voceconnect/voce-post-meta-date 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Symfony bundle that integrates the PostNord PHP SDK
Harvest statistics and meta data from an URL or his source code (seo oriented).
Phalcon PHP Meta tags service
A SilverStripe module to optimise the Meta, crawling, indexing, and sharing of your website content (forked from Cyber-Duck/Silverstripe-SEO)
Help to manage meta data on Laravel Eloquent model
A simple, repeatable field type
统计信息
- 总下载量: 10.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 30
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPLv2
- 更新时间: 2013-11-05