Esempio n. 1
0
function talkinghouse_welcome_fields()
{
    return array('key' => 'group_551278f883582', 'title' => 'Welcome Page', 'fields' => array(array('key' => 'field_55127b3da6367', 'label' => 'Welcome Slides', 'name' => 'welcome_slides', 'prefix' => '', 'type' => 'repeater', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'min' => '', 'max' => '', 'layout' => 'table', 'button_label' => 'Add Row', 'sub_fields' => array(array('key' => 'field_55127b82a6368', 'label' => 'Slide Title', 'name' => 'slide_title', 'prefix' => '', '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_55127b9aa6369', 'label' => 'Slide Content', 'name' => 'slide_content', 'prefix' => '', 'type' => 'textarea', 'instructions' => '', 'required' => 1, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => '', 'placeholder' => '', 'maxlength' => '', 'rows' => '', 'new_lines' => 'wpautop', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_55127c3d86ab4', 'label' => 'Proceed Text', 'name' => 'proceed_text', 'prefix' => '', 'type' => 'text', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array('width' => '', 'class' => '', 'id' => ''), 'default_value' => 'Skip', 'placeholder' => '', 'prepend' => '', 'append' => '', 'maxlength' => '', 'readonly' => 0, 'disabled' => 0), array('key' => 'field_55c5e37442554', 'label' => 'Wdie Slide', 'name' => 'wide_slide', 'prefix' => '', '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')))), 'location' => array(array(array('param' => 'page', 'operator' => '==', 'value' => get_welcome_page_id()))), 'menu_order' => 0, 'position' => 'acf_after_title', 'style' => 'default', 'label_placement' => 'top', 'instruction_placement' => 'label', 'hide_on_screen' => array(0 => 'the_content', 1 => 'discussion', 2 => 'page_attributes'));
}
Esempio n. 2
0
<?php

namespace PIE\WelcomeScreen;

get_header('welcome');
while (have_posts()) {
    the_post();
    if (have_rows('welcome_slides', get_welcome_page_id())) {
        ?>

				<div class="welcome_slides">
					<?php 
        while (have_rows('welcome_slides', get_welcome_page_id())) {
            the_row();
            $slide_title = get_sub_field('slide_title');
            $slide_content = get_sub_field('slide_content');
            $proceed_text = get_sub_field('proceed_text');
            $bootstrap_class = get_sub_field('wide_slide') === 'Yes' ? 'col-lg-6 col-lg-offset-3' : 'col-lg-4 col-lg-offset-4';
            ?>

						<div class="slide">
						<div class="slide_content panel panel-default <?php 
            echo $bootstrap_class;
            ?>
">
						<div class="panel-body">
						<h2><?php 
            echo esc_html($slide_title);
            ?>
</h2>
						<?php