Skip to content

Instantly share code, notes, and snippets.

sprintf("<pre>%s</pre>",print_r($value));
@soderlind-gist
soderlind-gist / svn2git.sh
Created February 5, 2013 00:59
svn2git.sh copies your plugin from WordPress svn repository to a local git repository and to GitHub.
#!/bin/bash
#
# svn2git.sh copies your plugin from WordPress svn repository to a local git repository and to GitHub.
# The GiHub repository will be created, using the GitHub API, if it doens't exist.
#
# You need to change the GITHUB_USERNAME and AUTHORS_FILE variables and create a authors file. The
# authors file is used to match your svn user with your GitHub user.
#
# .. and, copying from svn takes time :/
@soderlind-gist
soderlind-gist / gist:4691276
Created February 1, 2013 13:23
piklist:group
piklist( 'field', array(
'type' => 'group'
, 'field' => 'demo_address'
, 'label' => __( 'Address' )
, 'description' => __( '' )
, 'fields' => array(
)
)
);
@soderlind-gist
soderlind-gist / gist:4554293
Created January 17, 2013 07:17
piklist:header
/*
Title: My Settings Section
Setting: piklist-examples
Tab: Advanced
Order: 20
*/
@soderlind-gist
soderlind-gist / gist:4543650
Last active December 11, 2015 04:18
piklist:text
piklist( 'field', array(
'type' => 'text'
, 'scope' => 'post_meta' // Not used for settings sections
, 'field' => 'field_name'
, 'label' => 'Example Field'
, 'description' => 'Field Description'
, 'attributes' => array(
'class' => 'text'
)
) );
@soderlind-gist
soderlind-gist / gist:4543632
Created January 16, 2013 00:45
piklist:timepicker
piklist( 'field', array(
'type' => 'timepicker'
, 'field' => 'time'
, 'label' => 'Time'
, 'description' => 'Choose a time'
, 'options' => array(
'startTime' => date( 'H:m A' )
, 'show24Hours' => false
, 'separator' => ':'
, 'step' => 15
@soderlind-gist
soderlind-gist / gist:4543627
Created January 16, 2013 00:44
piklist:select
piklist( 'field', array(
'type' => 'select'
, 'scope' => 'post_meta' // Not used for settings sections
, 'field' => 'field_name'
, 'value' => 'option2' // Sets default to Option 2
, 'label' => 'Example Field'
, 'description' => 'Field Description'
, 'attributes' => array(
'class' => 'text'
)
@soderlind-gist
soderlind-gist / gist:4543621
Created January 16, 2013 00:44
piklist:radio
piklist( 'field', array(
'type' => 'radio'
, 'scope' => 'post_meta' // Not used for settings sections
, 'field' => 'field_name'
, 'value' => 'option2' // Sets default to Option 2
, 'label' => 'Example Field'
, 'description' => 'Field Description'
, 'attributes' => array(
'class' => 'text'
)
@soderlind-gist
soderlind-gist / gist:4543619
Created January 16, 2013 00:43
piklist:textarea
piklist( 'field', array(
'type' => 'textarea'
, 'scope' => 'post_meta' // Not used for settings sections
, 'field' => 'field_name'
, 'label' => 'Example Field'
, 'description' => 'Field Description'
, 'attributes' => array(
'class' => 'text'
)
) );
@soderlind-gist
soderlind-gist / gist:4543616
Created January 16, 2013 00:43
piklist:datepicker
piklist( 'field', array(
'type' => 'datepicker'
, 'scope' => 'post_meta' // Not used for settings sections
, 'field' => 'field_name'
, 'label' => 'Example Field'
, 'description' => 'Click in box'
, 'attributes' => array(
'class' => 'text'
)
, 'options' => array(