Exemplo n.º 1
0
    function form($instance)
    {
        $defaults = array('image' => '');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        ?>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('image');
        ?>
">
				Upload a Marker Image
				<?php 
        echo aq_field_upload('image', $block_id, $image, $media_type = 'image');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">
				Address for map, use plain text, e.g: <code>Lord Mayors Walk, York, England</code>
				<?php 
        echo aq_field_input('title', $block_id, $title, $size = 'full');
        ?>
			</label>
		</p>

	<?php 
    }
Exemplo n.º 2
0
    function form($instance)
    {
        $defaults = array('link' => '', 'image' => '', 'image_title' => '', 'lightbox' => '');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        ?>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('image');
        ?>
">
				Upload Image (Required)
				<?php 
        echo aq_field_upload('image', $block_id, $image, $media_type = 'image');
        ?>
			</label>
		</p>

		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('image_title');
        ?>
">
				Image Alt Title.
				<?php 
        echo aq_field_input('image_title', $block_id, $image_title, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('link');
        ?>
">
				Link Image? Enter URL here.
				<?php 
        echo aq_field_input('link', $block_id, $link, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('lightbox');
        ?>
">
				Upload Lightbox Image?<br /><code>Optional</code> - Note: Disables Link Option
				<?php 
        echo aq_field_upload('lightbox', $block_id, $lightbox, $media_type = 'image');
        ?>
			</label>
		</p>
		
	<?php 
    }
Exemplo n.º 3
0
    function form($instance)
    {
        $defaults = array('caption' => '', 'upload' => '', 'url' => '');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        ?>
        <div class="description half">
            <label for="<?php 
        echo $this->get_field_id('caption');
        ?>
">
                Caption (optional)<br/>
                <?php 
        echo aq_field_input('caption', $block_id, $caption);
        ?>
            </label>
        </div>
        <div class="description half last">
            <label for="<?php 
        echo $this->get_field_id('url');
        ?>
">
                URL (optional)<br/>
                <?php 
        echo aq_field_input('url', $block_id, $url);
        ?>
            </label>
        </div>
        <div class="description half ">
            <label for="<?php 
        echo $this->get_field_id('upload');
        ?>
">
                Upload an image<br/>
                <?php 
        echo aq_field_upload('upload', $block_id, $upload);
        ?>
            </label>
            <?php 
        if ($upload) {
            ?>
            <div class="screenshot">
                <img src="<?php 
            echo $upload;
            ?>
" />
            </div>
            <?php 
        }
        ?>
        </div>
        <?php 
    }
Exemplo n.º 4
0
    /**
     * Form fields, this is where we'll put every option we'll use for this block
     */
    function form_fields($instance)
    {
        $defaults = array('title' => 'The Page Section Title', 'type' => 'standard', 'image' => '', 'thin_column' => 0);
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        if ($title == '') {
            $title = 'The Page Section Title';
        }
        $type_options = array('light-wrapper' => 'Light Background', 'dark-wrapper' => 'Dark Background', 'bg-primary' => 'Primary Highlight Colour Background', 'bg-secondary-1' => 'Secondary Highlight Colour Background', 'bg-secondary-2 ' => 'Secondary Highlight 2 Colour Background', 'image' => 'Parallax Background Image (Full Width)', 'image-left' => 'Image Left, Content on Right', 'image-right' => 'Image Right, Content on Left');
        ?>
		<div class="two_thirds">
			<p class="description">Label this page section</p>
			<?php 
        echo aq_field_input('title', $this->block_id, $title, $size = 'full');
        ?>
			
			<hr />
			
			<p class="description">Menu Link for this section: <code>#<?php 
        echo ebor_sanitize_title($title);
        ?>
</code><br />(Used for one-page version only)</p>

			<hr />
			
			<p class="description">Use thin column content width for this section?</p>
			<?php 
        echo aq_field_checkbox('thin_column', $this->block_id, $thin_column);
        ?>

		</div>
		
		<div class="one_third last">	
			
			<p class="description">Background Type</p>
			<?php 
        echo aq_field_select('type', $this->block_id, $type_options, $type);
        ?>
			
			<hr />
			
			<p class="description">Image for Parallax Background</p>
			<?php 
        echo aq_field_upload('image', $this->block_id, $image, $media_type = 'image');
        ?>

		</div>
		<div class="clear"></div>
	<?php 
    }
Exemplo n.º 5
0
        function form($instance)
        {
            $defaults = array('bg_color' => '#fafafa', 'position' => 'top left', 'image' => '', 'repeat' => 'repeat', 'text_color' => 'normal', 'parallax' => '', 'padding_top' => '0', 'padding_bottom' => '0', 'show_row' => 'true', 'video_bg' => 'true', 'menu_id' => '', 'video_link' => '');
            $instance = wp_parse_args($instance, $defaults);
            extract($instance);
            $text_colors = array('white' => 'Color White', 'normal' => 'Color Default');
            $bg_repeat = array('repeat' => 'repeat', 'no-repeat' => 'no-repeat');
            $row = array('true' => 'Yes', 'false' => 'No');
            $menus_arr = array('' => '-- Select --');
            if (($locations = get_nav_menu_locations()) && isset($locations['main_nav'])) {
                $menu = wp_get_nav_menu_object($locations['main_nav']);
                $menu_items = wp_get_nav_menu_items($menu->term_id);
                if (!empty($menu_items)) {
                    foreach ($menu_items as $menu_item) {
                        $menus_arr[sanitize_title($menu_item->title)] = $menu_item->title;
                    }
                }
            }
            ?>
        <p class="description">
			<label for="<?php 
            echo $this->get_field_id('padding_top');
            ?>
">
				<?php 
            _e('Padding top', 'oneengine');
            ?>
				<?php 
            echo aq_field_input('padding_top', $block_id, $padding_top, $size = 'min', $type = 'number');
            ?>
px
            </label>
            &nbsp;&nbsp;-&nbsp;&nbsp;
			<label for="<?php 
            echo $this->get_field_id('padding_bottom');
            ?>
">
				<?php 
            _e('Padding Bottom', 'oneengine');
            ?>
				<?php 
            echo aq_field_input('padding_bottom', $block_id, $padding_bottom, $size = 'min', $type = 'number');
            ?>
px
            </label>
		</p>
        <p class="description">
			<label for="<?php 
            echo $this->get_field_id('text_color');
            ?>
">
				<?php 
            _e('Text color', 'oneengine');
            ?>
				<?php 
            echo aq_field_select('text_color', $block_id, $text_colors, $text_color);
            ?>
			</label>
		</p>
		<p class="description">
			<label for="<?php 
            echo $this->get_field_id('image');
            ?>
">
				<?php 
            _e('Background Image', 'oneengine');
            ?>
				<?php 
            echo aq_field_upload('image', $block_id, $image, $media_type = 'image');
            ?>
			</label>
		</p>
        
        <p class="description">
			<label for="<?php 
            echo $this->get_field_id('bg_color');
            ?>
">
				<?php 
            _e('Background Color (Ex : #fafafa;)', 'oneengine');
            ?>
                <?php 
            echo aq_field_color_picker('bg_color', $block_id, $bg_color);
            ?>
			</label>
		</p>
        <p class="description">
			<label for="<?php 
            echo $this->get_field_id('position');
            ?>
">
				<?php 
            _e('Background position', 'oneengine');
            ?>
				<?php 
            echo aq_field_input('position', $block_id, $position, $size = 'small');
            ?>
			</label>
		</p>
        <p class="description">
			<label for="<?php 
            echo $this->get_field_id('repeat');
            ?>
">
				<?php 
            _e('Background repeat ?', 'oneengine');
            ?>
				<?php 
            echo aq_field_select('repeat', $block_id, $bg_repeat, $repeat);
            ?>
			</label>
		</p>
        <p class="description">
			<label for="<?php 
            echo $this->get_field_id('parallax');
            ?>
">
				<?php 
            _e('Background parallax ?', 'oneengine');
            ?>
				<?php 
            echo aq_field_checkbox('parallax', $block_id, $parallax);
            ?>
			</label>
		</p>
        <p class="description">
			<label for="<?php 
            echo $this->get_field_id('show_row');
            ?>
">
				<?php 
            _e('Show/hide section "row" (if you add block item fullwidth here, please choose "No" for 2 block "Container (open)" and "Container (close)")', 'oneengine');
            ?>
				<?php 
            echo aq_field_select('show_row', $block_id, $row, $show_row);
            ?>
			</label>
		</p>
        <p class="description">
			<label for="<?php 
            echo $this->get_field_id('menu_id');
            ?>
">
				<?php 
            _e('Select the block’s ID to link with the Menu header.', 'oneengine');
            ?>
				<?php 
            echo aq_field_select('menu_id', $block_id, $menus_arr, $menu_id);
            ?>
			</label>
		</p>	
		<?php 
        }
Exemplo n.º 6
0
    function form($instance)
    {
        $defaults = array('title' => '', 'heading' => 'h3', 'text' => '', 'align' => 'center', 'bgcolor' => '#fff', 'textcolor' => '#676767', 'media' => '', 'imagesize' => 'full', 'imagetype' => 'none', 'enablebtn' => '1', 'btntext' => 'Learn More', 'btnlink' => '', 'btncolor' => 'black', 'btnsize' => 'default', 'btnlinkopen' => 'same', 'id' => '', 'class' => '', 'style' => '');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        $heading_style = array('h1' => 'H1', 'h2' => 'H2', 'h3' => 'H3', 'h4' => 'H4', 'h5' => 'H5', 'h6' => 'H6');
        $align_options = array('left' => 'Left', 'center' => 'Center', 'right' => 'Right');
        $imagetype_options = array('none' => 'None', 'rounded' => 'Rounded', 'circle' => 'Circle', 'polaroid' => 'Polaroid');
        $imagesize_options = array('thumbnail' => 'Thumbnail', 'medium' => 'Medium', 'large' => 'Large', 'full' => 'Full');
        $btncolor_options = array('grey' => 'Grey', 'blue' => 'Blue', 'lightblue' => 'Light Blue', 'green' => 'Green', 'red' => 'Red', 'yellow' => 'Yellow', 'black' => 'Black');
        $btnsize_options = array('default' => 'Default', 'mini' => 'Mini', 'small' => 'Small', 'large' => 'Large', 'block' => 'Block');
        $btnlinkopen_options = array('same' => 'Same Window', 'new' => 'New Window');
        ?>
		<div class="description two-third">
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">
				Title
				<?php 
        echo aq_field_input('title', $block_id, $title, $size = 'full');
        ?>
			</label>
		</div>

		<div class="description third last">
			<label for="<?php 
        echo $this->get_field_id('heading');
        ?>
">
				Heading Style<br/>
				<?php 
        echo aq_field_select('heading', $block_id, $heading_style, $heading);
        ?>
			</label>
		</div>

		<div class="cf" style="height: 20px"></div>
		
		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('media');
        ?>
">
				Upload an Image
				<?php 
        echo aq_field_upload('media', $block_id, $media, 'image');
        ?>
			</label>
		</div>

		<div class="description half">
			<label for="<?php 
        echo $this->get_field_id('imagesize');
        ?>
">
				Image Size<br/>
				<?php 
        echo aq_field_select('imagesize', $block_id, $imagesize_options, $imagesize);
        ?>
			</label>
		</div>

		<div class="description half last">
			<label for="<?php 
        echo $this->get_field_id('imagetype');
        ?>
">
				Image Type<br/>
				<?php 
        echo aq_field_select('imagetype', $block_id, $imagetype_options, $imagetype);
        ?>
			</label>
		</div>

		<div class="cf" style="height: 20px"></div>

		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('text');
        ?>
">
				Content
				<?php 
        echo aq_field_textarea('text', $block_id, $text, $size = 'full');
        ?>
			</label>
		</div>

		<div class="cf" style="height: 20px"></div>

		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('enablebtn');
        ?>
">
				Enable Button <?php 
        echo aq_field_checkbox('enablebtn', $block_id, $enablebtn);
        ?>
			</label>
		</div>

		<div class="description half">
			<label for="<?php 
        echo $this->get_field_id('btntext');
        ?>
">
				Button Text
				<?php 
        echo aq_field_input('btntext', $block_id, $btntext, $size = 'full');
        ?>
			</label>
		</div>

		<div class="description fourth">
			<label for="<?php 
        echo $this->get_field_id('btncolor');
        ?>
">
				Button Color<br/>
				<?php 
        echo aq_field_select('btncolor', $block_id, $btncolor_options, $btncolor);
        ?>
			</label>
		</div>

		<div class="description fourth last">
			<label for="<?php 
        echo $this->get_field_id('btnsize');
        ?>
">
				Button Size<br/>
				<?php 
        echo aq_field_select('btnsize', $block_id, $btnsize_options, $btnsize);
        ?>
			</label>
		</div>

		<div class="description two-third">
			<label for="<?php 
        echo $this->get_field_id('btnlink');
        ?>
">
				Button Link
				<?php 
        echo aq_field_input('btnlink', $block_id, $btnlink, $size = 'full');
        ?>
			</label>	
		</div>

		<div class="description third last">
			<label for="<?php 
        echo $this->get_field_id('btnlinkopen');
        ?>
">
				Link Open In<br/>
				<?php 
        echo aq_field_select('btnlinkopen', $block_id, $btnlinkopen_options, $btnlinkopen);
        ?>
			</label>	
		</div>

		<div class="cf" style="height: 20px"></div>

		<div class="description third">
			<label for="<?php 
        echo $this->get_field_id('align');
        ?>
">
				Align<br/>
				<?php 
        echo aq_field_select('align', $block_id, $align_options, $align);
        ?>
			</label>
		</div>

		<div class="description third">
			<label for="<?php 
        echo $this->get_field_id('bgcolor');
        ?>
">
				Pick a background color<br/>
				<?php 
        echo aq_field_color_picker('bgcolor', $block_id, $bgcolor);
        ?>
			</label>
		</div>

		<div class="description third last">
			<label for="<?php 
        echo $this->get_field_id('textcolor');
        ?>
">
				Pick a text color<br/>
				<?php 
        echo aq_field_color_picker('textcolor', $block_id, $textcolor);
        ?>
			</label>
		</div>

		<div class="cf" style="height: 20px"></div>

		<div class="description half">
			<label for="<?php 
        echo $this->get_field_id('id');
        ?>
">
				id (optional)<br/>
				<?php 
        echo aq_field_input('id', $block_id, $id, $size = 'full');
        ?>
			</label>
		</div>

		<div class="description half last">
			<label for="<?php 
        echo $this->get_field_id('class');
        ?>
">
				class (optional)<br/>
				<?php 
        echo aq_field_input('class', $block_id, $class, $size = 'full');
        ?>
			</label>
		</div>

		<div class="cf"></div>

		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('style');
        ?>
">
				Additional inline css styling (optional)<br/>
				<?php 
        echo aq_field_input('style', $block_id, $style);
        ?>
			</label>
		</div>
		
		<?php 
    }
Exemplo n.º 7
0
        function form($instance)
        {
            $defaults = array('title' => '', 'job' => '', 'image' => '', 'id' => 'about', 'items' => array(1 => array('title' => 'New Title', 'icon' => 'icon-twitter', 'link' => '')), 'subtitle' => '', 'content' => '', 'infomation' => '', 'shortbtns' => array(1 => array('title' => 'New Title', 'icon' => 'icon-print-1', 'linkitem' => '', 'color' => '#03CC85')));
            $instance = wp_parse_args($instance, $defaults);
            extract($instance);
            ?>
	
	<h3 style="text-align: center;">Content Box Left</h3>
    <br />
	
    <div class="description">
        <label for="<?php 
            echo $this->get_field_id('title');
            ?>
">
        Title <br />
        <?php 
            echo aq_field_input('title', $block_id, $title, $size = 'full');
            ?>
        </label>
    </div>
    
    <div class="description half">
        <label for="<?php 
            echo $this->get_field_id('id');
            ?>
">
        Id Section do you want <code>Ex: about</code> <br />
        <?php 
            echo aq_field_input('id', $block_id, $id, $size = 'full');
            ?>
        </label>
    </div>    
    
    <div class="description half last">
		<label for="<?php 
            echo $this->get_field_id('image');
            ?>
">
			Pick a your image<br/>
			<?php 
            echo aq_field_upload('image', $block_id, $image, $media_type = 'image');
            ?>
		</label>
	</div>
	<div class="description half">
        <label for="<?php 
            echo $this->get_field_id('job');
            ?>
">
        Your Job <br />
        <?php 
            echo aq_field_textarea('job', $block_id, $job, $size = 'full');
            ?>
		
        </label>
    </div>
    	
	<div class="description half last">
        <label for="<?php 
            echo $this->get_field_id('subtitle');
            ?>
">
        Subtile <br />
        <?php 
            echo aq_field_textarea('subtitle', $block_id, $subtitle, $size = 'full');
            ?>
		
        </label>
    </div>        
        
	<div class="description">
        <label for="<?php 
            echo $this->get_field_id('content');
            ?>
">
        Content <br />
        <?php 
            echo aq_field_textarea('content', $block_id, $content, $size = 'full');
            ?>
		
        </label>
    </div>

	<div class="description">
        <label for="<?php 
            echo $this->get_field_id('infomation');
            ?>
">
        Infomation <br />
        <?php 
            echo aq_field_textarea('infomation', $block_id, $infomation, $size = 'full');
            ?>
		
        </label>
    </div> 
	
	<div class="cf"></div>
	<h3 style="text-align: center;">Button Box Left</h3>
	<div class="description cf">
	    <ul id="aq-sortable-list-<?php 
            echo $block_id;
            ?>
" class="aq-sortable-list" rel="<?php 
            echo $block_id;
            ?>
">
		    <?php 
            $shortbtns = is_array($shortbtns) ? $shortbtns : $defaults['shortbtns'];
            $count = 1;
            foreach ($shortbtns as $shortbtn) {
                $this->shortbtn($shortbtn, $count);
                $count++;
            }
            ?>
	    </ul>
	    <p></p>
	    	<a href="#" rel="checkbtn" class="aq-sortable-add-new button">Add New Btn</a>
	    <p></p>
    </div>
    <div class="cf"></div>
	<br />
	<hr />
	<h3 style="text-align: center;">Social</h3>
    <br />
	
    <div class="description cf">
	    <ul id="aq-sortable-list-<?php 
            echo $block_id;
            ?>
" class="aq-sortable-list" rel="<?php 
            echo $block_id;
            ?>
">
		    <?php 
            $items = is_array($items) ? $items : $defaults['items'];
            $count = 1;
            foreach ($items as $item) {
                $this->item($item, $count);
                $count++;
            }
            ?>
	    </ul>
	    <p></p>
	    	<a href="#" rel="check" class="aq-sortable-add-new button">Add New</a>
	    <p></p>
    </div>
    <div class="cf"></div>
<?php 
        }
Exemplo n.º 8
0
    function form($instance)
    {
        $defaults = array('text' => '', 'color' => '#9D9ABF', 'image' => '');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        ?>
		
		<p class="description note">
			<?php 
        _e('Use this block to add columns of text with an icon above.', 'marble');
        ?>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">
				Title (optional)
				<?php 
        echo aq_field_input('title', $block_id, $title, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('text');
        ?>
">
				Content
				<?php 
        echo aq_field_textarea('text', $block_id, $text, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('image');
        ?>
">
				<?php 
        _e('Upload an Icon', 'marble');
        ?>
				<?php 
        echo aq_field_upload('image', $block_id, $image, $media_type = 'image');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('color');
        ?>
">
				Icon Background Colour
				<?php 
        echo aq_field_color_picker('color', $block_id, $color, $default = '#9D9ABF');
        ?>
			</label>
		</p>

		<?php 
    }
Exemplo n.º 9
0
        function form($instance)
        {
            $defaults = $this->defaults;
            global $lsvr_inview_animations;
            $inview_anim_arr = $lsvr_inview_animations;
            $instance = wp_parse_args($instance, $defaults);
            extract($instance);
            ?>
        <div class="lsvr-form-container">

            <div class="st-form-row">
                <label for="<?php 
            echo $this->get_field_id('image');
            ?>
"><?php 
            _e('Image', 'lsvr-toolkit');
            ?>
</label>
                <div class="st-form-field">
                    <?php 
            echo aq_field_upload('image', $block_id, $image);
            ?>
                </div>
            </div>

            <div class="lsvr-form-row">
                <label for="<?php 
            echo $this->get_field_id('title');
            ?>
"><?php 
            _e('Title', 'lsvr-toolkit');
            ?>
</label>
                <div class="lsvr-form-field">
                    <?php 
            echo aq_field_input('title', $block_id, $title);
            ?>
                </div>
            </div>

            <div class="lsvr-form-row">
                <label for="<?php 
            echo $this->get_field_id('link');
            ?>
"><?php 
            _e('Link', 'lsvr-toolkit');
            ?>
</label>
                <div class="lsvr-form-field">
                    <?php 
            echo aq_field_input('link', $block_id, $link);
            ?>
                </div>
            </div>

            <div class="lsvr-form-row">
                <label for="<?php 
            echo $this->get_field_id('html_content');
            ?>
"><?php 
            _e('Content', 'lsvr-toolkit');
            ?>
</label>
                <div class="lsvr-form-field">
                    <?php 
            echo lsvr_field_editor('html_content', $block_id, $html_content);
            ?>
                </div>
            </div>

            <div class="lsvr-form-row">
                <label for="<?php 
            echo $this->get_field_id('block_offset');
            ?>
"><?php 
            _e('Block Offset', 'lsvr-toolkit');
            ?>
</label>
                <p class="lsvr-form-description">
                    <?php 
            _e('Left offset of this block.', 'lsvr-toolkit');
            ?>
<br>
                </p>
                <div class="lsvr-form-field">
                    <?php 
            echo aq_field_select('block_offset', $block_id, array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), $block_offset);
            ?>
                </div>
            </div>

            <div class="lsvr-form-row">
                <label for="<?php 
            echo $this->get_field_id('inview_anim');
            ?>
"><?php 
            _e('InView Animation', 'lsvr-toolkit');
            ?>
</label>
                <p class="lsvr-form-description">
                    <?php 
            _e('Animation fired when element appears in the user\'s viewport.', 'lsvr-toolkit');
            ?>
<br>
                </p>
                <div class="lsvr-form-field">
                    <?php 
            echo aq_field_select('inview_anim', $block_id, $inview_anim_arr, $inview_anim);
            ?>
                </div>
            </div>

            <div class="lsvr-form-row">
                <label for="<?php 
            echo $this->get_field_id('custom_class');
            ?>
"><?php 
            _e('Custom Class', 'lsvr-toolkit');
            ?>
</label>
                <p class="lsvr-form-description">
                    <?php 
            _e('It can be used for applying custom CSS.', 'lsvr-toolkit');
            ?>
<br>
                </p>
                <div class="lsvr-form-field">
                    <?php 
            echo aq_field_input('custom_class', $block_id, $custom_class);
            ?>
                </div>
            </div>

        </div>

        <?php 
        }
Exemplo n.º 10
0
    function form_callback($instance = array())
    {
        $instance = is_array($instance) ? wp_parse_args($instance, $this->block_options) : $this->block_options;
        //insert the dynamic block_id & block_saving_id into the array
        $this->block_id = 'aq_block_' . $instance['number'];
        $instance['block_saving_id'] = 'aq_blocks[aq_block_' . $instance['number'] . ']';
        extract($instance);
        $type_options = array('light-wrapper' => 'Standard (Light-Wrapper)', 'dark-wrapper' => 'Standard (Dark-Wrapper)', 'image' => 'Parallax Background Image');
        $col_order = $order;
        //column block header
        if (isset($template_id)) {
            echo '<li id="template-block-' . $number . '" class="block block-container block-aq_column_block ' . $size . '">', '<div class="block-settings-column cf" id="block-settings-' . $number . '">';
            ?>
		
		<div class="ebor-column-header">
			<a href="#" class="column-close">Show / Hide <code><?php 
            echo $title;
            ?>
</code></a>
			<div class="floatright">Menu Link: <code>#<?php 
            echo ebor_sanitize_title($title);
            ?>
</code></div>
			<div class="clear"></div>
		</div>
		
		<div class="ebor-column-content">
		
		<div class="two_thirds">
			<p class="description">
				<label for="<?php 
            echo $this->get_field_id('title');
            ?>
">
					Label this page section
					<?php 
            echo aq_field_input('title', $this->block_id, $title, $size = 'full');
            ?>
				</label>
			</p>
			
			<hr />
		</div>
		
		<div class="one_third last">	
			
			<p class="description half">
				<label for="<?php 
            echo $this->get_field_id('type');
            ?>
">
					Background Type
					<?php 
            echo aq_field_select('type', $this->block_id, $type_options, $type);
            ?>
				</label>
			</p>
			
			<hr />
			
			<p class="description">
				<label for="<?php 
            echo $this->get_field_id('image');
            ?>
">
					Image for Parallax Background
					<?php 
            echo aq_field_upload('image', $this->block_id, $image, $media_type = 'image');
            ?>
				</label>
			</p>
		</div>
		<div class="clear"></div>
				
		<p class="empty-column">
			<strong>Drag and Drop additional blocks below this text to add to this section.</strong>
		</p>
					
	<?php 
            echo '<ul class="blocks column-blocks cf">';
            //check if column has blocks inside it
            $blocks = aq_get_blocks($template_id);
            //outputs the blocks
            if ($blocks) {
                foreach ($blocks as $key => $child) {
                    global $aq_registered_blocks;
                    extract($child);
                    //get the block object
                    $block = $aq_registered_blocks[$id_base];
                    if ($parent == $col_order) {
                        $block->form_callback($child);
                    }
                }
            }
            echo '</ul>';
        } else {
            $this->before_form($instance);
            $this->form($instance);
        }
        //form footer
        $this->after_form($instance);
    }
Exemplo n.º 11
0
    function form($instance)
    {
        $defaults = array('title' => '', 'position' => '', 'media' => '', 'text' => '', 'fb' => '', 'twitter' => '', 'email' => '', 'bgcolor' => '#F8F8F8', 'textcolor' => '#676767', 'id' => '', 'class' => '', 'style' => '');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        ?>
		<div class="description half">
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">
				Name
				<?php 
        echo aq_field_input('title', $block_id, $title, $size = 'full');
        ?>
			</label>
		</div>

		<div class="description half last">
			<label for="<?php 
        echo $this->get_field_id('position');
        ?>
">
				Title
				<?php 
        echo aq_field_input('position', $block_id, $position, $size = 'full');
        ?>
			</label>
		</div>

		<div class="cf" style="height: 10px"></div>
		
		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('media');
        ?>
">
				Upload Photo
				<?php 
        echo aq_field_upload('media', $block_id, $media, 'image');
        ?>
				<em style="font-size: 0.8em; padding-left: 5px;">Recommended size: 360 x 270 pixel</em>
			</label>
		</div>

		<div class="cf" style="height: 10px"></div>

		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('text');
        ?>
">
				Description
				<?php 
        echo aq_field_textarea('text', $block_id, $text, $size = 'full');
        ?>
			</label>
		</div>

		<div class="cf" style="height: 10px"></div>

		<div class="description third">
			<label for="<?php 
        echo $this->get_field_id('fb');
        ?>
">
				Facebook Profile
				<?php 
        echo aq_field_input('fb', $block_id, $fb, $size = 'full');
        ?>
			</label>
		</div>

		<div class="description third">
			<label for="<?php 
        echo $this->get_field_id('twitter');
        ?>
">
				Twitter Profile
				<?php 
        echo aq_field_input('twitter', $block_id, $twitter, $size = 'full');
        ?>
			</label>
		</div>

		<div class="description third last">
			<label for="<?php 
        echo $this->get_field_id('email');
        ?>
">
				Email
				<?php 
        echo aq_field_input('email', $block_id, $email, $size = 'full');
        ?>
			</label>
		</div>

		<div class="cf" style="height: 10px"></div>

		<div class="description half">
			<label for="<?php 
        echo $this->get_field_id('bgcolor');
        ?>
">
				Pick a background color<br/>
				<?php 
        echo aq_field_color_picker('bgcolor', $block_id, $bgcolor);
        ?>
			</label>
		</div>

		<div class="description half last">
			<label for="<?php 
        echo $this->get_field_id('textcolor');
        ?>
">
				Pick a text color<br/>
				<?php 
        echo aq_field_color_picker('textcolor', $block_id, $textcolor);
        ?>
			</label>
		</div>

		<div class="cf" style="height: 10px"></div>

		<div class="description half">
			<label for="<?php 
        echo $this->get_field_id('id');
        ?>
">
				id (optional)<br/>
				<?php 
        echo aq_field_input('id', $block_id, $id, $size = 'full');
        ?>
			</label>
		</div>

		<div class="description half last">
			<label for="<?php 
        echo $this->get_field_id('class');
        ?>
">
				class (optional)<br/>
				<?php 
        echo aq_field_input('class', $block_id, $class, $size = 'full');
        ?>
			</label>
		</div>

		<div class="cf"></div>

		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('style');
        ?>
">
				Additional inline css styling (optional)<br/>
				<?php 
        echo aq_field_input('style', $block_id, $style);
        ?>
			</label>
		</div>
		
		<?php 
    }
Exemplo n.º 12
0
    function form($instance)
    {
        $defaults = array('text' => '', 'link' => '', 'media' => '', 'imagesize' => 'full', 'type' => 'none', 'align' => 'none', 'id' => '', 'class' => '', 'style' => '');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        $align_options = array('none' => 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right');
        $imagetype_options = array('none' => 'None', 'rounded' => 'Rounded', 'circle' => 'Circle', 'polaroid' => 'Polaroid');
        $imagesize_options = array('thumbnail' => 'Thumbnail', 'medium' => 'Medium', 'large' => 'Large', 'full' => 'Full');
        ?>
		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">
				Image Title (optional)<br />
				<?php 
        echo aq_field_input('title', $block_id, $title, $size = 'full');
        ?>
			</label>
		</div>
		
		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('media');
        ?>
">
				Upload Your Image<br />
				<?php 
        echo aq_field_upload('media', $block_id, $media, 'image');
        ?>
			</label>
		</div>

		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('link');
        ?>
">
				Link to Page / Post<br />
				<?php 
        echo aq_field_input('link', $block_id, $link, $size = 'full');
        ?>
<br />
				<em style="font-size: 0.8em; padding-left: 5px;">Leave it blank if you want to link to image</em>
			</label>
		</div>

		<div class="description third">
			<label for="<?php 
        echo $this->get_field_id('imagesize');
        ?>
">
				Image Size<br/>
				<?php 
        echo aq_field_select('imagesize', $block_id, $imagesize_options, $imagesize);
        ?>
			</label>
		</div>

		<div class="description third">
			<label for="<?php 
        echo $this->get_field_id('type');
        ?>
">
				Image Type<br/>
				<?php 
        echo aq_field_select('type', $block_id, $imagetype_options, $type);
        ?>
			</label>
		</div>

		<div class="description third last">
			<label for="<?php 
        echo $this->get_field_id('align');
        ?>
">
				Align<br/>
				<?php 
        echo aq_field_select('align', $block_id, $align_options, $align);
        ?>
			</label>
		</div>

		<div class="cf"></div>

		<div class="description half">
			<label for="<?php 
        echo $this->get_field_id('id');
        ?>
">
				id (optional)<br/>
				<?php 
        echo aq_field_input('id', $block_id, $id, $size = 'full');
        ?>
			</label>
		</div>

		<div class="description half last">
			<label for="<?php 
        echo $this->get_field_id('class');
        ?>
">
				class (optional)<br/>
				<?php 
        echo aq_field_input('class', $block_id, $class, $size = 'full');
        ?>
			</label>
		</div>

		<div class="cf"></div>

		<div class="description">
			<label for="<?php 
        echo $this->get_field_id('style');
        ?>
">
				Additional inline css styling (optional)<br/>
				<?php 
        echo aq_field_input('style', $block_id, $style);
        ?>
			</label>
		</div>
		
		<?php 
    }
Exemplo n.º 13
0
    function form($instance)
    {
        $defaults = array('subtitle' => '', 'image' => '', 'link' => '', 'buttontext' => '');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        ?>
		
		<p class="description note">
			<?php 
        _e('Use this block to add columns of text with an icon above.', 'marble');
        ?>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('image');
        ?>
">
				<?php 
        _e('Upload a Background Image (Required)', 'marble');
        ?>
				<?php 
        echo aq_field_upload('image', $block_id, $image, $media_type = 'image');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">
				Title (optional)
				<?php 
        echo aq_field_input('title', $block_id, $title, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('subtitle');
        ?>
">
				Subtitle (optional)
				<?php 
        echo aq_field_input('subtitle', $block_id, $subtitle, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('buttontext');
        ?>
">
				Button Text
				<?php 
        echo aq_field_input('buttontext', $block_id, $buttontext, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('link');
        ?>
">
				Button Link
				<?php 
        echo aq_field_input('link', $block_id, $link, $size = 'full');
        ?>
			</label>
		</p>

		<?php 
    }
Exemplo n.º 14
0
    function form($instance)
    {
        $defaults = array('text' => '', 'icon' => 'none', 'link' => '', 'image' => '');
        $icon_options = ebor_picons();
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        $selected = $icon;
        ?>
		
		<p class="tab-desc description">
			<label for="<?php 
        echo 'aq_blocks[' . $block_id . '][icon]';
        ?>
">
				Icon (Required)
				<div class="cf">
					<div class="icon-selector-render"></div>
					<select class="icon-selector" id="<?php 
        echo $block_id . '_icon';
        ?>
" name="<?php 
        echo 'aq_blocks[' . $block_id . '][icon]';
        ?>
">
						<?php 
        foreach ($icon_options as $key => $value) {
            echo '<option value="' . $key . '" ' . selected($selected, $key, false) . ' data-icon="' . $key . '">' . htmlspecialchars($value) . '</option>';
        }
        ?>
					</select>
				</div>
			</label>
		<p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('image');
        ?>
">
				Upload Image <code>Optional: Overrides Icon Selector, use for a custom icon</code>
				<?php 
        echo aq_field_upload('image', $block_id, $image, $media_type = 'image');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">
				Title (optional)
				<?php 
        echo aq_field_input('title', $block_id, $title, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('text');
        ?>
">
				Content
				<?php 
        echo aq_field_textarea('text', $block_id, $text, $size = 'full', true);
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('link');
        ?>
">
				Link entire Block? Enter URL here. <code>optional</code>
				<?php 
        echo aq_field_input('link', $block_id, $link, $size = 'full');
        ?>
			</label>
		</p>

	<?php 
    }
Exemplo n.º 15
0
    function form($instance)
    {
        $defaults = array('image' => '', 'url' => '', 'target' => 0);
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        ?>
		
		<p class="description note">
			<?php 
        _e('Use this to add an image to your page, adjust by resizing this box. This will resize your image to the box size, but not crop your image, please upload a suitably sized image, large images will slow down your page load.', 'marble');
        ?>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('image');
        ?>
">
				<?php 
        _e('Upload an Image? (Required)', 'marble');
        ?>
				<?php 
        echo aq_field_upload('image', $block_id, $image, $media_type = 'image');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
">
				Alt Text<br/>
				<?php 
        echo aq_field_input('title', $block_id, $title);
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('url');
        ?>
">
				<?php 
        _e('Link this Image? (Optional) Enter a URL', 'marble');
        ?>
				<?php 
        echo aq_field_input('url', $block_id, $url, $size = 'full');
        ?>
			</label>
		</p>
		
		<p class="description">
			<label for="<?php 
        echo $this->get_field_id('target');
        ?>
">
				<?php 
        _e('Open this link in a new window?', 'marble');
        ?>
<br/>
				<?php 
        echo aq_field_checkbox('target', $block_id, $target);
        ?>
			</label>
		</p>

		<?php 
    }
Exemplo n.º 16
0
    function form($instance)
    {
        $defaults = array('layout' => 'slider', 'image' => '', 'mpfour' => '', 'ogv' => '', 'webm' => '', 'small' => '', 'big' => '', 'sub' => '', 'shortcode' => '', 'youtube' => '', 'blog_posts' => 0);
        $directory = trailingslashit(get_template_directory_uri());
        $header_options = array('slider' => '<div class="header-image" data-type="slider"><img src="' . $directory . 'style/img/headers/slider.png" alt="" /><span>Slider Background</span></div>', 'video' => '<div class="header-image" data-type="video"><img src="' . $directory . 'style/img/headers/video.png" alt="" /><span>Video Background</span></div>', 'simple' => '<div class="header-image" data-type="simple"><img src="' . $directory . 'style/img/headers/simple.png" alt="" /><span>Simple Image Background</span></div>', 'simple-centered' => '<div class="header-image" data-type="simple-centered"><img src="' . $directory . 'style/img/headers/simple-centered.png" alt="" /><span>Simple Image Background, Centered Text</span></div>', 'product' => '<div class="header-image" data-type="product"><img src="' . $directory . 'style/img/headers/product.png" alt="" /><span>Image Background, Featured Product Image</span></div>', 'resume' => '<div class="header-image" data-type="resume"><img src="' . $directory . 'style/img/headers/social.png" alt="" /><span>Image Background, Social Icons</span></div>', 'personal' => '<div class="header-image" data-type="personal"><img src="' . $directory . 'style/img/headers/personal.png" alt="" /><span>Overlay Image Background</span></div>', 'logo' => '<div class="header-image" data-type="logo"><img src="' . $directory . 'style/img/headers/logo.png" alt="" /><span>Image Background, Logo & Chunky Text</span></div>', 'fullscreen-single' => '<div class="header-image" data-type="fullscreen-single"><img src="' . $directory . 'style/img/headers/fullscreen-single.png" alt="" /><span>Fullscreen Image Background</span></div>', 'map' => '<div class="header-image" data-type="map"><img src="' . $directory . 'style/img/headers/map.png" alt="" /><span>Large Map Background</span></div>', 'form' => '<div class="header-image" data-type="form"><img src="' . $directory . 'style/img/headers/form.png" alt="" /><span>Image Background & Contact Form</span></div>', 'call-to-action' => '<div class="header-image" data-type="call-to-action"><img src="' . $directory . 'style/img/headers/call-to-action.png" alt="" /><span>Overlay Image Background, Chunky Text</span></div>');
        $instance = wp_parse_args($instance, $defaults);
        extract($instance);
        ?>
		
		<div class="cf">
			<p class="description">1. Choose Header Layout</p>
			<ul class="ebor-header-options">
				<?php 
        foreach ($header_options as $key => $header) {
            echo '<li>' . $header . '</li>';
        }
        ?>
			</ul>
			<div style="display: none;"><?php 
        echo aq_field_input('layout', $block_id, $layout, $size = 'full');
        ?>
</div>
		</div>	
		
		<hr />
		
		<p class="description">2. Configure Background Settings</p>	
		
		<p class="description">Manage Background Images <code>Required for all Header Types</code></p>
		<?php 
        echo aq_field_upload('image', $block_id, $image, $media_type = 'gallery');
        ?>
		
		<hr />
		
		<div class="ebor-checkbox cf">
			<?php 
        echo aq_field_checkbox('blog_posts', $block_id, $blog_posts);
        ?>
			<p class="description">Fullscreen Header? Add 3 latest posts to bottom of header? <code>Fullscreen type only</code></p>
		</div>
		
		<hr />
		
		<p class="description">Manage Background Videos <code>Only for Background Video Type, all 3 Filetypes Required if using self hosted video.</code></p>
		
		<div class="one_third">
			<p class="description">.mp4 Background Video</p>
			<?php 
        echo aq_field_upload('mpfour', $block_id, $mpfour, $media_type = 'video');
        ?>
		</div>
		
		<div class="one_third">
			<p class="description">.ogv Background Video</p>
			<?php 
        echo aq_field_upload('ogv', $block_id, $ogv, $media_type = 'video');
        ?>
		</div>
		
		<div class="one_third last">
			<p class="description">.webm Background Video</p>
			<?php 
        echo aq_field_upload('webm', $block_id, $webm, $media_type = 'video');
        ?>
		</div><div class="cf"></div>
		
		<p class="description">Youtube Video Instead? Enter URL Here.</p>
		<?php 
        echo aq_field_input('youtube', $block_id, $youtube, $size = 'full');
        ?>
		
		<hr />
		
		<p class="description">3. Configure Text Settings</p>	
		
		<p class="description">Small Text <code>Optional</code></p>
		<?php 
        echo aq_field_input('small', $block_id, $small, $size = 'full');
        ?>
		
		<p class="description">Title Text <code>Optional</code></p>
		<?php 
        echo aq_field_input('big', $block_id, $big, $size = 'full');
        ?>
		
		<p class="description">Subtitle Text <code>Optional</code></p>
		<?php 
        echo aq_field_input('sub', $block_id, $sub, $size = 'full');
        ?>
		
		<p class="description">Shortcodes <code>Optional</code> <code>Buttons, Contact Form etc.</code></p>
		<?php 
        echo aq_field_textarea('shortcode', $block_id, $shortcode, $size = 'full');
        ?>
		
	<?php 
    }