public static function setup_settings_page()
 {
     if (function_exists('acf_add_options_page')) {
         acf_add_options_sub_page(array('page_title' => 'Fruit Pack Settings', 'menu_title' => 'Fruit Pack Settings', 'parent_slug' => 'plugins.php'));
     }
     if (function_exists('acf_add_local_field_group')) {
         acf_add_local_field_group(array('key' => 'group_563931a6e6559', 'title' => 'Github Settings', 'fields' => array(array('key' => 'field_563931bfe4a0b', 'label' => 'Github Username', 'name' => 'github_username', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_563931f1e4a0c', 'label' => 'Repository Slug', 'name' => 'repository_slug', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_563931ffe4a0d', 'label' => 'Authorization Key', 'name' => 'authorization_key', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-fruit-pack-settings'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
     }
 }
Esempio n. 2
1
function register_field_group($field_group)
{
    // add local
    acf_add_local_field_group($field_group);
}
 function htFeatureBlogposts()
 {
     parent::WP_Widget(false, __('HT Feature blogposts', 'govintranet'), array('description' => __('Blogpost listing widget', 'govintranet')));
     if (function_exists('acf_add_local_field_group')) {
         acf_add_local_field_group(array('key' => 'group_562a555eac132', 'title' => __('Feature blog widget', 'govintranet'), 'fields' => array(array('key' => 'field_562a555eb8501', 'label' => _x('Pin posts', 'Make stories sticky and appear at the top', 'govintranet'), 'name' => 'pin_posts', 'type' => 'relationship', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'news', 1 => 'blog', 2 => 'event'), 'taxonomy' => array(), 'filters' => array(0 => 'search', 1 => 'post_type'), 'elements' => '', 'min' => '', 'max' => '', 'return_format' => 'id')), 'location' => array(array(array('param' => 'widget', 'operator' => '==', 'value' => 'htfeatureblogposts'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'seamless', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
     }
 }
Esempio n. 4
0
 function __construct()
 {
     parent::__construct('htFeatureNews', __('HT Feature news', 'govintranet'), array('description' => __('Display feature news stories', 'govintranet')));
     if (function_exists('acf_add_local_field_group')) {
         acf_add_local_field_group(array('key' => 'group_54bfacd48f6e7', 'title' => __('Feature news widget', 'govintranet'), 'fields' => array(array('key' => 'field_560c502fb460c', 'label' => _x('News type', 'Categories for news', 'govintranet'), 'name' => 'news_listing_news_type', 'type' => 'taxonomy', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'taxonomy' => 'news-type', 'field_type' => 'checkbox', 'allow_null' => 1, 'add_term' => 0, 'save_terms' => 0, 'load_terms' => 0, 'return_format' => 'id', 'multiple' => 0), array('key' => 'field_54c03e5d0f3f4', 'label' => _x('Pin stories', 'Make news stories sticky and appear at the top', 'govintranet'), 'name' => 'pin_stories', 'type' => 'relationship', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'news', 1 => 'blog', 2 => 'event'), 'taxonomy' => array(), 'filters' => array(0 => 'search', 1 => 'post_type'), 'elements' => '', 'max' => '', 'return_format' => 'id', 'min' => 0), array('key' => 'field_54bfacd9a9fbb', 'label' => __('Exclude stories', 'govintranet'), 'name' => 'exclude_stories', 'type' => 'relationship', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'news'), 'taxonomy' => array(), 'filters' => array(0 => 'search'), 'elements' => '', 'max' => '', 'return_format' => 'id', 'min' => 0)), 'location' => array(array(array('param' => 'widget', 'operator' => '==', 'value' => 'htfeaturenews'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'seamless', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
     }
 }
Esempio n. 5
0
 /**
  * Initialise the fields.
  *
  * @param array $locations The locations where we want this group to appear.
  */
 public static function init($locations)
 {
     if (function_exists('acf_add_local_field_group')) {
         add_filter('acf/format_value/type=repeater', [__CLASS__, 'format_background'], 10, 3);
         acf_add_local_field_group(apply_filters('ln_elements_hero_group', array('key' => 'group_5731d0865aa2b', 'title' => 'Hero', 'fields' => array(array('key' => self::HEADLINE, 'label' => 'Headline', 'name' => 'hero_headline', 'type' => 'text', 'instructions' => 'The main headline of the hero section.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => self::TAGLINE, 'label' => 'Tagline', 'name' => 'hero_tagline', 'type' => 'textarea', 'instructions' => 'Appears below the headline.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => 2, 'new_lines' => 'wpautop', 'readonly' => 0, 'disabled' => 0), array('key' => self::BACKGROUND, 'label' => 'Background', 'name' => 'hero_background', 'type' => 'repeater', 'instructions' => 'Set the background. It can be either and image slider, a video or none.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'collapsed' => '', 'min' => 1, 'max' => 1, 'layout' => 'block', 'button_label' => 'Add Row', 'sub_fields' => array(array('key' => 'field_575076d822dc8', 'label' => 'Type', 'name' => 'type', 'type' => 'radio', 'instructions' => 'The background type.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('images' => 'Image Slider', 'video' => 'Video', 'none' => 'None'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => 'Image', 'layout' => 'horizontal'), array('key' => 'field_575076f222dc9', 'label' => 'Image Slider', 'name' => 'images', 'type' => 'gallery', 'instructions' => 'Select the images for the background slider. Just select a single image for a static background.', 'required' => 0, 'conditional_logic' => array(array(array('field' => 'field_575076d822dc8', 'operator' => '==', 'value' => 'images'))), 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => 1, 'max' => 10, 'preview_size' => 'thumbnail', 'library' => 'all', 'min_width' => 3200, 'min_height' => 1340, 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => ''), array('key' => 'field_57c4af53a7950', 'label' => 'Video', 'name' => 'video', 'type' => 'file', 'instructions' => 'Upload the background video. MP4 only.', 'required' => 1, 'conditional_logic' => array(array(array('field' => 'field_575076d822dc8', 'operator' => '==', 'value' => 'video'))), 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'url', 'library' => 'all', 'min_size' => '', 'max_size' => '', 'mime_types' => 'mp4'), array('key' => 'field_57c4af53a7951', 'label' => 'Fallback Image', 'name' => 'fallback_image', 'type' => 'image', 'instructions' => 'Add an image to be used on mobile devices when the video can\'t be loaded', 'required' => 1, 'conditional_logic' => array(array(array('field' => 'field_575076d822dc8', 'operator' => '==', 'value' => 'video'))), 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'thumbnail', 'library' => 'all', 'min_width' => 3200, 'min_height' => 1340, 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => ''))), array('key' => self::CTA, 'label' => 'Call To Action', 'name' => 'hero_cta', 'type' => 'repeater', 'instructions' => 'The button in the hero section.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'collapsed' => 'field_5731d0ee81bb3', 'min' => 1, 'max' => 1, 'layout' => 'table', 'button_label' => 'Add Row', 'sub_fields' => array(array('key' => 'field_5731d0ee81bb3', 'label' => 'Label', 'name' => 'label', 'type' => 'text', 'instructions' => 'The CTA\'s label.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5731d0fb81bb4', 'label' => 'Link', 'name' => 'link', 'type' => 'text', 'instructions' => 'The link the CTA leads to.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'http://...', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5731d11881bb5', 'label' => 'New Window', 'name' => 'new_window', 'type' => 'true_false', 'instructions' => 'Open the link in a new window.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'message' => '', 'default_value' => 0)))), 'location' => $locations, 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'the_content'), 'active' => 1, 'description' => '')));
     }
 }
 function __construct()
 {
     parent::__construct('htFeatureBlogposts', __('HT Feature blogposts', 'govintranet'), array('description' => __('Blogpost listing widget', 'govintranet')));
     if (function_exists('acf_add_local_field_group')) {
         acf_add_local_field_group(array('key' => 'group_562a555eac132', 'title' => 'Feature blog widget', 'fields' => array(array('key' => 'field_562a555eb8501', 'label' => 'Pin posts', 'name' => 'pin_posts', 'type' => 'relationship', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'news', 1 => 'blog', 2 => 'event'), 'taxonomy' => array(), 'filters' => array(0 => 'search', 1 => 'post_type'), 'elements' => '', 'min' => '', 'max' => '', 'return_format' => 'id'), array('key' => 'field_56b9356df717b', 'label' => 'Blog categories', 'name' => 'blog_categories', 'type' => 'taxonomy', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'taxonomy' => 'blog-category', 'field_type' => 'checkbox', 'allow_null' => 1, 'add_term' => 0, 'save_terms' => 0, 'load_terms' => 0, 'return_format' => 'id', 'multiple' => 0)), 'location' => array(array(array('param' => 'widget', 'operator' => '==', 'value' => 'htfeatureblogposts'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'seamless', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
     }
 }
 /**
  * Registers the field groups after all rules have been collected
  */
 public static function registerFieldGroups()
 {
     foreach (self::$fieldGroups as $key => $fieldGroup) {
         $fieldGroup['location'] = self::$rules[$key];
         if (function_exists(acf_add_local_field_group)) {
             \acf_add_local_field_group($fieldGroup);
         }
     }
 }
 public function include_fields()
 {
     // get post types and taxonomies and make sure they are related
     if (!function_exists('acf_add_local_field_group')) {
         return;
     }
     do_action('ssi-breadcrumbs/get-post-types-and-taxonomies');
     // build and include field group
     $fields = $this->build_fields();
     $group = array('key' => 'group_ssibreadcrumbs', 'title' => 'Breadcrumb Settings', 'fields' => $fields, 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'ssi-breadcrumbs'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '');
     acf_add_local_field_group($group);
 }
Esempio n. 9
0
 public function createUserGroupPostType()
 {
     $labels = array('name' => _x('UserGroups', 'Post Type General Name', 'phpwomen_posts_usergroup'), 'singular_name' => _x('UserGroup', 'Post Type Singular Name', 'phpwomen_posts_usergroup'), 'menu_name' => __('UserGroups', 'phpwomen_posts_usergroup'), 'name_admin_bar' => __('UserGroups', 'phpwomen_posts_usergroup'), 'parent_item_colon' => __('Parent Item:', 'phpwomen_posts_usergroup'), 'all_items' => __('All UserGroups', 'phpwomen_posts_usergroup'), 'add_new_item' => __('Add New UserGroup', 'phpwomen_posts_usergroup'), 'add_new' => __('Add New', 'phpwomen_posts_usergroup'), 'new_item' => __('New UserGroup', 'phpwomen_posts_usergroup'), 'edit_item' => __('Edit UserGroup', 'phpwomen_posts_usergroup'), 'update_item' => __('Update UserGroup', 'phpwomen_posts_usergroup'), 'view_item' => __('View UserGroup', 'phpwomen_posts_usergroup'), 'search_items' => __('Search UserGroup', 'phpwomen_posts_usergroup'), 'not_found' => __('Not found', 'phpwomen_posts_usergroup'), 'not_found_in_trash' => __('Not found in Trash', 'phpwomen_posts_usergroup'));
     $rewrite = array('slug' => 'usergroup', 'with_front' => true, 'pages' => true, 'feeds' => true);
     $args = array('label' => __('phpw_usergroup', 'phpwomen_posts_usergroup'), 'description' => __('Post Type Description', 'phpwomen_posts_usergroup'), 'labels' => $labels, 'supports' => array('title', 'editor'), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-universal-access-alt', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => true, 'publicly_queryable' => false, 'rewrite' => $rewrite, 'capability_type' => 'page');
     register_post_type('phpw_usergroup', $args);
     if (function_exists('acf_add_local_field_group')) {
         if (function_exists('acf_add_local_field_group')) {
             acf_add_local_field_group(array('key' => 'group_5558e5cd37bd5', 'title' => 'UserGroup Settings', 'fields' => array(array('key' => 'field_5558e5e700f72', 'label' => 'UserGroup Logo', 'name' => 'usergroup_logo', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'url', 'preview_size' => 'thumbnail', 'library' => 'uploadedTo', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => ''), array('key' => 'field_5558e66200f74', 'label' => 'UserGroup Website', 'name' => 'usergroup_website', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_5558e64500f73', 'label' => 'UserGroup Location', 'name' => 'usergroup_location', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5558e69800f75', 'label' => 'UserGroup Meeting Schedule', 'name' => 'usergroup_schedule', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'phpw_usergroup'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
         }
     }
 }
Esempio n. 10
0
 function setup_acfpro()
 {
     $theme_plugins = new RequiredPlugins();
     $theme_plugins->add_plugin($this->plugin);
     $theme_plugins->init();
     if (class_exists('acf_pro') && function_exists('acf_add_local_field_group')) {
         $acf_fields = array('key' => $this->posttype_slug, 'title' => 'Theme options', 'fields' => array(array('key' => $this->posttype_slug . '_update_time', 'label' => 'Event should reoccur', 'name' => $this->posttype_slug . '_update_time', 'type' => 'select', 'choices' => array('hourly' => 'Hourly', 'twicedaily' => 'Twicedaily', 'daily' => 'Daily')), array('key' => $this->posttype_slug . '_service_link', 'label' => 'Service Link', 'name' => $this->posttype_slug . '_service_link', 'type' => 'text')), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-theme-options'))));
         acf_add_local_field_group($acf_fields);
         return true;
     } else {
         return false;
     }
 }
Esempio n. 11
0
 /**
  * Adds archive options fields
  */
 public function addArchiveOptions()
 {
     if (!function_exists('acf_add_local_field_group')) {
         return;
     }
     $posttypes = get_post_types();
     $posttypes = array_filter($posttypes, function ($value) {
         if (substr($value, 0, 4) === 'mod-' || substr($value, 0, 4) === 'acf-' || in_array($value, array('attachment', 'revision', 'nav_menu_item', 'page', 'custom-short-link'))) {
             return apply_filters('Municipio/archives/canChangeStyle', false, $value);
         }
         return true;
     });
     foreach ($posttypes as $posttype) {
         // Get posttype taxonommies
         $taxonomies = array();
         $taxonomiesRaw = get_object_taxonomies($posttype);
         foreach ($taxonomiesRaw as $taxonomy) {
             $taxonomies[$taxonomy] = $taxonomy;
         }
         $fieldArgs = array('key' => 'group_' . md5($posttype), 'title' => __('Archive for', 'municipio') . ': ' . ucwords($posttype), 'fields' => array(), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-archives'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => '');
         // Feed display label
         $fieldArgs['fields'][] = array('key' => 'field_570e104caf1b2_' . md5($posttype), 'label' => 'Archive feed display settings', 'name' => 'archive_' . sanitize_title($posttype) . '_feed_display_settings', 'type' => 'message', 'instructions' => 'The below settings will apply for the archive feed.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => 'municipio-theme-options-label', 'id' => ''), 'message' => '', 'new_lines' => 'wpautop', 'esc_html' => 0);
         // Post style
         $fieldArgs['fields'][] = array('key' => 'field_56f00fe21f918_' . md5($posttype), 'label' => 'Post style', 'name' => 'archive_' . sanitize_title($posttype) . '_post_style', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('full' => 'Full', 'collapsed' => 'Collapsed', 'compressed' => 'Compressed', 'grid' => 'Grid', 'cards' => 'Post cards', 'newsitem' => 'News items'), 'default_value' => array(0 => 'full'), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0);
         // Grid columns
         $fieldArgs['fields'][] = array('key' => 'field_56f1045257121_' . md5($posttype), 'label' => 'Grid columns', 'name' => 'archive_' . sanitize_title($posttype) . '_grid_columns', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => array(array(array('field' => 'field_56f00fe21f918_' . md5($posttype), 'operator' => '==', 'value' => 'grid')), array(array('field' => 'field_56f00fe21f918_' . md5($posttype), 'operator' => '==', 'value' => 'cards'))), 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('grid-md-12' => 1, 'grid-md-6' => 2, 'grid-md-4' => 3, 'grid-md-3' => 4), 'default_value' => array(0 => 'grid-md-12'), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0);
         // Post sorting
         $metaKeys = array('post_date' => 'Date published', 'post_modified' => 'Date modified', 'post_title' => 'Title');
         $metaKeysRaw = \Municipio\Helper\Post::getPosttypeMetaKeys($posttype);
         foreach ($metaKeysRaw as $metaKey) {
             $metaKeys[$metaKey->meta_key] = $metaKey->meta_key;
         }
         $fieldArgs['fields'][] = array('key' => 'field_56f64546rref918_' . md5($posttype), 'label' => 'Sort on', 'name' => 'archive_' . sanitize_title($posttype) . '_sort_key', 'type' => 'select', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '50%', 'class' => '', 'id' => ''), 'choices' => apply_filters('Municipio/archive/sort_keys', $metaKeys, $posttype), 'default_value' => array(0 => 'post_date'), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0);
         $fieldArgs['fields'][] = array('key' => 'field_56fwe545ergref918_' . md5($posttype), 'label' => 'Order', 'name' => 'archive_' . sanitize_title($posttype) . '_sort_order', 'type' => 'select', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '50%', 'class' => '', 'id' => ''), 'choices' => array('asc' => 'Ascending', 'desc' => 'Descending'), 'default_value' => array(0 => 'desc'), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0);
         // Post filters
         $fieldArgs['fields'][] = array('key' => 'field_570ba0c87756c' . md5($posttype), 'label' => 'Post filters', 'name' => 'archive_' . sanitize_title($posttype) . '_post_filters_header', 'type' => 'checkbox', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('text_search' => 'Text search', 'date_range' => 'Date range'), 'default_value' => array(), 'layout' => 'horizontal', 'toggle' => 0);
         // Post filters sidebar
         if (count($taxonomies) > 0) {
             $fieldArgs['fields'][] = array('key' => 'field_570ba0c8erg434' . md5($posttype), 'label' => 'Taxonomy filters', 'name' => 'archive_' . sanitize_title($posttype) . '_post_filters_sidebar', 'type' => 'checkbox', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => $taxonomies, 'default_value' => array(), 'layout' => 'horizontal', 'toggle' => 0);
         }
         // Publish date
         $fieldArgs['fields'][] = array('key' => 'field_56fcc6914296b_' . md5($posttype), 'label' => 'Date published', 'name' => 'archive_' . sanitize_title($posttype) . '_feed_date_published', 'type' => 'radio', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '50%', 'class' => '', 'id' => ''), 'choices' => array('false' => 'Do not show', 'datetime' => 'Date and time', 'date' => 'Date only', 'time' => 'Time only'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => 'datetime', 'layout' => 'horizontal');
         // Sidebar navigation
         $fieldArgs['fields'][] = array('key' => 'field_570ded8a47206_' . md5($posttype), 'label' => 'Sidebar navigation', 'name' => 'archive_' . sanitize_title($posttype) . '_show_sidebar_navigation', 'type' => 'true_false', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '50%', 'class' => '', 'id' => ''), 'message' => 'Yes, show the sidebar navigation', 'default_value' => 0);
         // Post display label
         $fieldArgs['fields'][] = array('key' => 'field_570e104caf1b3_' . md5($posttype), 'label' => 'Post display settings', 'name' => 'archive_' . sanitize_title($posttype) . '_post_display_settings', 'type' => 'message', 'instructions' => 'The below settings will apply for single post view.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => 'municipio-theme-options-label', 'id' => ''), 'message' => '', 'new_lines' => 'wpautop', 'esc_html' => 0);
         $fieldArgs['fields'][] = array('key' => 'field_56fcc6914296c_' . md5($posttype), 'label' => 'Date published', 'name' => 'archive_' . sanitize_title($posttype) . '_post_date_published', 'type' => 'radio', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('false' => 'Do not show', 'datetime' => 'Date and time', 'date' => 'Date only', 'time' => 'Time only'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => 'datetime', 'layout' => 'horizontal');
         $fieldArgs['fields'][] = array('key' => 'field_56fcc62b8ab02_' . md5($posttype), 'label' => 'Info to display', 'name' => 'archive_' . sanitize_title($posttype) . '_post_display_info', 'type' => 'checkbox', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('category' => 'Show category', 'tags' => 'Show tags', 'author' => 'Show author', 'author_image' => 'Show autor image (only if show author)'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => '', 'layout' => 'horizontal');
         acf_add_local_field_group($fieldArgs);
     }
 }
Esempio n. 12
0
 public static function register_fields()
 {
     if (!function_exists('acf_add_local_field_group')) {
         return;
     }
     $postTypes = get_post_types(array('public' => true), 'objects');
     if (!$postTypes) {
         return;
     }
     $i = 0;
     foreach ($postTypes as $postType) {
         $i++;
         $fields = apply_filters('fp_archive_meta_fields', array(), $i, $postType);
         acf_add_local_field_group(array('key' => 'group_56c2ae1db5b5' . $i, 'title' => $postType->labels->singular_name . ' Archive Settings', 'fields' => $fields, 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-archive-settings'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'standard', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
     }
 }
Esempio n. 13
0
function acfav_init()
{
    add_filter('acf/location/rule_values/attachment', 'acfav_acf_location_rules_values_attachment');
    function acfav_acf_location_rules_values_attachment($choices)
    {
        $choices['video'] = 'Video';
        return $choices;
    }
    add_filter('acf/location/rule_match/attachment', 'acfav_acf_location_rules_match_attachment', 10, 3);
    function acfav_acf_location_rules_match_attachment($match, $rule, $options)
    {
        // vars
        if (empty($options)) {
            return false;
        }
        $attachment = $options['attachment'];
        // validate
        if (!$attachment) {
            return false;
        }
        // compare
        if ($rule['operator'] == "==") {
            $match = $attachment == $rule['value'];
            if ($rule['value'] == "video") {
                global $post;
                if (empty($post)) {
                    return false;
                }
                return substr($post->post_mime_type, 0, 5) == 'video';
            }
            // override for "all"
            if ($rule['value'] == "all") {
                $match = true;
            }
        } elseif ($rule['operator'] == "!=") {
            $match = $attachment != $rule['value'];
            // override for "all"
            if ($rule['value'] == "all") {
                $match = false;
            }
        }
        return $match;
    }
    if (function_exists('acf_add_local_field_group')) {
        acf_add_local_field_group(array('key' => 'group_561274370036a', 'title' => 'Accessible video', 'fields' => array(array('key' => 'field_561274902b283', 'label' => __('Alternative video files', ACFAV_DOMAIN), 'name' => 'acfav_alt_videos', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'layout' => 'table', 'button_label' => __('Add another video file', ACFAV_DOMAIN), 'sub_fields' => array(array('key' => 'field_561274aa2b284', 'label' => __('Alternative video file', ACFAV_DOMAIN), 'name' => 'acfav_alt_video', 'type' => 'file', 'instructions' => __('For example .wmv or .mov. <br />Note: if the files are to big to upload here, please upload them via FTP and assign them to the media using a plugin like Media from FTP', ACFAV_DOMAIN), 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'library' => 'all', 'min_size' => '', 'max_size' => '', 'mime_types' => ''))), array('key' => 'field_561275072b285', 'label' => __('Alternative audio files', ACFAV_DOMAIN), 'name' => 'acfav_alt_audios', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'layout' => 'table', 'button_label' => __('Add another audio file', ACFAV_DOMAIN), 'sub_fields' => array(array('key' => 'field_sub561275072b285', 'label' => __('Alternative audio file', ACFAV_DOMAIN), 'name' => 'acfav_alt_audio', 'type' => 'file', 'instructions' => __('For example .mp3 or .wav', ACFAV_DOMAIN), 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'library' => 'all', 'min_size' => '', 'max_size' => '', 'mime_types' => ''))), array('key' => 'field_561275402b286', 'label' => __('Subtitles', ACFAV_DOMAIN), 'name' => 'acfav_subtitles', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'layout' => 'table', 'button_label' => __('Add another subtitle file', ACFAV_DOMAIN), 'sub_fields' => array(array('key' => 'field_561275592b287', 'label' => 'Subtitle file', 'name' => 'acfav_srt_file', 'type' => 'file', 'instructions' => __('Use a .srt or .vvt file', ACFAV_DOMAIN), 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'library' => 'all', 'min_size' => '', 'max_size' => '', 'mime_types' => 'srt, vvt'), array('key' => 'field_5612758e2b289', 'label' => __('Language subtitles', ACFAV_DOMAIN), 'name' => 'acfav_srt_language', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('af' => 'Afrikaans', 'ar' => 'العربية', 'az' => 'Azərbaycan dili', 'bg' => 'Български', 'bs' => 'Bosanski', 'ca' => 'Català', 'cy' => 'Cymraeg', 'da' => 'Dansk', 'de' => 'Deutsch', 'el' => 'Ελληνικά', 'en' => 'English', 'eo' => 'Esperanto', 'es' => 'Español', 'et' => 'Eesti', 'eu' => 'Euskara', 'fa' => 'فارسی', 'fi' => 'Suomi', 'fr' => 'Français', 'gd' => 'Gàidhlig', 'gl' => 'Galego', 'haz' => 'هزاره گی', 'he' => 'עִבְרִית', 'hr' => 'Hrvatski', 'hu' => 'Magyar', 'id' => 'Bahasa Indonesia', 'is' => 'Íslenska', 'it' => 'Italiano', 'ja' => '日本語', 'ko' => '한국어', 'lt' => 'Lietuvių kalba', 'my' => 'ဗမာစာ', 'nb' => 'Norsk bokmål', 'nl' => 'Nederlands', 'nn' => 'Norsk nynorsk', 'oc' => 'Occitan', 'pl' => 'Polski', 'ps' => 'پښتو', 'pt' => 'Português', 'ro' => 'Română', 'ru' => 'Русский', 'sk' => 'Slovenčina', 'sl' => 'Slovenščina', 'sq' => 'Shqip', 'sr' => 'Српски језик', 'sv' => 'Svenska', 'th' => 'ไทย', 'tl' => 'Tagalog', 'tr' => 'Türkçe', 'ug' => 'Uyƣurqə', 'uk' => 'Українська', 'zh' => '繁體中文'), 'default_value' => array('en' => 'en'), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0)))), 'location' => array(array(array('param' => 'attachment', 'operator' => '==', 'value' => 'video'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    }
}
Esempio n. 14
0
 public function include_fields()
 {
     $path = dirname(__FILE__) . '/acf-json';
     if (!is_dir($path) || ($files = scandir($path)) === false || !count($files)) {
         return;
     }
     $groups = $this->get_acf_field_groups();
     foreach ($files as $file) {
         $file_path = $path . '/' . $file;
         if (is_dir($file_path) || !preg_match('/\\.json$/', $file)) {
             continue;
         }
         $group_key = preg_replace('/\\.json$/', '', $file);
         if (!isset($groups[$group_key]) && ($json = file_get_contents($file_path)) !== false && ($field_group = json_decode($json, true)) !== NULL) {
             acf_add_local_field_group($field_group);
         }
     }
     // need to delete the ACF cache
     wp_cache_delete('get_field_groups', 'acf');
 }
        ?>
"><?php 
        _e('Show recent', 'govintranet');
        ?>
</label> <br><br>
          <label for="<?php 
        echo $this->get_field_id('cacheperiod');
        ?>
"><?php 
        _e('Cache (minutes):', 'govintranet');
        ?>
</label> 
          <input class="widefat" id="<?php 
        echo $this->get_field_id('cacheperiod');
        ?>
" name="<?php 
        echo $this->get_field_name('cacheperiod');
        ?>
" type="text" value="<?php 
        echo $cacheperiod;
        ?>
" /><br>
        </p>

        <?php 
    }
}
if (function_exists('acf_add_local_field_group')) {
    acf_add_local_field_group(array('key' => 'group_55ee1a9ecbd0d', 'title' => __('Limit event types', 'govintranet'), 'fields' => array(array('key' => 'field_55ee1ab48bb29', 'label' => __('Event types', 'govintranet'), 'name' => 'event_listing_event_types', 'type' => 'taxonomy', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'taxonomy' => 'event-type', 'field_type' => 'checkbox', 'allow_null' => 1, 'add_term' => 0, 'save_terms' => 0, 'load_terms' => 0, 'return_format' => 'id', 'multiple' => 0)), 'location' => array(array(array('param' => 'widget', 'operator' => '==', 'value' => 'hteventslisting'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
}
add_action('widgets_init', create_function('', 'return register_widget("htEventsListing");'));
Esempio n. 16
0
<?php

if (function_exists('acf_add_local_field_group')) {
    acf_add_local_field_group(array('key' => 'group_5644619e12701', 'title' => 'Kioskplatser', 'fields' => array(array('key' => 'field_564463db4e449', 'label' => '', 'name' => '', 'type' => 'message', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 100, 'class' => '', 'id' => ''), 'message' => 'Här listas platserna för samtliga kiosker som finns i installationen. Varje kiosk uppdaterar automatiskt sin plats vid första besöket. Om en kiosk skulle hamna fel på kartan, kan du ändra den här. Tar du bort en kiosk, kommer den att dyka upp här igen när den används första gången.

		Samtliga kiosker kräver att en position finns lagrad för att plotta ut en vägbeskrivning till målet.', 'new_lines' => 'wpautop', 'esc_html' => 1), array('key' => 'field_5644646632d1a', 'label' => 'Kiosker', 'name' => 'kiosk_repeater', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'layout' => 'table', 'button_label' => 'Lägg till kiosk', 'sub_fields' => array(array('key' => 'field_564499deb00c3', 'label' => 'Kiosknamn', 'name' => 'kiosk_name', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_564461a9025b6', 'label' => 'Kiosk IP', 'name' => 'kiosk_ip', 'type' => 'text', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_564462fff65ec', 'label' => 'Kiosk Latitude', 'name' => 'kiosk_lat', 'type' => 'number', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => '', 'max' => '', 'step' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5644635c37050', 'label' => 'Kiosk Longitude', 'name' => 'kiosk_long', 'type' => 'number', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => '', 'max' => '', 'step' => '', 'readonly' => 0, 'disabled' => 0)))), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'kiosk-places'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
}
<?php

if (function_exists('acf_add_local_field_group')) {
    $name_path = 'wbts__custom_body_code';
    acf_add_local_field_group(array('key' => 'group_' . $name_path, 'title' => __('Custom Body Code', 'eagle'), 'fields' => array(array('key' => 'field_' . $name_path . '__code', 'label' => false, 'name' => $name_path . '__code', 'type' => 'textarea', 'instructions' => __('This code will be inserted into the body. So be careful with it as it can break the website.', 'eagle'), 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => '', 'new_lines' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'theme-settings')), array(array('param' => 'post_type', 'operator' => '==', 'value' => 'post')), array(array('param' => 'post_type', 'operator' => '==', 'value' => 'page'))), 'menu_order' => 30, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
}
<?php

// ACF-5 (Pro), 01-28-2016
if (function_exists('acf_add_local_field_group')) {
    acf_add_local_field_group(array('key' => 'group_56a66516decbd', 'title' => 'JW Platform API', 'fields' => array(array('key' => 'field_56a66538e7b1d', 'label' => 'Key', 'name' => 'jw_platform_api_key', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a66561e7b1e', 'label' => 'Secret', 'name' => 'jw_platform_api_secret', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-northland-outdoors-radio-plugin-settings'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a1462b537dd', 'title' => 'Segment 1', 'fields' => array(array('key' => 'field_569d557483373', 'label' => 'JW Player Key', 'name' => 'segment_1_key', 'type' => 'text', 'instructions' => 'Enter the audio/video key from your JW Player upload here.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => 'acf-field-segment_1_key'), 'default_value' => '', 'placeholder' => 'R4wsa1fA', 'prepend' => '', 'append' => '', 'maxlength' => 8, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d562ab7ab2', 'label' => 'Duration', 'name' => 'segment_1_duration', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => 'acf-segment_1_duration'), 'default_value' => '', 'placeholder' => '00:00:00', 'prepend' => '', 'append' => '', 'maxlength' => 10, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a15fd15cc62', 'label' => 'Date', 'name' => 'segment_1_date', 'type' => 'date_picker', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'display_format' => 'F j, Y', 'return_format' => 'F j, Y', 'first_day' => 1), array('key' => 'field_569d52d01c270', 'label' => 'Title', 'name' => 'segment_1_title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => 'acf-field-segment_1_title'), 'default_value' => '', 'placeholder' => '', 'prepend' => 'Northland Outdoors Radio Podcast –', 'append' => '', 'maxlength' => 255, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d606c6a39b', 'label' => 'Description', 'name' => 'segment_1_description', 'type' => 'wysiwyg', 'instructions' => 'Note: 4000 character max.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => 'segment_1_description'), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'basic', 'media_upload' => 0), array('key' => 'field_56aa399d07f80', 'label' => 'Link to corresponding post', 'name' => 'segment_1_link', 'type' => 'page_link', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'post'), 'taxonomy' => array(0 => 'category:podcast'), 'allow_null' => 1, 'multiple' => 0), array('key' => 'field_56a6875d5dcbc', 'label' => 'Segment Thumbnail', 'name' => 'segment_1', 'type' => 'accordion', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'icon_class' => 'dashicons-format-image'), array('key' => 'field_569d6799e92a3', 'label' => 'Segment Image', 'name' => 'segment_1_image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'preview_size' => 'thumbnail', 'library' => 'all', 'return_format' => 'array', 'min_width' => 0, 'min_height' => 0, 'min_size' => 0, 'max_width' => 0, 'max_height' => 0, 'max_size' => 0, 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'podcasts'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a1462b59ca0', 'title' => 'Segment 2', 'fields' => array(array('key' => 'field_569d639963660', 'label' => 'JW Player Key', 'name' => 'segment_2_key', 'type' => 'text', 'instructions' => 'Enter the audio/video key from your JW Player upload here.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'R4wsa1fA', 'prepend' => '', 'append' => '', 'maxlength' => 8, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d63c1ba8e5', 'label' => 'Duration', 'name' => 'segment_2_duration', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '00:00:00', 'prepend' => '', 'append' => '', 'maxlength' => 10, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a9076b12406', 'label' => 'Date', 'name' => 'segment_2_date', 'type' => 'date_picker', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'display_format' => 'F j, Y', 'return_format' => 'F j, Y', 'first_day' => 1), array('key' => 'field_569d633e531a0', 'label' => 'Title', 'name' => 'segment_2_title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => 'Northland Outdoors Radio Podcast –', 'append' => '', 'maxlength' => 255, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d636b531a1', 'label' => 'Description', 'name' => 'segment_2_description', 'type' => 'wysiwyg', 'instructions' => 'Note: 4000 character max.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'basic', 'media_upload' => 0), array('key' => 'field_56aa3ae7e829c', 'label' => 'Link to corresponding post', 'name' => 'segment_2_link', 'type' => 'page_link', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'post'), 'taxonomy' => array(0 => 'category:podcast'), 'allow_null' => 1, 'multiple' => 0), array('key' => 'field_56a907cdde065', 'label' => 'Segment Thumbnail', 'name' => 'segment_thumbnail', 'type' => 'accordion', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'icon_class' => 'dashicons-format-image'), array('key' => 'field_569d688c6b821', 'label' => 'Segment Image', 'name' => 'segment_2_image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'preview_size' => 'thumbnail', 'library' => 'all', 'return_format' => 'array', 'min_width' => 0, 'min_height' => 0, 'min_size' => 0, 'max_width' => 0, 'max_height' => 0, 'max_size' => 0, 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'podcasts'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a1462b5ed4d', 'title' => 'Segment 3', 'fields' => array(array('key' => 'field_569d660f38ddc', 'label' => 'JW Player Key', 'name' => 'segment_3_key', 'type' => 'text', 'instructions' => 'Enter the audio/video key from your JW Player upload here.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'V1HDlWg2', 'prepend' => '', 'append' => '', 'maxlength' => 8, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d6644a5f5d', 'label' => 'Duration', 'name' => 'segment_3_duration', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '00:00:00', 'prepend' => '', 'append' => '', 'maxlength' => 10, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a908035a569', 'label' => 'Date', 'name' => 'segment_3_date', 'type' => 'date_picker', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'display_format' => 'F j, Y', 'return_format' => 'F j, Y', 'first_day' => 1), array('key' => 'field_569d64d949093', 'label' => 'Title', 'name' => 'segment_3_title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '255 characters max.', 'prepend' => 'Northland Outdoors Radio Podcast –', 'append' => '', 'maxlength' => 255, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d65b83c887', 'label' => 'Description', 'name' => 'segment_3_description', 'type' => 'wysiwyg', 'instructions' => 'Note: 4000 characters max.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'basic', 'media_upload' => 0), array('key' => 'field_56aa3b67849a2', 'label' => 'Link to corresponding post', 'name' => 'segment_3_link', 'type' => 'page_link', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'post'), 'taxonomy' => array(0 => 'category:podcast'), 'allow_null' => 1, 'multiple' => 0), array('key' => 'field_56a908365a56a', 'label' => 'Segment Thumbnail', 'name' => 'segment_thumbnail', 'type' => 'accordion', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'icon_class' => 'dashicons-format-image'), array('key' => 'field_569d68aa81cb7', 'label' => 'Segment Image', 'name' => 'segment_3_image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'preview_size' => 'thumbnail', 'library' => 'all', 'return_format' => 'array', 'min_width' => 0, 'min_height' => 0, 'min_size' => 0, 'max_width' => 0, 'max_height' => 0, 'max_size' => 0, 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'podcasts'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a1462b64484', 'title' => 'Stations', 'fields' => array(array('key' => 'field_56845fb4a9541', 'label' => 'Location', 'name' => 'station_location', 'type' => 'text', 'instructions' => 'The city or location of the station.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'Fargo', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_568461f839f89', 'label' => 'Name', 'name' => 'station_name', 'type' => 'text', 'instructions' => 'Station Name & ID. Format: AM/PM, Frequency, Call Sign', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'AM 970 WDAY', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_568464d193779', 'label' => 'Station Website', 'name' => 'station_website', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'http://www.wday.com/radio', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5684630ef7067', 'label' => 'Timeslot', 'name' => 'station_timeslot', 'type' => 'text', 'instructions' => 'Weekly broadcast day and time of Northland Outdoors Radio.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'Saturdays at 6am', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a930429707a', 'label' => 'Broadcast Day', 'name' => 'station_day', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'choices' => array('Mondays' => 'Mondays', 'Tuesdays' => 'Tuesdays', 'Wednesdays' => 'Wednesdays', 'Thursdays' => 'Thursdays', 'Fridays' => 'Fridays', 'Saturdays' => 'Saturdays', 'Sundays' => 'Sundays'), 'default_value' => array(), 'allow_null' => 1, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0), array('key' => 'field_56a930e69707b', 'label' => 'Broadcast Time', 'name' => 'station_time', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'choices' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12), 'default_value' => array(), 'allow_null' => 1, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0), array('key' => 'field_56a931bbe31ed', 'label' => 'AM/PM', 'name' => 'station_ampm', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'choices' => array('a.m.' => 'a.m.', 'p.m.' => 'p.m.'), 'default_value' => array(), 'allow_null' => 1, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0), array('key' => 'field_5684643d96022', 'label' => 'Live Streaming Link', 'name' => 'station_streaming_link', 'type' => 'text', 'instructions' => '"Listen Live" url.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'http://radio.securenetsystems.net/v5/WDAY', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_568466d34f2a8', 'label' => 'Station Notes', 'name' => 'station_notes', 'type' => 'text', 'instructions' => 'Optional additional information.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '(Starting December 26th)', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_568469f549064', 'label' => 'Address', 'name' => 'station_address', 'type' => 'text', 'instructions' => 'Optional Street Address', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '301 8th St S, Fargo, ND 58103', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56846a0649065', 'label' => 'Places ID', 'name' => 'station_places_id', 'type' => 'text', 'instructions' => 'Optional Google Places ID', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'ChIJnbHrt1jJyFIRkPmAo-qfWac', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'stations'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'permalink'), 'active' => 1, 'description' => 'Northland Outdoors Affiliate Stations Info'));
    acf_add_local_field_group(array('key' => 'group_56a1638d86dbb', 'title' => 'Upcoming Shows', 'fields' => array(array('key' => 'field_56a16402c894b', 'label' => 'Coming up on future shows:', 'name' => 'upcoming_shows', 'type' => 'wysiwyg', 'instructions' => '*If you have a good story that we should feature on the show, contact us below. ', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'full', 'media_upload' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-upcoming-shows'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'seamless', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => '"Coming up on future shows:" section of the "Radio" page.'));
    acf_add_local_field_group(array('key' => 'group_56a925e624ded', 'title' => 'Station Type', 'fields' => array(array('key' => 'field_56a9260566330', 'label' => 'Select Type', 'name' => 'station_type', 'type' => 'taxonomy', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'taxonomy' => 'station_type', 'field_type' => 'select', 'allow_null' => 0, 'add_term' => 0, 'save_terms' => 1, 'load_terms' => 1, 'return_format' => 'id', 'multiple' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'stations'))), 'menu_order' => 1, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a92aaff29df', 'title' => 'Station State', 'fields' => array(array('key' => 'field_56a92ab000904', 'label' => 'Select State', 'name' => 'station_state', 'type' => 'taxonomy', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'taxonomy' => 'station_state', 'field_type' => 'select', 'allow_null' => 1, 'add_term' => 0, 'save_terms' => 1, 'load_terms' => 1, 'return_format' => 'id', 'multiple' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'stations'))), 'menu_order' => 2, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
}
Esempio n. 19
0
 public function setACF()
 {
     $used = array();
     add_action('add_meta_boxes_casawp_property', array($this, 'casawp_property_custom_metaboxes'), 10, 2);
     foreach ($this->numvalService->getTemplate() as $group => $groupsettings) {
         $fields = array();
         foreach ($groupsettings['items'] as $key => $settings) {
             $used[] = $key;
             $append = '';
             switch ($this->numvalService->getItem($key)->getSi()) {
                 case 'm':
                     $append = 'm';
                     break;
                 case 'm2':
                     $append = 'm<sup>2</sup>';
                     break;
                 case 'm3':
                     $append = 'm<sup>3</sup>';
                     break;
                 case '%':
                     $append = '%';
                     break;
             }
             $fields[] = array('key' => 'field_casawp_property_' . $key, 'label' => $this->numvalService->getItem($key)->getLabel(), 'name' => $key, 'type' => 'number', 'instructions' => '', 'append' => $append, 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '');
         }
         acf_add_local_field_group(array('key' => 'group_casawp_property_numvals_' . $group, 'title' => $groupsettings['name'], 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'))), 'menu_order' => 29, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label'));
     }
     //rest numeric values
     $fields = array();
     foreach ($this->numvalService->getItems() as $numval) {
         if (!in_array($numval->getKey(), $used)) {
             $fields[] = array('key' => 'field_casawp_property_' . $numval->getKey(), 'label' => $numval->getLabel(), 'name' => $numval->getKey(), 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '');
         }
     }
     if ($fields) {
         acf_add_local_field_group(array('key' => 'group_casawp_property_numvals_unsorted', 'title' => 'Ungeordnete werte', 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'))), 'menu_order' => 30, 'position' => 'default', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label'));
     }
     //identifiers
     $fields = array();
     $fields[] = array('key' => 'field_casawp_property_' . 'casawp_id', 'label' => __('CASAWP ID', 'casawp'), 'name' => 'casawp_id', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'referenceId', 'label' => __('Reference Nr.', 'casawp'), 'name' => 'referenceId', 'type' => 'text', 'required' => 0);
     acf_add_local_field_group(array('key' => 'group_casawp_identifiers', 'title' => __('Identifiers', 'casawp'), 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'))), 'menu_order' => 1, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label'));
     //property address
     $fields = array();
     $fields[] = array('key' => 'field_casawp_property_' . 'property_address_streetaddress', 'label' => __('Street', 'casawp'), 'name' => 'property_address_streetaddress', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'property_address_streetnumber', 'label' => __('Nr.', 'casawp'), 'name' => 'property_address_streetnumber', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'property_address_streetaddition', 'label' => __('Addition', 'casawp'), 'name' => 'property_address_streetaddition', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'property_address_postalcode', 'label' => __('Postal Code', 'casawp'), 'name' => 'property_address_postalcode', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'property_address_locality', 'label' => __('City', 'casawp'), 'name' => 'property_address_locality', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'property_address_region', 'label' => __('Region', 'casawp'), 'name' => 'property_address_region', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'property_address_country', 'label' => __('Country', 'casawp'), 'name' => 'property_address_country', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'property_geo_latitude', 'label' => __('Latitude', 'casawp'), 'name' => 'property_geo_latitude', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_property_' . 'property_geo_longitude', 'label' => __('Longitude', 'casawp'), 'name' => 'property_geo_longitude', 'type' => 'text', 'required' => 0);
     acf_add_local_field_group(array('key' => 'group_casawp_property_address', 'title' => __('Address', 'casawp'), 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'))), 'menu_order' => 1, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label'));
     //Settings
     $fields = array();
     $fields[] = array('key' => 'field_casawp_offer_' . 'start', 'label' => __('Start', 'casawp'), 'name' => 'start', 'type' => 'date_time_picker', 'required' => 0, 'date_format' => 'yy-mm-dd', 'time_format' => 'HH:mm:ss', 'first_day' => 1, 'save_as_timestamp' => 'false', 'get_as_timestamp' => 'false');
     $fields[] = array('key' => 'field_casawp_offer_' . 'price_currency', 'label' => __('Currency', 'casawp'), 'name' => 'price_currency', 'type' => 'radio', 'required' => 0, 'choices' => array('CHF' => 'CHF', 'EUR' => '€', 'GBP' => '£', 'USD' => '$'), 'layout' => 'horizontal');
     acf_add_local_field_group(array('key' => 'group_casawp_setting', 'title' => __('General settings', 'casawp'), 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'))), 'menu_order' => 1, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label'));
     //Buy
     $fields = array();
     $fields[] = array('key' => 'field_casawp_offer_' . 'price', 'label' => __('Price', 'casawp'), 'name' => 'price', 'type' => 'number', 'required' => 0, 'step' => 1, 'min' => 0);
     $fields[] = array('key' => 'field_casawp_offer_' . 'price_propertysegment', 'label' => __('Price property segment', 'casawp'), 'name' => 'price_propertysegment', 'type' => 'radio', 'required' => 0, 'choices' => array('all' => __('All', 'casawp'), 'm' => 'm<sup>2</sup>'), 'layout' => 'horizontal');
     acf_add_local_field_group(array('key' => 'group_casawp_offer_buy', 'title' => __('Buy', 'casawp'), 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'), array('param' => 'post_taxonomy', 'operator' => '==', 'value' => 'casawp_salestype:buy'))), 'menu_order' => 2, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label'));
     //Rent
     $fields = array();
     $fields[] = array('key' => 'field_casawp_offer_' . 'netPrice', 'label' => __('Net Price', 'casawp'), 'name' => 'netPrice', 'type' => 'number', 'required' => 0, 'step' => 1, 'min' => 0);
     $fields[] = array('key' => 'field_casawp_offer_' . 'netPrice_propertysegment', 'label' => __('Net price property segment', 'casawp'), 'name' => 'netPrice_propertysegment', 'type' => 'radio', 'required' => 0, 'choices' => array('all' => __('All', 'casawp'), 'm' => 'm<sup>2</sup>'), 'layout' => 'horizontal');
     $fields[] = array('key' => 'field_casawp_offer_' . 'netPrice_timesegment', 'label' => __('Net price time segment', 'casawp'), 'name' => 'netPrice_propertysegment', 'type' => 'radio', 'required' => 0, 'choices' => array('m' => __('month', 'casawp'), 'w' => __('week', 'casawp'), 'd' => __('day', 'casawp'), 'y' => __('year', 'casawp'), 'h' => __('hour', 'casawp')), 'layout' => 'horizontal');
     $fields[] = array('key' => 'field_casawp_offer_' . 'grossPrice', 'label' => __('Gross Price', 'casawp'), 'name' => 'grossPrice', 'type' => 'number', 'required' => 0, 'step' => 1, 'min' => 0);
     $fields[] = array('key' => 'field_casawp_offer_' . 'grossPrice_propertysegment', 'label' => __('Gross price property segment', 'casawp'), 'name' => 'grossPrice_propertysegment', 'type' => 'radio', 'required' => 0, 'choices' => array('all' => __('All', 'casawp'), 'm' => 'm<sup>2</sup>'), 'layout' => 'horizontal');
     $fields[] = array('key' => 'field_casawp_offer_' . 'grossPrice_timesegment', 'label' => __('Gross price time segment', 'casawp'), 'name' => 'grossPrice_propertysegment', 'type' => 'radio', 'required' => 0, 'choices' => array('m' => __('month', 'casawp'), 'w' => __('week', 'casawp'), 'd' => __('day', 'casawp'), 'y' => __('year', 'casawp'), 'h' => __('hour', 'casawp')), 'layout' => 'horizontal');
     acf_add_local_field_group(array('key' => 'group_casawp_offer_rent', 'title' => __('Rent', 'casawp'), 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'), array('param' => 'post_taxonomy', 'operator' => '==', 'value' => 'casawp_salestype:rent'))), 'menu_order' => 2, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label'));
     //organization
     $fields = array();
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_legalname', 'label' => __('Legal name', 'casawp'), 'name' => 'seller_org_legalname', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_brand', 'label' => __('Brand', 'casawp'), 'name' => 'seller_org_brand', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_phone_central', 'label' => __('Phone', 'casawp'), 'name' => 'seller_org_phone_central', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_address_streetaddress', 'label' => __('Street', 'casawp'), 'name' => 'seller_org_address_streetaddress', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_address_streetaddition', 'label' => __('Street addition', 'casawp'), 'name' => 'seller_org_address_streetaddition', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_address_postalcode', 'label' => __('Postal Code', 'casawp'), 'name' => 'seller_org_address_postalcode', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_address_locality', 'label' => __('Locality', 'casawp'), 'name' => 'seller_org_address_locality', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_address_region', 'label' => __('Region', 'casawp'), 'name' => 'seller_org_address_region', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_address_country', 'label' => __('Country', 'casawp'), 'name' => 'seller_org_address_country', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_person_' . 'seller_org_address_postofficeboxnumber', 'label' => __('P.O. Box', 'casawp'), 'name' => 'seller_org_address_postofficeboxnumber', 'type' => 'text', 'required' => 0);
     acf_add_local_field_group(array('key' => 'group_casawp_organization', 'title' => __('Organization', 'casawp'), 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'))), 'menu_order' => 19, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label'));
     //people
     $prefixes = array('seller_view_person_', 'seller_inquiry_person_', 'seller_visit_person_');
     foreach ($prefixes as $prefix) {
         $fields = array();
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'email', 'label' => __('Email', 'casawp'), 'name' => $prefix . 'email', 'type' => 'email', 'required' => 0);
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'function', 'label' => __('Function', 'casawp'), 'name' => $prefix . 'function', 'type' => 'text', 'required' => 0);
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'givenname', 'label' => __('Firstname', 'casawp'), 'name' => $prefix . 'givenname', 'type' => 'text', 'required' => 0);
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'familyname', 'label' => __('Lastname', 'casawp'), 'name' => $prefix . 'familyname', 'type' => 'text', 'required' => 0);
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'fax', 'label' => __('Fax', 'casawp'), 'name' => $prefix . 'fax', 'type' => 'text', 'required' => 0);
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'phone_direct', 'label' => __('Direct phone', 'casawp'), 'name' => $prefix . 'phone_direct', 'type' => 'text', 'required' => 0);
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'phone_mobile', 'label' => __('Mobile phone', 'casawp'), 'name' => $prefix . 'phone_mobile', 'type' => 'text', 'required' => 0);
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'gender', 'label' => __('Gender', 'casawp'), 'name' => $prefix . 'gender', 'type' => 'radio', 'required' => 0, 'choices' => array('0' => __('Unknown', 'casawp'), '1' => __('Male', 'casawp'), '2' => __('Female', 'casawp')), 'layout' => 'horizontal');
         $fields[] = array('key' => 'field_casawp_person_' . $prefix . 'note', 'label' => __('Note', 'casawp'), 'name' => $prefix . 'note', 'type' => 'text', 'required' => 0);
         $groupname = 'Person';
         switch ($prefix) {
             case 'seller_view_person_':
                 $groupname = __('Display person', 'casawp');
                 break;
             case 'seller_inquiry_person_':
                 $groupname = __('Inquiry recipient', 'casawp');
                 break;
             case 'seller_visit_person_':
                 $groupname = __('Visit person', 'casawp');
                 break;
         }
         acf_add_local_field_group(array('key' => 'group_casawp_' . $prefix, 'title' => $groupname, 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_property'))), 'menu_order' => 20, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label'));
     }
     //INQUIRY POST TYPE
     $fields = array();
     $form = new \casawp\Form\ContactForm();
     foreach ($form->getElements() as $element) {
         if ($element->getName() != 'message') {
             $fields[] = array('key' => 'field_casawp_inquiry_sender_' . $element->getName(), 'label' => $element->getLabel(), 'name' => 'sender_' . $element->getName(), 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '');
         }
     }
     acf_add_local_field_group(array('key' => 'group_casawp_inquiry', 'title' => 'Sender', 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_inquiry'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'left', 'instruction_placement' => 'label', 'label_placement' => 'left'));
     //identifiers inquiry
     $fields = array();
     $fields[] = array('key' => 'field_casawp_inquiry_' . 'casawp_id', 'label' => __('CASAWP ID', 'casawp'), 'name' => 'casawp_id', 'type' => 'text', 'required' => 0);
     $fields[] = array('key' => 'field_casawp_inquiry_' . 'reference_id', 'label' => __('Reference Nr.', 'casawp'), 'name' => 'reference_id', 'type' => 'text', 'required' => 0);
     acf_add_local_field_group(array('key' => 'group_casawp_inquiry_identifiers', 'title' => __('Identifiers', 'casawp'), 'fields' => $fields, 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'casawp_inquiry'))), 'menu_order' => 1, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label'));
 }
Esempio n. 20
0
<?php

if (function_exists('acf_add_local_field_group')) {
    acf_add_local_field_group(array('key' => 'group_55eef2c507fde', 'title' => 'Postteam', 'fields' => array(array('key' => 'field_55f97902639bd', 'label' => 'Role&image', 'name' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'placement' => 'top', 'endpoint' => 0), array('key' => 'field_55eef3127e734', 'label' => 'Role', 'name' => 'role', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_55eef32df11d9', 'label' => 'image', 'name' => 'image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'medium', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => ''), array('key' => 'field_55f978ab639bc', 'label' => 'sociallinks&icons', 'name' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'placement' => 'top', 'endpoint' => 0), array('key' => 'field_55f9447e383bc', 'label' => 'Sociallinks', 'name' => 'sociallinks', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'layout' => 'table', 'button_label' => 'Add Row', 'sub_fields' => array(array('key' => 'field_55f949ea383be', 'label' => 'link', 'name' => 'link', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_55f949f7383bf', 'label' => 'image', 'name' => 'image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'thumbnail', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => '')))), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'team'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'permalink', 1 => 'the_content', 2 => 'excerpt', 3 => 'custom_fields', 4 => 'discussion', 5 => 'comments', 6 => 'revisions', 7 => 'slug', 8 => 'author', 9 => 'format', 10 => 'page_attributes', 11 => 'featured_image', 12 => 'categories', 13 => 'tags', 14 => 'send-trackbacks')));
}
Esempio n. 21
0
function cptui_register_my_cpt_task()
{
    register_post_type('task', array('label' => __('Tasks', 'govintranet'), 'description' => '', 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'capability_type' => 'post', 'map_meta_cap' => true, 'hierarchical' => true, 'rewrite' => array('slug' => 'task', 'with_front' => true), 'query_var' => true, 'has_archive' => true, 'menu_position' => '38', 'menu_icon' => 'dashicons-hammer', 'supports' => array('title', 'editor', 'excerpt', 'comments', 'revisions', 'author', 'page-attributes'), 'taxonomies' => array('category', 'post_tag'), 'labels' => array('name' => __('Tasks', 'govintranet'), 'singular_name' => __('Task', 'govintranet'), 'menu_name' => __('Tasks', 'govintranet'), 'add_new' => __('Add Task', 'govintranet'), 'add_new_item' => __('Add New Task', 'govintranet'), 'edit' => __('Edit', 'govintranet'), 'edit_item' => __('Edit Task', 'govintranet'), 'new_item' => __('New Task', 'govintranet'), 'view' => __('View Task', 'govintranet'), 'view_item' => __('View Task', 'govintranet'), 'search_items' => __('Search Tasks', 'govintranet'), 'not_found' => __('No Tasks found', 'govintranet'), 'not_found_in_trash' => __('No Tasks found in trash', 'govintranet'), 'parent' => __('Parent Task', 'govintranet'))));
    if (get_option('options_module_tasks_manuals')) {
        acf_add_local_field_group(array('key' => 'group_56a40dcab6d85', 'title' => 'Manual', 'fields' => array(array('key' => 'field_56a40dec54af7', 'label' => 'Treat as a manual', 'name' => 'treat_as_a_manual', 'type' => 'true_false', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'message' => '', 'default_value' => 0), array('key' => 'field_56a40e2754af8', 'label' => 'Manual chapters', 'name' => 'manual_chapters', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => array(array(array('field' => 'field_56a40dec54af7', 'operator' => '==', 'value' => '1'))), 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'collapsed' => '', 'min' => '', 'max' => '', 'layout' => 'row', 'button_label' => 'Add a chapter', 'sub_fields' => array(array('key' => 'field_56a40e5854af9', 'label' => 'Chapter title', 'name' => 'manual_chapter_title', 'type' => 'text', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a40e7354afa', 'label' => 'Content', 'name' => 'manual_chapter_content', 'type' => 'wysiwyg', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'full', 'media_upload' => 1)))), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'task'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    }
}
<?php

if (function_exists('acf_add_local_field_group')) {
    $name_path = 'wb_ts_contact_info';
    acf_add_local_field_group(array('key' => 'group_' . $name_path, 'title' => __('Contact Information', 'eagle'), 'fields' => array(array('key' => 'field_' . $name_path . '__company_name', 'label' => __('Company Name', 'eagle'), 'name' => $name_path . '__company_name', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => __('Enter your company name', 'eagle'), 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_' . $name_path . '__street_number', 'label' => __('Street & Number', 'eagle'), 'name' => $name_path . '__street_number', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => __('Enter your street & number', 'eagle'), 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_' . $name_path . '__postal_code__city', 'label' => __('Postal Code & City', 'eagle'), 'name' => $name_path . '__postal_code__city', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => __('Enter your postal code & city', 'eagle'), 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_' . $name_path . '__vat_number', 'label' => __('VAT Number', 'eagle'), 'name' => $name_path . '__vat_number', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => __('Enter your VAT number', 'eagle'), 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_' . $name_path . '__email', 'label' => __('Email', 'eagle'), 'name' => $name_path . '__email', 'type' => 'email', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => __('Enter your email address', 'eagle'), 'prepend' => '', 'append' => ''), array('key' => 'field_' . $name_path . '__phone_number', 'label' => __('Phone Number', 'eagle'), 'name' => $name_path . '__phone_number', 'type' => 'text', 'instructions' => __('Please enter your phone number as an international format (ex. +32 123 45 67 89) by using the country code. This format is used to activate the direct call feature on mobile devices.', 'eagle'), 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'Ex. +32 123 45 67 89', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_' . $name_path . '__mobile_phone', 'label' => __('Mobile Phone', 'eagle'), 'name' => $name_path . '__mobile_phone', 'type' => 'text', 'instructions' => __('Please enter your mobile phone number as an international format (ex. +32 123 45 67 89) by using the country code. This format is used to activate the direct call feature on mobile devices.', 'eagle'), 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'Ex. +32 123 45 67 89', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_' . $name_path . '__activate_mobile_phone', 'label' => __('Activate mobile phone number on mobile devices?', 'eagle'), 'name' => $name_path . '__activate_mobile_phone', 'type' => 'radio', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('yes' => 'Yes', 'no' => 'No'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => 'no', 'layout' => 'horizontal'), array('key' => 'field_' . $name_path . '__activate_sms', 'label' => __('Activate SMS on mobile devices?', 'eagle'), 'name' => $name_path . '__activate_sms', 'type' => 'radio', 'instructions' => '', 'required' => 0, 'conditional_logic' => array(array(array('field' => 'field_' . $name_path . '__activate_mobile_phone', 'operator' => '==', 'value' => 'yes'))), 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('yes' => 'Yes', 'no' => 'No'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => '', 'layout' => 'horizontal')), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'contact-settings'))), 'menu_order' => 10, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
}
Esempio n. 23
0
 function include_fields()
 {
     // validate
     if (!acf_get_setting('json')) {
         return;
     }
     // vars
     $paths = acf_get_setting('load_json');
     // loop through and add to cache
     foreach ($paths as $path) {
         // remove trailing slash
         $path = untrailingslashit($path);
         // check that path exists
         if (!file_exists($path)) {
             continue;
         }
         $dir = opendir($path);
         while (false !== ($file = readdir($dir))) {
             // only json files
             if (strpos($file, '.json') === false) {
                 continue;
             }
             // read json
             $json = file_get_contents("{$path}/{$file}");
             // validate json
             if (empty($json)) {
                 continue;
             }
             // decode
             $json = json_decode($json, true);
             // add local
             $json['local'] = 'json';
             // add field group
             acf_add_local_field_group($json);
         }
     }
 }
<?php

/**
 * Define
 */
$client_area = array('id' => 'acf_client_gallery', 'title' => 'Client Gallery', 'fields' => array(array('key' => 'village_client_gallery', 'label' => 'Gallery', 'name' => 'village_gallery', 'type' => 'gallery', 'preview_size' => 'thumbnail', 'library' => 'all', 'conditional_logic' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'client_gallery'))), 'options' => array('position' => 'acf_after_title', 'hide_on_screen' => array('excerpt')), 'menu_order' => 0);
$client_area_featured = array('key' => 'acf_client_gallery_featured', 'title' => 'Featured Background Image', 'fields' => array(array('key' => 'featured_background_image', 'label' => '', 'name' => 'featured_background_image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'medium', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'client_gallery'))), 'menu_order' => 0, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '');
/**
 *  Setup
 */
if (function_exists("register_field_group")) {
    $client_area = apply_filters('village_client_area/acf_settings', $client_area);
    if (!empty($client_area)) {
        register_field_group($client_area);
    }
}
if (function_exists('acf_add_local_field_group')) {
    $args = apply_filters('village_client_area/acf_settings_featured', $client_area_featured);
    if (!empty($args)) {
        acf_add_local_field_group($args);
    }
}
Esempio n. 25
0
	}

.forgetmenot { display: none; }
	
	.login form .forgetmenot label {
		width: auto;
	}
	
	.login #backtoblog {
		display: none;
		visibility: hidden;
	}
	
	.login #nav {
		margin: 20px auto 0 auto;
		width: 300px;
		text-align: center;
	}', 'placeholder' => '', 'maxlength' => '', 'rows' => 25, 'new_lines' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-admin'), array('param' => 'user_type', 'operator' => '==', 'value' => 'administrator'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
    register_field_group(array('key' => 'group_5421d13354e47', 'title' => 'Google Analytics', 'fields' => array(array('key' => 'field_5421d13f81ea3', 'label' => '', 'name' => 'ga_id', 'prefix' => '', 'type' => 'text', 'instructions' => 'To enable Google Analytics, add your GA ID (ie. UA-XXXX-YY)', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'site-settings'))), 'menu_order' => 0, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => ''));
    register_field_group(array('key' => 'group_54222845bd898', 'title' => 'Hide Sections', 'fields' => array(array('key' => 'field_5421d26106c43', 'label' => 'Hide Posts?', 'name' => 'hide_posts', 'prefix' => '', 'type' => 'radio', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'choices' => array('yes' => 'Yes', 'no' => 'No'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => 'no', 'layout' => 'horizontal')), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-admin'), array('param' => 'user_type', 'operator' => '==', 'value' => 'administrator'))), 'menu_order' => 1, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
    register_field_group(array('key' => 'group_542219bf0fd25', 'title' => 'Admin Style', 'fields' => array(array('key' => 'field_54221fd546616', 'label' => 'Primary', 'name' => '', 'prefix' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0), array('key' => 'field_542219dc39933', 'label' => 'Primary BG', 'name' => 'primary_bg', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_54221ea65d836', 'label' => 'Primary Text', 'name' => 'primary_text', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_54221eb75d837', 'label' => 'Primary BG Hover', 'name' => 'primary_bg_hover', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_54221ec35d838', 'label' => 'Primary Text Hover', 'name' => 'primary_text_hover', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_54221fe246617', 'label' => 'Secondary', 'name' => '', 'prefix' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0), array('key' => 'field_542222cc6da0e', 'label' => 'Secondary Text', 'name' => 'secondary_text', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_542222e36da0f', 'label' => 'Secondary Text Hover', 'name' => 'secondary_text_hover', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-admin'), array('param' => 'user_type', 'operator' => '==', 'value' => 'administrator'))), 'menu_order' => 2, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
    acf_add_local_field_group(array('key' => 'group_55e8b4612e9c9', 'title' => 'Type Settings', 'fields' => array(array('key' => 'field_55e8b46130694', 'label' => 'Sort Order', 'name' => 'type_order', 'type' => 'number', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => '', 'max' => '', 'step' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'taxonomy', 'operator' => '==', 'value' => 'type'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56691c465dfdd', 'title' => 'Header Graphic', 'fields' => array(array('key' => 'field_56691c5fec09b', 'label' => '', 'name' => 'header_graphic', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'header', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'page'), array('param' => 'page_type', 'operator' => '!=', 'value' => 'front_page'), array('param' => 'page_template', 'operator' => '!=', 'value' => 'template-projects.php'))), 'menu_order' => 0, 'position' => 'acf_after_title', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'featured_image'), 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_566a016c811e4', 'title' => 'Home', 'fields' => array(array('key' => 'field_566a018af71df', 'label' => 'Notice', 'name' => '', 'type' => 'message', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'message' => 'This is your homepage. Feel free to leave this blank, or if you have a message you need to write, use the editor below.', 'esc_html' => 0)), 'location' => array(array(array('param' => 'page_type', 'operator' => '==', 'value' => 'front_page'))), 'menu_order' => 0, 'position' => 'acf_after_title', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'discussion', 1 => 'comments', 2 => 'featured_image', 3 => 'categories'), 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_5669ee193e044', 'title' => 'Project Desc', 'fields' => array(array('key' => 'field_5669ee2685396', 'label' => '', 'name' => 'project_desc', 'type' => 'wysiwyg', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'full', 'media_upload' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'project'))), 'menu_order' => 0, 'position' => 'acf_after_title', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_566937dd8c5fc', 'title' => 'Project Settings', 'fields' => array(array('key' => 'field_566937f09e9ea', 'label' => 'Grid Size', 'name' => 'grid_size', 'type' => 'radio', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => 'grid-sizes', 'id' => ''), 'choices' => array('normal' => 'Normal', 'big' => 'Big'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => 'Normal', 'layout' => 'vertical'), array('key' => 'field_5669ee7bf2f10', 'label' => 'Related Projects', 'name' => 'related_projects', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => 3, 'max' => 3, 'layout' => 'table', 'button_label' => 'Add Project', 'sub_fields' => array(array('key' => 'field_5669ee90f2f11', 'label' => '', 'name' => 'project', 'type' => 'post_object', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'project'), 'taxonomy' => array(), 'allow_null' => 0, 'multiple' => 0, 'return_format' => 'object', 'ui' => 1)))), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'project'))), 'menu_order' => 0, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56692e4f582ca', 'title' => 'Projects', 'fields' => array(array('key' => 'field_56692e6f51820', 'label' => 'Notice', 'name' => '', 'type' => 'message', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'message' => 'This page shows your projects. To edit them, access the "Projects" section from the sidebar or <a href="/wp-admin/edit.php?post_type=project">click here</a>.', 'esc_html' => 0)), 'location' => array(array(array('param' => 'page_template', 'operator' => '==', 'value' => 'template-projects.php'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'the_content', 1 => 'excerpt', 2 => 'custom_fields', 3 => 'discussion', 4 => 'comments', 5 => 'format', 6 => 'featured_image', 7 => 'categories', 8 => 'tags'), 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_5669199cb42b7', 'title' => 'Team', 'fields' => array(array('key' => 'field_566919a6234f4', 'label' => 'Title', 'name' => 'team_title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_566919b0234f5', 'label' => 'Team Members', 'name' => 'team_members', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'layout' => 'block', 'button_label' => 'Add Person', 'sub_fields' => array(array('key' => 'field_566919c7234f6', 'label' => 'Photo', 'name' => 'photo', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'medium', 'library' => 'uploadedTo', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => ''), array('key' => 'field_56691a6b234f7', 'label' => 'Hover Photo', 'name' => 'hover_photo', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'medium', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => ''), array('key' => 'field_56691a84234f8', 'label' => 'Stats', 'name' => 'stats', 'type' => 'wysiwyg', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'full', 'media_upload' => 0)))), 'location' => array(array(array('param' => 'page_template', 'operator' => '==', 'value' => 'template-team.php'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_5669f94832e58', 'title' => 'TypeKit', 'fields' => array(array('key' => 'field_5669f956ab662', 'label' => '', 'name' => 'typekit_id', 'type' => 'text', 'instructions' => 'To enable TypeKit, add your kit ID here', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'site-settings'))), 'menu_order' => 0, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_5669fccc42d7f', 'title' => 'Footer Settings', 'fields' => array(array('key' => 'field_5669fd7c2fd26', 'label' => 'Display Address', 'name' => 'display_address', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5669fd992fd27', 'label' => 'Address Link', 'name' => 'address_link', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5669fda72fd28', 'label' => 'Phone', 'name' => 'phone', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5669fdd82fd29', 'label' => 'Email', 'name' => 'email', 'type' => 'email', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => ''), array('key' => 'field_5669fde52fd2a', 'label' => 'Social Links', 'name' => 'social_links', 'type' => 'repeater', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'layout' => 'block', 'button_label' => 'Add Link', 'sub_fields' => array(array('key' => 'field_5669fdfa2fd2b', 'label' => 'Title', 'name' => 'title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 30, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5669fe062fd2c', 'label' => 'URL', 'name' => 'url', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 70, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)))), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'site-settings'))), 'menu_order' => 1, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
}
Esempio n. 26
0
	.login h1 {
		margin-top: 100px;
	}
	
	#login #lostpasswordform p.submit, #login form p.submit {
		width: 100%;
	}

.forgetmenot { display: none; }
	
	.login form .forgetmenot label {
		width: auto;
	}
	
	.login #backtoblog {
		display: none;
		visibility: hidden;
	}
	
	.login #nav {
		margin: 20px auto 0 auto;
		width: 300px;
		text-align: center;
	}', 'placeholder' => '', 'maxlength' => '', 'rows' => 25, 'new_lines' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-admin'), array('param' => 'user_type', 'operator' => '==', 'value' => 'administrator'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
    acf_add_local_field_group(array('key' => 'group_56421661db605', 'title' => 'Constant Contact Settings', 'fields' => array(array('key' => 'field_5642166eefdbb', 'label' => 'Username', 'name' => 'cc_login', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5642167defdbc', 'label' => 'Password', 'name' => 'cc_password', 'type' => 'password', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'placeholder' => '', 'prepend' => '', 'append' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56421696efdbd', 'label' => 'Email Group', 'name' => 'cc_group', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'site-settings'))), 'menu_order' => 0, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_5421d13354e47', 'title' => 'Google Analytics', 'fields' => array(array('key' => 'field_5421d13f81ea3', 'label' => '', 'name' => 'ga_id', 'prefix' => '', 'type' => 'text', 'instructions' => 'To enable Google Analytics, add your GA ID (ie. UA-XXXX-YY)', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'site-settings'))), 'menu_order' => 0, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => ''));
    acf_add_local_field_group(array('key' => 'group_5421d2433745a', 'title' => 'Footer Contact Settings', 'fields' => array(array('key' => 'field_5421d0f95858b', 'label' => 'Display Address', 'name' => 'display_address', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_5421d0f95848b', 'label' => 'Address Link', 'name' => 'address_link', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_560b4c29674fe', 'label' => 'Email Address', 'name' => 'footer_email', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_560b4c16674fd', 'label' => 'Phone Number', 'name' => 'footer_phone', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'site-settings'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
    acf_add_local_field_group(array('key' => 'group_55aecb984ee9d', 'title' => 'Footer Social Settings', 'fields' => array(array('key' => 'field_55aeccdda2bd4', 'label' => 'Facebook URL', 'name' => 'facebook_url', 'prefix' => '', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_55aeccc0a2bd3', 'label' => 'Twitter URL', 'name' => 'twitter_url', 'prefix' => '', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_55aec5c0a2ad3', 'label' => 'Instagram URL', 'name' => 'instagram_url', 'prefix' => '', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_55aecceba2bd5', 'label' => 'Pinterest URL', 'name' => 'pinterest_url', 'prefix' => '', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_56457892bf537', 'label' => 'Youtube URL', 'name' => 'youtube_url', 'prefix' => '', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_564578a7bf538', 'label' => 'Yelp URL', 'name' => 'yelp_url', 'prefix' => '', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '')), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'site-settings'))), 'menu_order' => 1, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
    acf_add_local_field_group(array('key' => 'group_54222845bd898', 'title' => 'Hide Sections', 'fields' => array(array('key' => 'field_5421d26106c43', 'label' => 'Hide Posts?', 'name' => 'hide_posts', 'prefix' => '', 'type' => 'radio', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'choices' => array('yes' => 'Yes', 'no' => 'No'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => 'no', 'layout' => 'horizontal')), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-admin'), array('param' => 'user_type', 'operator' => '==', 'value' => 'administrator'))), 'menu_order' => 1, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
    acf_add_local_field_group(array('key' => 'group_542219bf0fd25', 'title' => 'Admin Style', 'fields' => array(array('key' => 'field_54221fd546616', 'label' => 'Primary', 'name' => '', 'prefix' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0), array('key' => 'field_542219dc39933', 'label' => 'Primary BG', 'name' => 'primary_bg', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_54221ea65d836', 'label' => 'Primary Text', 'name' => 'primary_text', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_54221eb75d837', 'label' => 'Primary BG Hover', 'name' => 'primary_bg_hover', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_54221ec35d838', 'label' => 'Primary Text Hover', 'name' => 'primary_text_hover', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_54221fe246617', 'label' => 'Secondary', 'name' => '', 'prefix' => '', 'type' => 'tab', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0), array('key' => 'field_542222cc6da0e', 'label' => 'Secondary Text', 'name' => 'secondary_text', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_542222e36da0f', 'label' => 'Secondary Text Hover', 'name' => 'secondary_text_hover', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'default_value' => '', 'placeholder' => '', 'prepend' => '#', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-admin'), array('param' => 'user_type', 'operator' => '==', 'value' => 'administrator'))), 'menu_order' => 2, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
}
Esempio n. 27
0
    return $container->getParameterBag()->resolveValue($container->getParameter('wordpress.acf_path'));
});
// show acf menus
add_filter('acf/settings/show_admin', function ($show) use($container) {
    return $container->getParameter('wordpress.acf_menu');
});
// global timber context
add_filter('timber/context', function ($data) {
    // logos
    $data['favicon'] = get_field('favicon', 'option') ?: get_field('mobile_logo', 'option');
    $data['mobile_logo'] = get_field('mobile_logo', 'option') ?: get_field('logo', 'option');
    $data['alt_logo'] = get_field('alt_logo', 'option') ?: get_field('logo', 'option');
    $data['logo'] = get_field('logo', 'option');
    // sharethis
    $data['sharethis'] = get_field('sharethis_key', 'option');
    // checkers
    $data['is_ssl'] = is_ssl();
    return $data;
});
// move yoast down
add_filter('wpseo_metabox_prio', function () {
    return 'low';
});
/***********************************************************************************************************************
 * ACF
 **********************************************************************************************************************/
if (function_exists('acf_add_local_field_group')) {
    $parser = new \Symfony\Component\Yaml\Parser();
    $fields = $parser->parse(file_get_contents(__DIR__ . '/../app/config/theme_options.yml'));
    acf_add_local_field_group($fields);
}
<?php

/**
 * ACF-5 (Pro) Fields
 *
 * Last Updated: 02-09-2016
 */
if (function_exists('acf_add_local_field_group')) {
    acf_add_local_field_group(array('key' => 'group_56ba10e3b4608', 'title' => 'Podcast Episode', 'fields' => array(array('key' => 'field_56ba1122c5049', 'label' => 'Episode Number', 'name' => 'podcast_episode_number', 'type' => 'number', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 100, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => 0, 'max' => '', 'step' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'podcasts'))), 'menu_order' => 0, 'position' => 'side', 'style' => 'seamless', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a1462b64484', 'title' => 'Stations', 'fields' => array(array('key' => 'field_56845fb4a9541', 'label' => 'Location', 'name' => 'station_location', 'type' => 'text', 'instructions' => 'The city or location of the station.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'Fargo', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_568461f839f89', 'label' => 'Name', 'name' => 'station_name', 'type' => 'text', 'instructions' => 'Station Name & ID. Format: AM/PM, Frequency, Call Sign', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'AM 970 WDAY', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_568464d193779', 'label' => 'Station Website', 'name' => 'station_website', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'http://www.wday.com/radio', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a930429707a', 'label' => 'Broadcast Day', 'name' => 'station_day', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'choices' => array('Mondays' => 'Mondays', 'Tuesdays' => 'Tuesdays', 'Wednesdays' => 'Wednesdays', 'Thursdays' => 'Thursdays', 'Fridays' => 'Fridays', 'Saturdays' => 'Saturdays', 'Sundays' => 'Sundays'), 'default_value' => array(), 'allow_null' => 1, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0), array('key' => 'field_56a930e69707b', 'label' => 'Broadcast Time', 'name' => 'station_time', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'choices' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12), 'default_value' => array(), 'allow_null' => 1, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0), array('key' => 'field_56a931bbe31ed', 'label' => 'AM/PM', 'name' => 'station_ampm', 'type' => 'select', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'choices' => array('a.m.' => 'a.m.', 'p.m.' => 'p.m.'), 'default_value' => array(), 'allow_null' => 1, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0), array('key' => 'field_5684643d96022', 'label' => 'Live Streaming Link', 'name' => 'station_streaming_link', 'type' => 'text', 'instructions' => '"Listen Live" url.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'http://radio.securenetsystems.net/v5/WDAY', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_568466d34f2a8', 'label' => 'Station Notes', 'name' => 'station_notes', 'type' => 'text', 'instructions' => 'Optional additional information.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '(Starting December 26th)', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_568469f549064', 'label' => 'Address', 'name' => 'station_address', 'type' => 'text', 'instructions' => 'Optional Street Address', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '301 8th St S, Fargo, ND 58103', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56846a0649065', 'label' => 'Places ID', 'name' => 'station_places_id', 'type' => 'text', 'instructions' => 'Optional Google Places ID', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => 'ChIJnbHrt1jJyFIRkPmAo-qfWac', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'stations'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'permalink'), 'active' => 1, 'description' => 'Northland Outdoors Affiliate Stations Info'));
    acf_add_local_field_group(array('key' => 'group_56a1638d86dbb', 'title' => 'Upcoming Shows', 'fields' => array(array('key' => 'field_56a16402c894b', 'label' => 'Coming up on future shows:', 'name' => 'upcoming_shows', 'type' => 'wysiwyg', 'instructions' => '*If you have a good story that we should feature on the show, contact us below. ', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'full', 'media_upload' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-upcoming-shows'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'seamless', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => '"Coming up on future shows:" section of the "Radio" page.'));
    acf_add_local_field_group(array('key' => 'group_56a66516decbd', 'title' => 'JW Platform API', 'fields' => array(array('key' => 'field_56a66538e7b1d', 'label' => 'Key', 'name' => 'jw_platform_api_key', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a66561e7b1e', 'label' => 'Secret', 'name' => 'jw_platform_api_secret', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-northland-outdoors-radio-plugin-settings'))), 'menu_order' => 1, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a1462b537dd', 'title' => 'Segment 1', 'fields' => array(array('key' => 'field_569d557483373', 'label' => 'JW Player Key', 'name' => 'segment_1_key', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_1_key'), 'default_value' => '', 'placeholder' => 'R4wsa1fA', 'prepend' => '', 'append' => '', 'maxlength' => 8, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d562ab7ab2', 'label' => 'Duration', 'name' => 'segment_1_duration', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_1_duration'), 'default_value' => '', 'placeholder' => '00:00:00', 'prepend' => '', 'append' => '', 'maxlength' => 10, 'readonly' => 1, 'disabled' => 0), array('key' => 'field_56a15fd15cc62', 'label' => 'Date', 'name' => 'segment_1_date', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_1_date'), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 1, 'disabled' => 0), array('key' => 'field_56b284a09b238', 'label' => 'Size', 'name' => 'segment_1_size', 'type' => 'number', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_1_size'), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => 0, 'max' => '', 'step' => '', 'readonly' => 1, 'disabled' => 0), array('key' => 'field_569d52d01c270', 'label' => 'Title', 'name' => 'segment_1_title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => 'acf-field-segment_1_title'), 'default_value' => '', 'placeholder' => '', 'prepend' => 'Northland Outdoors Radio Podcast –', 'append' => '', 'maxlength' => 240, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d606c6a39b', 'label' => 'Description', 'name' => 'segment_1_description', 'type' => 'wysiwyg', 'instructions' => 'Note: 4000 character max.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => 'segment_1_description'), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'basic', 'media_upload' => 0), array('key' => 'field_56aa399d07f80', 'label' => 'Link to corresponding post', 'name' => 'segment_1_link', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 66, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_56b0faad20354', 'label' => 'Post ID', 'name' => 'segment_1_postid', 'type' => 'number', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => 0, 'max' => '', 'step' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a6875d5dcbc', 'label' => 'Segment Thumbnail', 'name' => 'segment_thumbnail', 'type' => 'accordion', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => 'hidden-by-conditional-logic', 'id' => ''), 'icon_class' => 'dashicons-format-image'), array('key' => 'field_569d6799e92a3', 'label' => 'Segment Image', 'name' => 'segment_1_image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'thumbnail', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'podcasts'))), 'menu_order' => 1, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a925e624ded', 'title' => 'Station Type', 'fields' => array(array('key' => 'field_56a9260566330', 'label' => 'Select Type', 'name' => 'station_type', 'type' => 'taxonomy', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'taxonomy' => 'station_type', 'field_type' => 'select', 'allow_null' => 0, 'add_term' => 0, 'save_terms' => 1, 'load_terms' => 1, 'return_format' => 'id', 'multiple' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'stations'))), 'menu_order' => 1, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a1462b59ca0', 'title' => 'Segment 2', 'fields' => array(array('key' => 'field_569d639963660', 'label' => 'JW Player Key', 'name' => 'segment_2_key', 'type' => 'text', 'instructions' => 'Enter the audio/video key from your JW Player upload here.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_2_key'), 'default_value' => '', 'placeholder' => 'R4wsa1fA', 'prepend' => '', 'append' => '', 'maxlength' => 8, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d63c1ba8e5', 'label' => 'Duration', 'name' => 'segment_2_duration', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_2_duration'), 'default_value' => '', 'placeholder' => '00:00:00', 'prepend' => '', 'append' => '', 'maxlength' => 10, 'readonly' => 1, 'disabled' => 0), array('key' => 'field_56a9076b12406', 'label' => 'Date', 'name' => 'segment_2_date', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_2_date'), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 1, 'disabled' => 0), array('key' => 'field_56b286da7075c', 'label' => 'Size', 'name' => 'segment_2_size', 'type' => 'number', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_2_size'), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => 0, 'max' => '', 'step' => '', 'readonly' => 1, 'disabled' => 0), array('key' => 'field_569d633e531a0', 'label' => 'Title', 'name' => 'segment_2_title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => 'Northland Outdoors Radio Podcast –', 'append' => '', 'maxlength' => 240, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d636b531a1', 'label' => 'Description', 'name' => 'segment_2_description', 'type' => 'wysiwyg', 'instructions' => 'Note: 4000 character max.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'basic', 'media_upload' => 0), array('key' => 'field_56aa3ae7e829c', 'label' => 'Link to corresponding post', 'name' => 'segment_2_link', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 66, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_56b0fbc1589e4', 'label' => 'Post ID', 'name' => 'segment_2_postid', 'type' => 'number', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => 0, 'max' => '', 'step' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a907cdde065', 'label' => 'Segment Thumbnail', 'name' => 'segment_thumbnail', 'type' => 'accordion', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => 'hidden-by-conditional-logic', 'id' => ''), 'icon_class' => 'dashicons-format-image'), array('key' => 'field_569d688c6b821', 'label' => 'Segment Image', 'name' => 'segment_2_image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'thumbnail', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'podcasts'))), 'menu_order' => 2, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a92aaff29df', 'title' => 'Station State', 'fields' => array(array('key' => 'field_56a92ab000904', 'label' => 'Select State', 'name' => 'station_state', 'type' => 'taxonomy', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'taxonomy' => 'station_state', 'field_type' => 'select', 'allow_null' => 1, 'add_term' => 0, 'save_terms' => 1, 'load_terms' => 1, 'return_format' => 'id', 'multiple' => 0)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'stations'))), 'menu_order' => 2, 'position' => 'side', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56a1462b5ed4d', 'title' => 'Segment 3', 'fields' => array(array('key' => 'field_569d660f38ddc', 'label' => 'JW Player Key', 'name' => 'segment_3_key', 'type' => 'text', 'instructions' => 'Enter the audio/video key from your JW Player upload here.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_3_key'), 'default_value' => '', 'placeholder' => 'V1HDlWg2', 'prepend' => '', 'append' => '', 'maxlength' => 8, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d6644a5f5d', 'label' => 'Duration', 'name' => 'segment_3_duration', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_3_duration'), 'default_value' => '', 'placeholder' => '00:00:00', 'prepend' => '', 'append' => '', 'maxlength' => 10, 'readonly' => 1, 'disabled' => 0), array('key' => 'field_56a908035a569', 'label' => 'Date', 'name' => 'segment_3_date', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_3_date'), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 1, 'disabled' => 0), array('key' => 'field_56b2876af1aad', 'label' => 'Size', 'name' => 'segment_3_size', 'type' => 'number', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 25, 'class' => '', 'id' => 'acf-field-segment_3_size'), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => 0, 'max' => '', 'step' => '', 'readonly' => 1, 'disabled' => 0), array('key' => 'field_569d64d949093', 'label' => 'Title', 'name' => 'segment_3_title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '255 characters max.', 'prepend' => 'Northland Outdoors Radio Podcast –', 'append' => '', 'maxlength' => 240, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_569d65b83c887', 'label' => 'Description', 'name' => 'segment_3_description', 'type' => 'wysiwyg', 'instructions' => 'Note: 4000 characters max.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'tabs' => 'all', 'toolbar' => 'basic', 'media_upload' => 0), array('key' => 'field_56aa3b67849a2', 'label' => 'Link to corresponding post', 'name' => 'segment_3_link', 'type' => 'url', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 66, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => ''), array('key' => 'field_56b0fc6829259', 'label' => 'Post ID', 'name' => 'segment_3_postid', 'type' => 'number', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 33, 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'min' => 0, 'max' => '', 'step' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56a908365a56a', 'label' => 'Segment Thumbnail', 'name' => 'segment_thumbnail', 'type' => 'accordion', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => 'hidden-by-conditional-logic', 'id' => ''), 'icon_class' => 'dashicons-format-image'), array('key' => 'field_569d68aa81cb7', 'label' => 'Segment Image', 'name' => 'segment_3_image', 'type' => 'image', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'array', 'preview_size' => 'thumbnail', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'podcasts'))), 'menu_order' => 3, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'field', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56b375f0dee59', 'title' => 'Podcast Channel Settings', 'fields' => array(array('key' => 'field_56b3768603937', 'label' => 'Channel Title', 'name' => 'podcasts_channel_title', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => 'acf-field-podcasts_channel_title'), 'default_value' => 'Northland Outdoors', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => 255, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b3df92769c6', 'label' => 'Channel Author', 'name' => 'podcasts_channel_author', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => 'Forum Communications Company', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => 255, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b3e0ea8991f', 'label' => 'Channel Image', 'name' => 'podcasts_channel_image', 'type' => 'image', 'instructions' => 'Cover art must be in the JPEG or PNG file formats and in the RGB color space with a minimum size of 1400 x 1400 pixels and a maximum size of 3000 x 3000 pixels. ', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'return_format' => 'url', 'preview_size' => 'thumbnail', 'library' => 'all', 'min_width' => 1400, 'min_height' => 1400, 'min_size' => '', 'max_width' => 3000, 'max_height' => 3000, 'max_size' => '', 'mime_types' => 'png,jpeg'), array('key' => 'field_56b3e00997d40', 'label' => 'Channel Summary', 'name' => 'podcasts_channel_summary', 'type' => 'textarea', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => 'Tune into Northland Outdoors Radio each week all across the Northland. This one-hour radio show will get you updated on the latest news from the outdoors, tips from the experts and stories from those who bagged a trophy of a lifetime.', 'placeholder' => 'This field can be up to 4000 characters.', 'maxlength' => 4000, 'rows' => 4, 'new_lines' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b3dc08c4993', 'label' => 'Channel Category', 'name' => 'podcasts_channel_category', 'type' => 'taxonomy', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'taxonomy' => 'itunes_categories', 'field_type' => 'select', 'allow_null' => 0, 'add_term' => 0, 'save_terms' => 0, 'load_terms' => 0, 'return_format' => 'object', 'multiple' => 0), array('key' => 'field_56ba1aae2ee8c', 'label' => 'Channel Keywords', 'name' => 'podcasts_channel_keywords', 'type' => 'text', 'instructions' => 'Enter relevant keywords, separated by a comma. ', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => 'outdoors,hunting,fishing,destinations,recreation', 'placeholder' => 'keyword1,keyword2,keyword3', 'prepend' => '', 'append' => '', 'maxlength' => 250, 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b3e4791e2b3', 'label' => 'Channel Link', 'name' => 'podcasts_channel_link', 'type' => 'url', 'instructions' => 'The website link that will appear under "podcast details".', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => 'http://127.0.0.1/areavoices/northlandoutdoors', 'placeholder' => ''), array('key' => 'field_56b3e2ce1384a', 'label' => 'Channel Explicit', 'name' => 'podcasts_channel_explicit', 'type' => 'select', 'instructions' => 'Indicate whether your podcast contains explicit material.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'choices' => array('clean' => 'No', 'Yes' => 'Yes'), 'default_value' => array('clean' => 'No'), 'allow_null' => 0, 'multiple' => 0, 'ui' => 0, 'ajax' => 0, 'placeholder' => '', 'disabled' => 0, 'readonly' => 0), array('key' => 'field_56ba1d02d1a9b', 'label' => 'Channel E-mail', 'name' => 'podcasts_channel_owner_e-mail', 'type' => 'email', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '*****@*****.**', 'placeholder' => '*****@*****.**', 'prepend' => '', 'append' => '')), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-northland-outdoors-radio-plugin-settings'))), 'menu_order' => 11, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56b1097c1f2ed', 'title' => 'Options', 'fields' => array(array('key' => 'field_56ba518640247', 'label' => 'Radio Page', 'name' => 'radio_page_toggle', 'type' => 'true_false', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'message' => 'Disable dynamic \'Radio\' page template', 'default_value' => 0), array('key' => 'field_56b24ab5df4c1', 'label' => '"Stations" Layout Format', 'name' => 'stations_layout', 'type' => 'radio', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 50, 'class' => '', 'id' => ''), 'choices' => array(0 => 'Standard List', 1 => 'Styled Table'), 'other_choice' => 0, 'save_other_choice' => 0, 'default_value' => '', 'layout' => 'horizontal'), array('key' => 'field_56b1099349088', 'label' => 'Podcasts', 'name' => 'segment_thumbnail_image_field', 'type' => 'true_false', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => 100, 'class' => '', 'id' => ''), 'message' => 'Enable Segment Thumbnail/Image Field', 'default_value' => 0)), 'location' => array(array(array('param' => 'options_page', 'operator' => '==', 'value' => 'acf-options-northland-outdoors-radio-plugin-settings'))), 'menu_order' => 100, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => '', 'active' => 1, 'description' => ''));
    acf_add_local_field_group(array('key' => 'group_56b8f08031e16', 'title' => 'Radio Page Fields', 'fields' => array(array('key' => 'field_56b8f0a39cc5c', 'label' => 'Header Description', 'name' => 'norad_header_description', 'type' => 'textarea', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => 'norad_header_description'), 'default_value' => 'Tune into Northland Outdoors Radio each week all across the Northland. This one-hour radio show will get you updated on the latest news from the outdoors, tips from the experts and stories from those who bagged a trophy of a lifetime.', 'placeholder' => '', 'maxlength' => '', 'rows' => 3, 'new_lines' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b8f7235ff3a', 'label' => 'Upcoming Shows Header', 'name' => 'norad_upcoming_shows_header', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => 'Coming up on future shows:', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b8f1733e027', 'label' => 'Upcoming Shows Footnote', 'name' => 'norad_upcoming_shows_footnote', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => 'norad_upcoming_shows_footer'), 'default_value' => 'If you have a good story that we should feature on the show, contact us below.', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b915b32740d', 'label' => 'Stations Tagline', 'name' => 'norad_stations_tagline', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '<strong>HERE\'S WHERE AND WHEN YOU CAN LISTEN TO THE SHOW:</strong>', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b915d22740e', 'label' => 'Stations "Just Added"', 'name' => 'norad_stations_announcements', 'type' => 'textarea', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '<strong>*JUST ADDED:  Devils Lake, ND (starts Feb 6), Jamestown, ND (starts Feb 6) and Park Falls, WI (starts Feb 6)! </strong><em>(More affiliates to come)</em>', 'placeholder' => '', 'maxlength' => '', 'rows' => 2, 'new_lines' => 'wpautop', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b916092740f', 'label' => 'Stations Footnote', 'name' => 'norad_stations_footnote', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '<h6>To get Northland Outdoors Radio on your station, contact us below.  Easy downloadable delivery, exclusive territory and no barter agreement.</h6>', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b9166d0d43a', 'label' => 'Contact Form', 'name' => 'norad_radio_contact', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '[contact-form to=\'bret.amundson@northlandoutdoors.com\' subject=\'Email From Northland Outdoors Website\'][contact-field label=\'Name\' type=\'name\' required=\'1\'/][contact-field label=\'Email\' type=\'email\' required=\'1\'/][contact-field label=\'Website\' type=\'url\'/][contact-field label=\'Comment\' type=\'textarea\' required=\'1\'/][/contact-form]', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56b916a40d43b', 'label' => 'Radio Page Footnote', 'name' => 'norad_radio_page_footnote', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => 'For more information, download the <a href="http://www.northlandoutdoors.com/files/2016/01/Northland_Outdoors-Media_Kit-2016.pdf">Northland Outdoors 2016 Media Kit.</a>', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_56bd222002be5', 'label' => 'Contact Form Page', 'name' => 'norad_radio_contact_form_page', 'type' => 'post_object', 'instructions' => 'Place the Contact Form shortcode in page, then choose the corresponding page containing the contact form here. ', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'post_type' => array(0 => 'page'), 'taxonomy' => array(), 'allow_null' => 0, 'multiple' => 0, 'return_format' => 'id', 'ui' => 1)), 'location' => array(array(array('param' => 'pagename', 'operator' => '==', 'value' => 'radio'))), 'menu_order' => 200, 'position' => 'acf_after_title', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'excerpt', 1 => 'custom_fields', 2 => 'discussion', 3 => 'comments', 4 => 'revisions', 5 => 'slug', 6 => 'author', 7 => 'format', 8 => 'page_attributes', 9 => 'featured_image', 10 => 'categories', 11 => 'tags', 12 => 'send-trackbacks'), 'active' => 1, 'description' => 'Populates dynamic text fields on the Radio page.'));
}
Esempio n. 29
0
<?php

if (function_exists('acf_add_local_field_group')) {
    acf_add_local_field_group(array('key' => 'group_ts_gallery', 'title' => 'Gallery', 'fields' => array(array('key' => 'field_ts_gallery__images', 'label' => false, 'name' => 'ts_gallery__images', 'type' => 'gallery', 'instructions' => __('Please add your images', 'eagle'), 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'preview_size' => 'thumbnail', 'library' => 'all', 'min_width' => '', 'min_height' => '', 'min_size' => '', 'max_width' => '', 'max_height' => '', 'max_size' => '', 'mime_types' => '')), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'post')), array(array('param' => 'post_type', 'operator' => '==', 'value' => 'page'))), 'menu_order' => 0, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => ''));
}
Esempio n. 30
-1
function acfmod_init()
{
    if (function_exists('acf_add_local_field_group')) {
        $layouts = apply_filters('acfmod/layouts', array());
        acf_add_local_field_group(array('key' => 'acfmod_modules_group', 'title' => 'Content Modules', 'fields' => array(array('key' => 'acf_modules_field', 'label' => 'Modules', 'name' => '_acfmod_modules', 'type' => 'flexible_content', 'instructions' => 'Create many different types of content by selecting the module and filling in the fields.', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'button_label' => 'Add Module', 'min' => 0, 'max' => '', 'layouts' => $layouts)), 'location' => array(array(array('param' => 'post_type', 'operator' => '==', 'value' => 'page'))), 'menu_order' => 1, 'position' => 'normal', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'the_content', 1 => 'excerpt')));
    }
}