/** Custom Meta Boxes 2 :: https://github.com/WebDevStudios/CMB2 **/
function base_set_custom_meta_boxes(array $base_meta_boxes)
{
    // Start with an underscore to hide fields from custom fields list
    $base_fields_prefix = base_fields_prefix();
    // WYSIWYG options ---------------------------------------------------
    $base_wysiwyg_options_minimal = array('wpautop' => true, 'media_buttons' => false, 'textarea_rows' => get_option('default_post_edit_rows', 5), 'tabindex' => '', 'editor_css' => '', 'editor_class' => '', 'teeny' => false, 'dfw' => false, 'tinymce' => false, 'quicktags' => false);
    $base_wysiwyg_options_small = array('wpautop' => true, 'media_buttons' => true, 'textarea_rows' => get_option('default_post_edit_rows', 5), 'tabindex' => '', 'editor_css' => '', 'editor_class' => '', 'teeny' => false, 'dfw' => false, 'tinymce' => true, 'quicktags' => true);
    $base_wysiwyg_options_full = array('wpautop' => true, 'media_buttons' => true, 'textarea_rows' => get_option('default_post_edit_rows', 10), 'tabindex' => '', 'editor_css' => '', 'editor_class' => '', 'teeny' => false, 'dfw' => false, 'tinymce' => true, 'quicktags' => true);
    /*
     *
     * Left empty : populate after examples library
     *
     */
    return $base_meta_boxes;
}
Example #2
0
function base_get_map_locations()
{
    $base_fields_prefix = base_fields_prefix();
    $map_locations = new WP_Query(array('post_type' => 'locations', 'posts_per_page' => -1, 'orderby' => 'menu', 'order' => 'ASC'));
    $map_locations_array = array();
    if ($map_locations->have_posts()) {
        while ($map_locations->have_posts()) {
            $map_locations->the_post();
            $map_location_name = get_the_title();
            $map_location_address = get_post_meta($map_locations->post->ID, $base_fields_prefix . 'address');
            $map_location_information = get_post_meta($map_locations->post->ID, $base_fields_prefix . 'information');
            $map_location = array('name' => $map_location_name, 'address' => $map_location_address[0], 'information' => apply_filters('the_content', $map_location_information[0]));
            array_push($map_locations_array, $map_location);
        }
    }
    wp_reset_query();
    return $map_locations_array;
}
Example #3
0
<?php

$base_fields_prefix = base_fields_prefix();
global $post;
get_header();
get_footer();