Skip to content

Instantly share code, notes, and snippets.

View sbruner's full-sized avatar

Steve Bruner sbruner

View GitHub Profile
@sbruner
sbruner / piklist-filter-piklist_post_types-attribute-edit_columns.php
Created January 14, 2016 04:11
Piklist: filter: piklist_post_types: attribute: edit_columns
'edit_columns' => array(
'title' => 'Demo',
'author' => 'Assigned to'
)
@sbruner
sbruner / piklist-filter-piklist_post_types-attribute-hide_post_row_actions.php
Created January 14, 2016 04:14
Piklist: filter: piklist_post_types: attribute: hide_post_row_actions
'hide_post_row_actions' => array(
'trash',
'edit',
'quick-edit'
)
@sbruner
sbruner / piklist-filter-piklist_post_types-attribute-hide_screen_options.php
Created January 14, 2016 04:17
Piklist: filter: piklist_post_types: attribute: hide_screen_options
'hide_screen_options' => true
@sbruner
sbruner / piklist-filter-piklist_post_types-attribute-title.php
Last active January 14, 2016 04:21
Piklist: filter: piklist_post_types: attribute: title
'title' => 'Enter Custom Title'
@sbruner
sbruner / piklist-custom-field.php
Last active January 15, 2016 02:43
Piklist: custom field
<?php
piklist('field', array(
'type' => 'my-checkbox', // custom field type
'field' => 'custom-checkbox',
'label' => 'Custom Select Field',
'choices' => array(
'first' => 'First Choice',
'second' => 'Second Choice',
@sbruner
sbruner / piklist-field-file-basic.php
Last active January 15, 2016 04:38
Piklist: field: file: basic
<?php
piklist('field', array(
'type' => 'file',
'field' => 'upload_basic',
'label' => 'Add File(s)',
'description' => 'This is the basic upload field.',
'options' => array(
'basic' => true // set field to basic uploader
@sbruner
sbruner / piklist-field-file-media.php
Created January 15, 2016 03:56
Piklist: field: file: media
<?php
piklist('field', array(
'type' => 'file'
,'field' => 'upload_media'
,'label' => 'Add File(s)'
,'description' => 'This is the media uploader'
,'options' => array(
'modal_title' => 'Add File(s)'
@sbruner
sbruner / piklist-field-file-retrieve-data.php
Created January 15, 2016 04:23
Piklist: field: file: retrieve data
<?php
$myupload = get_post($id);
$title = $myupload->post_title;
$description = $myupload->post_content;
$caption = $myupload->post_excerpt;
echo 'title:' . $title;
echo 'description:' . $description;
@sbruner
sbruner / piklist-field-multiselect.php
Last active January 16, 2016 03:38
Piklist: field: multiselect
<?php
piklist('field', array(
'type' => 'select',
'field' => 'my_multiselect',
'label' => 'My Multiselect',
'choices' => array(
'first' => 'First Choice',
'second' => 'Second Choice',
@sbruner
sbruner / piklist-field-select.php
Last active December 12, 2016 18:34
Piklist: field: select
<?php
piklist('field', array(
'type' => 'select',
'field' => 'my_select',
'label' => 'My select',
'choices' => array(
'first' => 'First Choice',
'second' => 'Second Choice',