Skip to content

Instantly share code, notes, and snippets.

View sbruner's full-sized avatar

Steve Bruner sbruner

View GitHub Profile
<?php
/*
Title: This is the tab title
Capability: manage_options
Page: edit, post-new
*/
?>
<p>This is the Help text</p>
<?php
/*
Capability: manage_options
Page: edit, post-new
Sidebar: true
*/
?>
<p>
@sbruner
sbruner / piklist-checker-plugin.php
Last active January 10, 2016 04:22
Piklist: Piklist Checker in plugin
<?php
add_action('init', 'my_init_function');
function my_init_function(){
if(is_admin()){
include_once('path-to-file/class-piklist-checker.php');
if (!piklist_checker::check(__FILE__)){
return;
@sbruner
sbruner / piklist-checker-theme.php
Created January 10, 2016 04:25
Piklist: Piklist Checker in plugin
<?php
add_action('init', 'my_init_function');
function my_init_function(){
if(is_admin()){
include_once('path-to-file/class-piklist-checker.php');
if (!piklist_checker::check(__FILE__, 'theme')){ //use 'theme' parameter when included in a theme
@sbruner
sbruner / piklist-filter-piklist_post_types.php
Last active November 17, 2016 02:59
Piklist: Registering Post Types
<?php
add_filter('piklist_post_types', 'piklist_demo_post_types');
function piklist_demo_post_types($post_types)
{
$post_types['piklist_demo'] = array(
'labels' => piklist('post_type_labels', 'Piklist Demo')
,'title' => __('Enter a new Demo Title')
,'menu_icon' => piklist('url', 'piklist') . '/parts/img/piklist-menu-icon.svg'
@sbruner
sbruner / piklist-plugin-header.php
Created January 11, 2016 15:34
Piklist: Plugin header block example
<?php
/*
Plugin Name: Name Of The Plugin
Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
Description: A brief description of the Plugin.
Version: The Plugin's Version Number, e.g.: 1.0
Author: Name Of The Plugin Author
Author URI: http://URI_Of_The_Plugin_Author
Plugin Type: Piklist
License: A "Slug" license name e.g. GPL2
@sbruner
sbruner / piklist-plugin-readme.txt
Created January 11, 2016 15:39
Piklist: plugin readme.txt sample
> #### Powered by Piklist
> WordPress Helpers requires the Piklist framework.
> <a href="http://wordpress.org/extend/plugins/piklist/">You can download and install Piklist for free.</a>
@sbruner
sbruner / piklist-filter-piklist_post_types-attribute-admin_body_class.php
Created January 13, 2016 03:22
Piklist: filter: piklist_post_types: attribute: admin_body_class
'admin_body_class' => array(
'custom-body-class',
'custom-body-class-2
)
@sbruner
sbruner / piklist-filter-piklist_post_types-attribute-status.php
Created January 14, 2016 04:01
Piklist: filter: piklist_post_types: attribute: status
'status' => array(
'new' => array(
'label' => 'New',
'public' => false
)
,'pending' => array(
'label' => 'Pending Review',
'public' => false
)
@sbruner
sbruner / piklist-filter-piklist_post_types-attribute-hide_meta_box.php
Last active July 16, 2016 15:24
Piklist: filter: piklist_post_types: attribute: hide_meta_box
'hide_meta_box' => array(
'author'
)