Ejemplo n.º 1
0
<?php

/*
Title: Shortcodes
Setting: piklist_core
Order: 30
Flow: Piklist Core Settings
Tab: General
*/
piklist('field', array('type' => 'group', 'field' => 'shortcode_ui', 'label' => __('Allow Shortcode UI', 'piklist'), 'add_more' => true, 'sortable' => false, 'fields' => array(array('type' => 'select', 'label' => 'Shortcode', 'field' => 'tag', 'columns' => 4, 'choices' => array_merge(array('' => '&mdash; Select &mdash;'), piklist_shortcode::get_shortcodes()), 'value' => 'piklist_form'), array('type' => 'checkbox', 'label' => 'Options', 'field' => 'options', 'columns' => 8, 'choices' => array('preview' => 'Preview'), 'value' => 'preview'))));
Ejemplo n.º 2
0
 /**
  * part_process
  * Show Shortcode settings if non-Piklist shortcodes are active.
  *
  * @param array $part The part object.
  *
  * @return mixed The part object or null.
  *
  * @access public
  * @static
  * @since 1.0
  */
 public static function part_process($part)
 {
     $shortcodes = piklist_shortcode::get_shortcodes();
     return empty($shortcodes) && $part['part'] == 'shortcodes.php' ? null : $part;
 }