2017 © Pedro Peláez
 

library voce-post-meta-date

Extension of Voce Post Meta Plugin to create date meta fields

image

voceconnect/voce-post-meta-date

Extension of Voce Post Meta Plugin to create date meta fields

  • Friday, February 13, 2015
  • by kevinlangleyjr
  • Repository
  • 16 Watchers
  • 0 Stars
  • 6,093 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 14 Versions
  • 1 % Grown

The README.md

Voce Post Meta Date

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, (*1)

Description

Extend Voce Post Meta with date/time pickers, (*2)

Installation

As standard plugin:

See Installing Plugins., (*3)

As theme or plugin dependency:

After dropping the plugin into the containing theme or plugin, add the following:, (*4)

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, (*5)

Advanced Example

 '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., (*6)

2.0.4 Delete date meta value when one isn't set, (*7)

2.0.2 Standardizing check for dependencies., (*8)

2.0.1 Added check for Voce_Meta_API., (*9)

1.2.2
Fixing sanitization function., (*10)

1.2.1
Fixing composer dependencies., (*11)

1.2
Added sanitization function for return value., (*12)

1.1
Added options for max/min date, max/min field, default text, and default value., (*13)

1.0
Initial version., (*14)

The Versions

13/02 2015

dev-pickadate_js

dev-pickadate_js

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

21/11 2014

dev-master

9999999-dev

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

21/11 2014

2.1.0

2.1.0.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

03/11 2014

2.0.4

2.0.4.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

03/06 2014

2.0.3

2.0.3.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

08/04 2014

2.0.2

2.0.2.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

06/03 2014

v2.0.1

2.0.1.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

06/03 2014

v1.2.3

1.2.3.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

09/01 2014

v2.0.0

2.0.0.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

07/01 2014

v1.2.2

1.2.2.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

02/01 2014

v1.2.1

1.2.1.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

The Requires

 

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

16/12 2013

v1.2.0

1.2.0.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

11/12 2013

1.1.1

1.1.1.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta

05/11 2013

v1.1.0

1.1.0.0

Extension of Voce Post Meta Plugin to create date meta fields

  Sources   Download

GPLv2+

by Mark Parolisi
by Gary Smirny
by John Ciacia
by Kevin Langley Jr

wordpress post meta