Esempio n. 1
0
            if (!empty($text_color)) {
                $text_color = 'color:' . $text_color . ';';
            }
            return '<div class="button-wrap ' . $type . ' ' . $width . ' ' . $css_class . ' ' . $buttonalign . '"><div style="' . $style . '" class="button ' . $width . '"><a href="' . $url . '" ' . $target . ' style="' . $text_color . '">' . $icon . ' ' . $content . '</a></div></div>';
        } else {
            return '<div class="button-wrap ' . $width . ' ' . $css_class . ' ' . $buttonalign . '"><div class="' . $color . ' button ' . $width . '"><a href="' . $url . '" ' . $target . '>' . $icon . ' ' . $content . '</a></div></div>';
        }
    }
}
/* ------------------------------------
	:: DROP PANEL BUTTON
	------------------------------------*/
function droppanelbutton_shortcode($atts, $content = null, $code)
{
    extract(shortcode_atts(array('url' => '', 'type' => '', 'title' => '', 'target' => '', 'color' => '', 'back_color' => '', 'border_color' => '', 'text_color' => '', 'width' => '', 'align' => '', 'el_class' => ''), $atts));
    if (!empty($target)) {
        $target = 'target="' . $target . '"';
    }
    if (!empty($title)) {
        $content = $title;
    }
    return '<div class="button-wrap ' . $width . ' ' . $el_class . ' ' . $align . '"><div class="' . $color . ' button ' . $width . ' droppaneltrigger"><a href="#">' . $content . '</a></div></div>';
}
// Add Default Link Color
$button_colors = get_options_array('colors');
$button_colors = array('Link Color' => 'link_color') + $button_colors;
/* ------------------------------------
	:: BUTTONS MAP
	------------------------------------*/
wpb_map(array("name" => __("Button", "js_composer"), "base" => "button", "class" => "", 'deprecated' => '4.6', "icon" => "icon-button", "controls" => "edit_popup_delete", "category" => __('Content', 'js_composer'), "show_settings_on_create" => true, "params" => array(array("type" => "textfield", "holder" => "div", "heading" => __("Button Text", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Enter button text.", "js_composer")), array("type" => "dropdown", "heading" => __("Button Type", "js_composer"), "param_name" => "type", "value" => array(__('Button', "js_composer") => "linkbutton", __('Drop Panel Trigger', "js_composer") => "droppanelbutton", __('Custom', "js_composer") => "custom"), "description" => __("Select button type.", "js_composer")), array("type" => "colorpicker", "heading" => __("Text Color", "js_composer"), "param_name" => "text_color", "value" => "", "dependency" => array('element' => 'type', 'value' => array('custom')), "description" => __("Button Color", "js_composer")), array("type" => "colorpicker", "heading" => __("Background Color", "js_composer"), "param_name" => "back_color", "value" => "", "dependency" => array('element' => 'type', 'value' => array('custom')), "description" => __("Button Color", "js_composer")), array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => $button_colors, "dependency" => array('element' => 'type', 'value' => array('droppanelbutton', 'linkbutton')), "description" => __("Select button type.", "js_composer")), array("type" => "textfield", "holder" => "div", "heading" => __("Button Icon", "js_composer"), "param_name" => "icon", "value" => "", "description" => __("See Font Awesome <a href=\"http://fortawesome.github.io/Font-Awesome/icons/\" target=\"_blank\">Icons</a> : Enture Icon Name e.g.<strong> fa-compass</strong>", "js_composer")), get_common_options('align', 'Button'), array("type" => "textfield", "heading" => __("Link URL", "js_composer"), "param_name" => "url", "dependency" => array('element' => 'type', 'value' => array('custom', 'linkbutton')), "value" => ""), array("type" => "dropdown", "heading" => __("Link Target", "js_composer"), "param_name" => "target", "value" => array(__("Same window", "js_composer") => "_self", __("New window", "js_composer") => "_blank"), "dependency" => array('element' => 'type', 'value' => array('custom', 'linkbutton'))), $add_css_animation, array("type" => "dropdown", "heading" => __("Width", "js_composer"), "param_name" => "width", "value" => array(__("Normal", "js_composer") => "", __("Quarter", "js_composer") => "quarter", __("Half", "js_composer") => "half", __("Three Quarter", "js_composer") => "threequarter", __("Full", "js_composer") => "full")), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("Add Custom CSS classes to this field, below are some default classes you can use.<br /><br />\n\t\t\t\t<strong>medium-text</strong><br />\n\t\t\t\t<strong>big-text</strong><br />\n\t\t\t\t<strong>large-text</strong><br />\n\t\t\t\t<strong>xlarge-text</strong><br />\n\t\t\t\t<strong>supersize-text</strong>\n\t\t\t\t", "js_composer")))));
add_shortcode('droppanelbutton', 'droppanelbutton_shortcode');
Esempio n. 2
0
						<?php 
            comments_popup_link(__('No Comments', 'themeva') . ' ', '1 ' . __('Comment', 'themeva') . ' ', '% ' . __('Comments', 'themeva'));
            ?>
						<div class="hozbreak clearfix">&nbsp;</div>
					</div>
				<?php 
        }
        ?>
                
				<div class="clear"></div>
			</li>
		<?php 
    }
    wp_reset_query();
    ?>
		
		</ul>
		
		
	<?php 
    $output_string = '';
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
/* ------------------------------------
	:: RECENT POSTS MAP
	------------------------------------*/
add_shortcode('recent_posts', 'nv_recent_posts_shortcode');
wpb_map(array("name" => __("Recent Posts", "js_composer"), "base" => "recent_posts", "controls" => "edit_popup_delete", "class" => "", "icon" => "icon-list", "category" => __('Content', 'js_composer'), "params" => array(get_common_options('content', 'recent_posts'), array("type" => "checkbox", "holder" => "div", "heading" => __("Post Categories", "js_composer"), "param_name" => "categories", "value" => get_data_source('data-2', 'shortcode')), array("type" => "checkbox", "class" => "", "heading" => __("Display Date", "js_composer"), "param_name" => "show_date", "value" => array(__('Enable', "js_composer") => "yes")), array("type" => "checkbox", "class" => "", "heading" => __("Display Metadata", "js_composer"), "param_name" => "metadata", "value" => array(__('Enable', "js_composer") => "yes")), get_common_options('order', 'recentposts'), get_common_options('orderby', 'recentposts'), get_common_options('excerpt', 'recentposts'), array("type" => "textfield", "heading" => __("Offset", "js_composer"), "param_name" => "offset", "value" => "", "description" => __("Enter the  number of posts to offset by.", "js_composer")), array("type" => "textfield", "heading" => __("Limit", "js_composer"), "param_name" => "limit", "value" => "", "description" => __("Limit the number of posts.", "js_composer")), array("type" => "textfield", "heading" => __("Image Width", "js_composer"), "param_name" => "image_width", "value" => "", "description" => __("px", "js_composer")), array("type" => "textfield", "heading" => __("Image Height", "js_composer"), "param_name" => "image_height", "value" => "", "description" => __("px", "js_composer")), array("type" => "dropdown", "heading" => __("Image Effect", "js_composer"), "param_name" => "image_effect", "value" => get_options_array('imageeffect')), array("type" => "dropdown", "class" => "", "heading" => __('Image Align', "js_composer"), "param_name" => "image_align", "value" => array('Normal' => '', 'Left' => 'alignleft', 'Center' => 'aligncenter', 'Right' => 'alignright')))));
Esempio n. 3
0
 function get_common_options($type, $object = '', $option = null)
 {
     $extras = '';
     if ($type == 'datasource') {
         $option = array("type" => "dropdown", "class" => "", "heading" => __("Data Source", "js_composer"), "param_name" => "data_source", "value" => get_options_array('datasource'));
     } elseif ($type == 'data-1') {
         $option = array("type" => "textfield", "class" => "", "heading" => __("Attached Media ID", "js_composer"), "param_name" => "attached_id", "value" => __("", "js_composer"), "dependency" => array('element' => 'data_source', 'value' => array('data-1')), "description" => __("Comma separate multiple ID's. <strong>NO SPACES</strong>", "js_composer"));
     } elseif ($type == 'data-2') {
         $option = array("type" => "checkbox", "class" => "", "heading" => __("Categories", "js_composer"), "param_name" => "categories", "dependency" => array('element' => 'data_source', 'value' => array('data-2')), "value" => get_data_source('data-2', 'shortcode'));
     } elseif ($type == 'data-2-formats') {
         $option = array("type" => "dropdown", "class" => "", "heading" => __("Filter by Post", "js_composer"), "param_name" => "post_format", "dependency" => array('element' => 'data_source', 'value' => array('data-2')), "value" => get_data_source('data-2-formats', 'shortcode'));
     } elseif ($type == 'data-8') {
         $option = array("type" => "textfield", "class" => "", "heading" => __("Page / Post ID", "js_composer"), "param_name" => "pagepost_id", "value" => __("", "js_composer"), "dependency" => array('element' => 'data_source', 'value' => array('data-8')), "description" => __("Comma separate multiple ID's. <strong>NO SPACES</strong>", "js_composer"));
     } elseif ($type == 'orderby') {
         if ($object == 'recentposts') {
             $option = array("type" => "dropdown", "class" => "", "heading" => __("Order Post By", "js_composer"), "param_name" => "orderby", "value" => array('Ascending' => 'ASC', 'Descending' => 'DESC'));
         } else {
             $option = array("type" => "dropdown", "class" => "", "heading" => __("Order Post By", "js_composer"), "param_name" => "orderby", "dependency" => array('element' => 'data_source', 'value' => array('data-2', 'data-1', 'data-8', 'data-6', 'data-5')), "value" => array('Ascending' => 'ASC', 'Descending' => 'DESC'));
         }
     } elseif ($type == 'sortby' || $type == 'order') {
         if ($object == 'recentposts') {
             $option = array("type" => "dropdown", "class" => "", "heading" => __("Sort Post By", "js_composer"), "param_name" => $type, "value" => array('Post Order' => '', 'Date' => 'date', 'Random' => 'rand', 'Title' => 'title'));
         } else {
             $option = array("type" => "dropdown", "class" => "", "heading" => __("Sort Post By", "js_composer"), "param_name" => $type, "dependency" => array('element' => 'data_source', 'value' => array('data-2', 'data-1', 'data-8', 'data-6', 'data-5')), "value" => array('Post Order' => '', 'Date' => 'date', 'Random' => 'rand', 'Title' => 'title'));
         }
     } elseif ($type == 'excerpt') {
         if ($object == 'recentposts') {
             $option = array("type" => "textfield", "class" => "", "heading" => __("Excerpt", "js_composer"), "param_name" => "excerpt", "value" => __("", "js_composer"), "description" => __("Default is 55 words.", "js_composer"));
         } else {
             $option = array("type" => "textfield", "class" => "", "heading" => __("Excerpt", "js_composer"), "param_name" => "excerpt", "value" => __("", "js_composer"), "dependency" => array('element' => 'data_source', 'value' => array('data-2', 'data-6', 'data-5', 'data-8')), "description" => __("Default is 55 words.", "js_composer"));
         }
     } elseif ($type == 'data-3' && of_get_option('flickr_userid') != '') {
         $option = array("type" => "dropdown", "class" => "", "heading" => __("Flickr Set", "js_composer"), "param_name" => "flickr_set", "dependency" => array('element' => 'data_source', 'value' => array('data-3')), "value" => get_data_source('data-3', 'shortcode'));
     } elseif ($type == 'data-4') {
         $option = array("type" => "checkbox", "class" => "", "heading" => __("Slide Sets", "js_composer"), "param_name" => "slidesetid", "dependency" => array('element' => 'data_source', 'value' => array('data-4')), "value" => get_data_source('data-4', 'shortcode'));
     } elseif ($type == 'data-5') {
         $option = array("type" => "textfield", "class" => "", "heading" => __("Product Categories", "js_composer"), "param_name" => "product_categories", "dependency" => array('element' => 'data_source', 'value' => array('data-5')), "description" => __("Comma separate category names. <strong>NO SPACES</strong>", "js_composer"));
     } elseif ($type == 'data-5-tags') {
         $option = array("type" => "textfield", "class" => "", "heading" => __("Product Tags", "js_composer"), "param_name" => "product_tags", "dependency" => array('element' => 'data_source', 'value' => array('data-5')), "description" => __("Comma separate tag names. <strong>NO SPACES</strong>", "js_composer"));
     } elseif ($type == 'data-6') {
         $option = array("type" => "checkbox", "class" => "", "heading" => __("Portfolio Categories", "js_composer"), "param_name" => "portfolio_categories", "dependency" => array('element' => 'data_source', 'value' => array('data-6')), "value" => get_data_source('data-6', 'shortcode'));
     } elseif ($type == 'width') {
         $option = array("type" => "textfield", "class" => "", "heading" => __("Gallery Width", "js_composer"), "param_name" => "width", "value" => __("", "js_composer"));
     } elseif ($type == 'height') {
         if ($object == 'grid') {
             $text = "Row Height";
         } else {
             $text = "Gallery Height";
         }
         $option = array("type" => "textfield", "class" => "", "heading" => $text, "param_name" => "height", "value" => __("", "js_composer"));
     } elseif ($type == 'columns') {
         $option = array("type" => "dropdown", "class" => "", "heading" => __("Columns", "js_composer"), "param_name" => "columns", "value" => array('3 Columns' => '', '1 Columns' => '1', '2 Columns' => '2', '4 Columns' => '4', '5 Columns' => '5', '6 Columns' => '6', '7 Columns' => '7', '8 Columns' => '8', '9 Columns' => '9', '10 Columns' => '10', '11 Columns' => '11', '12 Columns' => '12'));
     } elseif ($type == 'columnpadding') {
         $option = array("type" => "checkbox", "class" => "", "heading" => __("Column Padding", "js_composer"), "param_name" => "columnpadding", "value" => array('Enable' => 'column_padding'));
     } elseif ($type == 'content') {
         $option = array("type" => "dropdown", "class" => "", "heading" => __("Content", "js_composer"), "param_name" => "content_type", "value" => array('Text + Image' => 'textimage', 'Title + Image ' => 'titleimage', 'Text on Hover + Image' => 'titletextoverlay', 'Title on Hover + Image' => 'titleoverlay', 'Image' => 'image'));
         if ($object == 'recent_posts') {
             $option['value']['Title'] = 'title';
         }
     } elseif ($type == 'align') {
         if ($object != '') {
             $text = $object;
         }
         $option = array("type" => "dropdown", "class" => "", "heading" => sprintf(__('%s Align', "js_composer"), $text), "param_name" => "align", "value" => array(__('Normal', "js_composer") => '', __('Left', "js_composer") => 'alignleft', __('Center', "js_composer") => 'aligncenter', __('Right', "js_composer") => 'alignright'));
     } elseif ($type == 'imgwidth') {
         $option = array("type" => "textfield", "class" => "", "heading" => __("Image Width", "js_composer"), "param_name" => "imgwidth", "value" => __("", "js_composer"));
     } elseif ($type == 'imgheight') {
         $option = array("type" => "textfield", "class" => "", "heading" => __("Image Height", "js_composer"), "param_name" => "imgheight", "value" => __("", "js_composer"));
     } elseif ($type == 'imageeffect') {
         $option = array("type" => "dropdown", "class" => "", "heading" => __("Image Effect", "js_composer"), "param_name" => "imageeffect", "value" => get_options_array('imageeffect'));
     } elseif ($type == 'timeout') {
         $option = array("type" => "textfield", "class" => "", "heading" => __("Timeout", "js_composer"), "param_name" => "timeout", "value" => __("", "js_composer"), "description" => __("Time between animating slides, in seconds.", "js_composer"));
     }
     if (empty($option)) {
         $option = array("type" => NULL, "param_name" => NULL, "value" => NULL);
     }
     return $option;
 }
Esempio n. 4
0
                } else {
                    $custom_markup = str_ireplace("%content%", '', $this->settings["custom_markup"]);
                }
            }
            $inner .= do_shortcode($custom_markup);
        }
        $elem = str_ireplace('%wpb_element_content%', $inner, $elem);
        $output = $elem;
        return $output;
    }
}
/* ------------------------------------
	:: PRICING TABLE MAP
	------------------------------------*/
wpb_map(array("name" => __("Pricing Table", "js_composer"), "base" => "pricing_table", "show_settings_on_create" => false, "is_container" => true, "icon" => "icon-pricing", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "heading" => __("Columns", "js_composer"), "param_name" => "columns"), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer"))), "custom_markup" => '
	  <h4 class="wpb_element_title">' . __("Pricing Table", "js_composer") . '</h4>
	  <div class="wpb_pricing_table_holder wpb_holder clearfix vc_container_for_children">
	  %content%
	  </div>
	  <div class="tab_controls">
	  <button class="add_plan" title="' . __("Add Plan", "js_composer") . '">' . __("Add Plan", "js_composer") . '</button>
	  </div>
	  ', 'default_content' => '
	  [plan title="Plan"]<ul><li>List Item</li><li>List Item</li></ul>[/plan]
	  [plan title="Plan"]<ul><li>List Item</li><li>List Item</li></ul>[/plan]
	  [plan title="Featured Plan" featured="true" color="teal-lite"]<ul><li>List Item</li><li>List Item</li></ul>[/plan]
	  [plan title="Plan"]<ul><li>List Item</li><li>List Item</li></ul>[/plan]
	  ', 'admin_enqueue_js' => array(get_template_directory_uri() . '/js/custom-views-extended.js'), 'js_view' => 'PricingTableView'));
wpb_map(array("name" => __("Plan Section", "js_composer"), "base" => "plan", "content_element" => false, "is_container" => true, "params" => array(array("type" => "textfield", "heading" => __("Title", "js_composer"), "param_name" => "title", "holder" => "h4", "value" => "", "description" => __("Plan Title", "js_composer")), array("type" => "checkbox", "class" => "", "heading" => __("Featured Plan", "js_composer"), "param_name" => "featured", "value" => array(__('Enable', "js_composer") => "true")), array("type" => "textfield", "heading" => __("Currency", "js_composer"), "param_name" => "currency", "value" => ""), array("type" => "textfield", "heading" => __("Price", "js_composer"), "param_name" => "price", "value" => ""), array("type" => "textfield", "heading" => __("Per", "js_composer"), "param_name" => "per", "value" => "", "description" => __("E.g. / Month", "js_composer")), array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => get_options_array('colors'), "description" => __("Select color of the toggle icon.", "js_composer")), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Content", "js_composer"), "param_name" => "content", "value" => __("<ul><li>List Item</li><li>List Item</li></ul>", "js_composer")), array("type" => "textfield", "heading" => __("Button Text", "js_composer"), "param_name" => "button_text", "value" => ""), array("type" => "textfield", "heading" => __("Button Link", "js_composer"), "param_name" => "button_link", "value" => ""), array("type" => "dropdown", "heading" => __("Link Target", "js_composer"), "param_name" => "target", "value" => array(__("Same window", "js_composer") => "_self", __("New window", "js_composer") => "_blank")), array("type" => "textfield", "heading" => __("Icon", "js_composer"), "param_name" => "icon", "value" => "", "description" => __("See Font Awesome <a href=\"http://fortawesome.github.io/Font-Awesome/icons/\" target=\"_blank\">Icons</a> : Enter Icon Name e.g.<strong> fa-compass</strong>", "js_composer")), array("type" => "colorpicker", "heading" => __("Icon Color", "js_composer"), "param_name" => "icon_color", "value" => "", "dependency" => array('element' => 'icon', 'not_empty' => true)), array("type" => "colorpicker", "heading" => __("Icon Background Color", "js_composer"), "param_name" => "icon_background", "value" => "", "dependency" => array('element' => 'icon', 'not_empty' => true))), 'js_view' => 'PlanView'));
add_shortcode('plan', 'pricing_table_shortcode');
add_shortcode('pricing_table', 'pricing_table_shortcode');
Esempio n. 5
0
<?php

/* ------------------------------------
	:: REVEAL / TOGGLE
	------------------------------------*/
class WPBakeryShortCode_Reveal extends WPBakeryShortCode
{
    protected $predefined_atts = array('width' => '', 'align' => '', 'title' => '', 'color' => '', 'open' => '', 'css_animation' => '');
    public function content($atts, $content = null)
    {
        $width = $align = $open = $title = $color = $css_animation = $css_class = '';
        extract(shortcode_atts(array('width' => '', 'align' => '', 'title' => '', 'color' => '', 'open' => '', 'css_animation' => ''), $atts));
        $css_class = $this->getCSSAnimation($css_animation);
        if ($width) {
            $width = 'style="width:' . esc_attr($width) . 'px"';
        }
        $state = $open == 'true' ? $state = 'ui-state-active' : '';
        return '<div class="revealbox ' . $align . ' ' . $color . ' ' . $open . ' ' . $css_class . ' clearfix" ' . $width . '><h4 class="reveal ' . $state . '"><i class="ui-icon fa fa-plus"></i>' . $title . '</h4><div class="reveal-content">' . do_shortcode($content) . '</div></div>';
    }
}
/* ------------------------------------
	:: REVEAL MAP
	------------------------------------*/
wpb_map(array("name" => __("Reveal ( Deprecated )", "js_composer"), "base" => "reveal", "controls" => "full", "description" => __('Use FAQ Element', 'js_composer'), "class" => "", "icon" => "icon-toggle", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "textfield", "holder" => "h4", "class" => "toggle_title", "heading" => __("Toggle title", "js_composer"), "param_name" => "title", "value" => __("Toggle title", "js_composer"), "description" => __("Toggle block title.", "js_composer")), array("type" => "textarea_html", "holder" => "div", "class" => "toggle_content", "heading" => __("Toggle content", "js_composer"), "param_name" => "content", "value" => __("<p>Toggle content goes here, click edit button.</p>", "js_composer"), "description" => __("Toggle block content.", "js_composer")), array("type" => "dropdown", "heading" => __("Default state", "js_composer"), "param_name" => "open", "value" => array(__("Closed", "js_composer") => "false", __("Open", "js_composer") => "true"), "description" => __("Select this if you want toggle to be open by default.", "js_composer")), array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => get_options_array('colors'), "description" => __("Select color of the toggle icon.", "js_composer")), $add_css_animation, array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "js_composer")))));
add_shortcode('reveal', 'reveal_shortcode');
Esempio n. 6
0
            }
            $output .= $NV_imgblackwhite . '"';
            if (!empty($height)) {
                $output .= 'style="max-height:' . $height . 'px;"';
            }
            $output .= '>';
        }
        // Image Link
        $output .= $NV_link_start;
        $output .= '<img ' . (esc_attr($type) == "reflect" || esc_attr($type) == "reflection" || esc_attr($type) == "reflectlightbox" || esc_attr($type) == "shadowreflectlightbox" || esc_attr($type) == "shadowreflect" || esc_attr($type) == "shadowreflection" ? 'class="reflect"' : '') . 'src="' . $NV_imagepath . '" alt="' . esc_attr($alt) . '" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '"  />';
        // LightBox / Link *End*
        if (!empty($NV_lightbox) || !empty($NV_link_start)) {
            $output .= '</a>';
        }
        if ($titleoverlay == "yes") {
            $output .= '<div class="title">';
            $output .= '<h3>' . esc_attr($alt) . '</h3>';
            $output .= '</div>';
        }
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
        $output .= '</div>';
        return $output;
    }
}
/* ------------------------------------
	:: IMAGE MAP	
	------------------------------------*/
wpb_map(array("name" => __("Single Image", "js_composer"), "base" => "imageeffect", "controls" => "edit_popup_delete", "class" => "wpb_vc_single_image_widget", "icon" => "icon-image", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "attach_image", "heading" => __("Image", "js_composer"), "param_name" => "image", "value" => "", "description" => ""), array("type" => "textfield", "holder" => "img", "heading" => __("Image URL", "js_composer"), "param_name" => "url", "value" => "", "description" => __("Enter URL if you wish to use an image not in the media library.", "js_composer")), array("type" => "dropdown", "heading" => __("Effect", "js_composer"), "param_name" => "type", "value" => get_options_array('imageeffect')), array("type" => "textfield", "heading" => __("Image Width", "js_composer"), "param_name" => "width", "value" => "", "description" => __("Enter image width.", "js_composer")), array("type" => "textfield", "heading" => __("Image Height", "js_composer"), "param_name" => "height", "value" => "", "description" => __("Enter image height.", "js_composer")), $add_css_animation, get_common_options('align', 'Image'), array("type" => "textfield", "heading" => __("Alt", "js_composer"), "param_name" => "alt", "value" => "", "description" => __("Alternate text", "js_composer")), array("type" => "checkbox", "class" => "", "heading" => __("Enable Title Overlay", "js_composer"), "param_name" => "titleoverlay", "value" => array(__('Enable', "js_composer") => "yes")), array("type" => "checkbox", "class" => "", "heading" => __("Enable Lightbox", "js_composer"), "param_name" => "lightbox", "value" => array(__('Enable', "js_composer") => "yes")), array("type" => "textfield", "heading" => __("Media URL", "js_composer"), "param_name" => "videourl", "value" => "", "dependency" => array('element' => 'lightbox', 'value' => array('yes')), "description" => __("Enter url if you want to use lightbox to display a Video or other media.", "js_composer")), array("type" => "textfield", "heading" => __("Image link", "js_composer"), "param_name" => "link", "value" => "", "description" => __("Enter url if you want to link this image with any url. Leave empty if you won't use it", "js_composer")), array("type" => "dropdown", "heading" => __("Link Target", "js_composer"), "param_name" => "target", "value" => array(__("Same window", "js_composer") => "_self", __("New window", "js_composer") => "_blank"), "dependency" => array('element' => "img_link", 'not_empty' => true)))));
Esempio n. 7
0
        wp_enqueue_script('nivo-slider');
    } else {
        wp_deregister_script('jquery-cycle');
        wp_register_script('jquery-cycle', get_template_directory_uri() . '/js/jquery.cycle.plugin.min.js', false, array('jquery'), true);
        wp_enqueue_script('jquery-cycle');
        wp_deregister_script('touch-gestures');
        wp_register_script('touch-gestures', get_template_directory_uri() . '/js/touch.gestures.min.js', false, array('jquery'), true);
        wp_enqueue_script('touch-gestures');
        wp_deregister_script('stage-slider');
        wp_register_script('stage-slider', get_template_directory_uri() . '/js/stage.slider.min.js', false, array('jquery-cycle'), true);
        wp_enqueue_script('stage-slider');
    }
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
/* ------------------------------------
	:: NIVO MAP
	------------------------------------*/
wpb_map(array("base" => "postgallery_nivo", "name" => __("Nivo Gallery", "js_composer"), "class" => "nv_options islider", "controls" => "edit_popup_delete", 'deprecated' => '4.6', "icon" => "icon-nivogallery", "category" => __('Gallery', 'js_composer'), "params" => array(array("type" => "textfield", "holder" => "h4", "class" => "", "heading" => __("Gallery ID", "js_composer"), "param_name" => "id", "value" => __("nivo_", "js_composer"), "description" => __("Enter a unique ID nivo_one.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Add an optional title.", "js_composer")), get_common_options('datasource'), get_common_options('data-1'), get_common_options('data-2'), get_common_options('data-2-formats'), get_common_options('data-8'), get_common_options('orderby'), get_common_options('sortby'), get_common_options('excerpt'), array("type" => "textfield", "class" => "", "heading" => __("Post Limit", "js_composer"), "param_name" => "limit", "value" => "", "dependency" => array('element' => 'data_source', 'value' => array('data-2', 'data-5', 'data-8', 'data-6')), "description" => __("Set a posts limit.", "js_composer")), get_common_options('data-3'), get_common_options('data-4'), get_common_options('data-5'), get_common_options('data-5-tags'), get_common_options('data-6'), get_common_options('width'), get_common_options('height'), array("type" => "dropdown", "class" => "", "heading" => __('Effect', "js_composer"), "param_name" => "animation", "value" => array("random", "sliceDown", "sliceDownLeft", "sliceUp", "sliceUpLeft", "sliceUpDown", "sliceUpDownLeft", "fold", "fade", "slideInRight", "slideInLeft", "boxRandom", "boxRain", "boxRainReverse", "boxRainGrow", "boxRainGrowReverse")), get_common_options('align', 'Gallery'), get_common_options('imageeffect'), array("type" => "checkbox", "class" => "", "heading" => __("Lightbox", "js_composer"), "param_name" => "lightbox", "value" => array('Enable' => 'yes')), array("type" => "textfield", "class" => "", "heading" => __("CSS Classes", "js_composer"), "param_name" => "class", "value" => "", "description" => __("Add an optional CSS classes.", "js_composer")))));
/* ------------------------------------
	:: STAGE
	------------------------------------*/
wpb_map(array("base" => "postgallery_image", "name" => __("Stage Gallery", "js_composer"), "class" => "nv_options stage", "controls" => "edit_popup_delete", "icon" => "icon-stagegallery", "category" => __('Gallery', 'js_composer'), "params" => array(array("type" => "textfield", "holder" => "h4", "class" => "", "heading" => __("Gallery ID", "js_composer"), "param_name" => "id", "value" => __("stage_", "js_composer"), "description" => __("Enter a unique ID stage_one.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Add an optional title.", "js_composer")), get_common_options('datasource'), get_common_options('data-1'), get_common_options('data-2'), get_common_options('data-2-formats'), get_common_options('data-8'), get_common_options('orderby'), get_common_options('sortby'), get_common_options('excerpt'), array("type" => "textfield", "class" => "", "heading" => __("Post Limit", "js_composer"), "param_name" => "limit", "value" => "", "dependency" => array('element' => 'data_source', 'value' => array('data-2')), "description" => __("Set a posts limit.", "js_composer")), get_common_options('data-3'), get_common_options('data-4'), get_common_options('data-5'), get_common_options('data-5-tags'), get_common_options('data-6'), get_common_options('timeout'), get_common_options('width'), get_common_options('height'), get_common_options('align', 'Gallery'), get_common_options('imageeffect'), array("type" => "dropdown", "class" => "", "heading" => __('Animation Type', "js_composer"), "param_name" => "animation", "value" => get_options_array('animation')), array("type" => "dropdown", "class" => "", "heading" => __('Animation Tween', "js_composer"), "param_name" => "tween", "value" => get_options_array('transition')), array("type" => "dropdown", "class" => "", "heading" => __('Navigation', "js_composer"), "param_name" => "navigation", "value" => array('Bullet Navigation' => '', 'Bullet + Directional Navigation' => 'enabled', 'Directional Navigation' => 'leftrightonly', 'Disable Navigation' => 'disabled')), array("type" => "checkbox", "class" => "", "heading" => __("Lightbox", "js_composer"), "param_name" => "lightbox", "value" => array('Enable' => 'yes')), array("type" => "textfield", "class" => "", "heading" => __("CSS Classes", "js_composer"), "param_name" => "class", "value" => "", "description" => __("Add an optional CSS classes.", "js_composer")))));
/* ------------------------------------
	:: iSLIDER MAP
	------------------------------------*/
wpb_map(array("base" => "postgallery_islider", "name" => __("iSlider Gallery", "js_composer"), "class" => "nv_options islider", "controls" => "edit_popup_delete", "icon" => "icon-islidergallery", "category" => __('Gallery', 'js_composer'), "params" => array(array("type" => "textfield", "holder" => "h4", "class" => "", "heading" => __("Gallery ID", "js_composer"), "param_name" => "id", "value" => __("islider_", "js_composer"), "description" => __("Enter a unique ID islider_one.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Add an optional title.", "js_composer")), get_common_options('datasource'), get_common_options('data-1'), get_common_options('data-2'), get_common_options('data-2-formats'), get_common_options('data-8'), get_common_options('orderby'), get_common_options('sortby'), get_common_options('excerpt'), array("type" => "textfield", "class" => "", "heading" => __("Post Limit", "js_composer"), "param_name" => "limit", "value" => "", "dependency" => array('element' => 'data_source', 'value' => array('data-2')), "description" => __("Set a posts limit.", "js_composer")), get_common_options('data-3'), get_common_options('data-4'), get_common_options('data-5'), get_common_options('data-5-tags'), get_common_options('data-6'), get_common_options('width'), get_common_options('height'), get_common_options('align', 'Gallery'), get_common_options('imageeffect'), array("type" => "checkbox", "class" => "", "heading" => __("Lightbox", "js_composer"), "param_name" => "lightbox", "value" => array('Enable' => 'yes')), array("type" => "textfield", "class" => "", "heading" => __("CSS Classes", "js_composer"), "param_name" => "class", "value" => "", "description" => __("Add an optional CSS classes.", "js_composer")))));
add_shortcode('postgallery_nivo', 'postgallery_image_shortcode');
add_shortcode('postgallery_image', 'postgallery_image_shortcode');
add_shortcode('postgallery_islider', 'postgallery_image_shortcode');
Esempio n. 8
0
<?php

/* ------------------------------------
	:: LISTS
	------------------------------------*/
function list_shortcode($atts, $content = null, $code)
{
    extract(shortcode_atts(array('style' => 'orb', 'color' => 'grey-lite', 'unicode' => ''), $atts));
    $unicode_class = '';
    if ($style == 'custom' && !empty($unicode)) {
        $unicode_class = 'list-' . $unicode;
        wp_enqueue_style('themeva-custom-styles-list', get_template_directory_uri() . '/extra-style.css', false, null);
        $custom_css = "\n\t\t\t\t.list.{$unicode_class} li:before {\n\t\t\t\t content: '\\{$unicode}';\n\t\t\t\t}";
        wp_add_inline_style('themeva-custom-styles-list', $custom_css);
    }
    return '<div class="list ' . esc_attr($style) . ' ' . esc_attr($color) . ' ' . $unicode_class . '">' . $content . '</div>';
}
/* ------------------------------------
	:: LISTS MAP 	
	------------------------------------*/
wpb_map(array("name" => __("List", "js_composer"), "base" => "list", "class" => "wpb_controls_top_right", "icon" => "icon-list", "controls" => "full", "category" => __('Content', 'js_composer'), "params" => array(array("type" => "dropdown", "heading" => __("Style", "js_composer"), "param_name" => "style", "value" => array(__('Bullet', "js_composer") => 'orb', __('Arrow', "js_composer") => 'arrow', __('Check', "js_composer") => 'check', __('Cross', "js_composer") => 'cross', __('Custom', "js_composer") => 'custom')), array("type" => "textfield", "heading" => __("Unicode Character", "js_composer"), "param_name" => "unicode", "dependency" => array('element' => 'style', 'value' => array('custom')), "description" => __("Add <a href=\"http://fortawesome.github.io/Font-Awesome/icon/coffee/\" target=\"_blank\">Font Awesome</a> <strong>Unicode</strong> Character: e.g. <strong>F0F4</strong>", "js_composer")), array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => get_options_array('colors'), "description" => __("Select color of the toggle icon.", "js_composer")), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", "js_composer"), "param_name" => "content", "value" => "<ul><li>List Item</li><li>List Item</li><li>List Item</li></ul>"))));
add_shortcode('list', 'list_shortcode');
Esempio n. 9
0
    $styling = $width_class = '';
    if (!empty($margin_top)) {
        $styling = 'margin-top:' . $margin_top . 'px;';
    }
    if (!empty($margin_left)) {
        $styling .= 'margin-left:' . $margin_left . 'px;';
    }
    if (!empty($margin_right)) {
        $styling .= 'margin-right:' . $margin_right . 'px;';
    }
    if (!empty($styling)) {
        $styling = 'style="' . $styling . '"';
    }
    if ($float == 'yes') {
        $floatclass = 'float';
    } else {
        $floatclass = '';
    }
    $output = '<div id="anim-' . $id . '" class="animator-wrap ' . $width_class . ' ' . $floatclass . ' ' . $class . ' ' . $align . ' ' . 'direction-' . $direction . '" ' . $styling . ' data-animator-easing="' . $easing . '" data-animator-speed="' . $speed . '" data-animator-effect="' . $effect . '" data-animator-direction="' . $direction . '" data-animator-delay="' . $delay . '">';
    $output .= remove_wpautop($content);
    $output .= '</div>';
    echo $output;
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
/* ------------------------------------
	:: CONTENT ANIMATOR MAP
	------------------------------------*/
wpb_map(array("base" => "content_animator", "name" => __("Content Animator", "js_composer"), "class" => "", "controls" => "edit_popup_delete", "icon" => "icon-animator", 'deprecated' => '4.6', "params" => array(array("type" => "textfield", "holder" => "div", "class" => "", "heading" => __("Animator ID", "js_composer"), "param_name" => "id", "value" => __("animator_", "js_composer"), "description" => __("Enter a unique ID e.g. animator_text.", "js_composer")), array("type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Content to Animate", "js_composer"), "param_name" => "content", "value" => ""), array("type" => "textfield", "class" => "", "heading" => __("Delay Time", "js_composer"), "param_name" => "delay", "value" => "", "description" => __("Miliseconds e.g. 5000 = 5 seconds", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Effect Speed", "js_composer"), "param_name" => "speed", "value" => "", "description" => __("Miliseconds e.g. 5000 = 5 seconds", "js_composer")), array("type" => "dropdown", "heading" => __("Effect", "js_composer"), "param_name" => "effect", "value" => array('fade', 'slide')), array("type" => "dropdown", "heading" => __("Animate Direction", "js_composer"), "param_name" => "direction", "value" => array('left', 'right', 'up', 'down')), array("type" => "dropdown", "heading" => __("Align", "js_composer"), "param_name" => "align", "value" => array('left', 'center', 'right')), array("type" => "dropdown", "heading" => __("Float", "js_composer"), "param_name" => "float", "value" => array('no', 'yes')), array("type" => "dropdown", "heading" => __("Easing", "js_composer"), "param_name" => "easing", "value" => get_options_array('transition')), array("type" => "textfield", "class" => "", "heading" => __("Top Margin", "js_composer"), "param_name" => "margin_top", "description" => __("px", "js_composer"), "value" => ""), array("type" => "textfield", "class" => "", "heading" => __("Left Margin", "js_composer"), "param_name" => "margin_left", "description" => __("px", "js_composer"), "value" => ""), array("type" => "textfield", "class" => "", "heading" => __("Right Margin", "js_composer"), "param_name" => "margin_right", "description" => __("px", "js_composer"), "value" => ""))));
add_shortcode('content_animator', 'content_animator_shortcode');
Esempio n. 10
0
    	:: LOAD DATA SOURCE *END*
    	
    	------------------------------------*/
    $slidenum_chk = $postcount;
    if (!empty($post_count)) {
        $slidenum_chk = $post_count;
    }
    $output .= '</div><!-- / slider-inner-wrap -->';
    $output .= '</div><!-- / stageslider -->';
    $output .= '<div class="dynamic-frame clearfix" data-offset="' . $load_limit . '" data-total="' . $post_count . '" data-load-value="' . $load_value . '">';
    $output .= '<input name="' . $NV_shortcode_id . '_timeout_array" class="timeout_array" value="' . $NV_slidearray . '" type="hidden" />';
    $output .= '<input name="' . $NV_shortcode_id . '_timeout" class="timeout" value="' . $NV_stagetimeout . '" type="hidden" />';
    $output .= '</div>';
    $output .= '<div class="clear"></div>';
    $output .= '</div><!-- / gallery-wrap -->';
    wp_deregister_script('jquery-cycle');
    wp_register_script('jquery-cycle', get_template_directory_uri() . '/js/jquery.cycle.plugin.min.js', false, array('jquery'), true);
    wp_enqueue_script('jquery-cycle');
    wp_deregister_script('touch-gestures');
    wp_register_script('touch-gestures', get_template_directory_uri() . '/js/touch.gestures.min.js', false, array('jquery'), true);
    wp_enqueue_script('touch-gestures');
    wp_deregister_script('stage-slider');
    wp_register_script('stage-slider', get_template_directory_uri() . '/js/stage.slider.min.js', false, array('jquery-cycle'), true);
    wp_enqueue_script('stage-slider');
    return $output;
}
/* ------------------------------------
	:: STAGE
	------------------------------------*/
wpb_map(array("base" => "postgallery_image", "name" => __("Stage Gallery", "js_composer"), "class" => "nv_options stage", "controls" => "edit_popup_delete", "icon" => "icon-stagegallery", "category" => __('Gallery', 'js_composer'), "params" => array(array("type" => "textfield", "holder" => "h4", "class" => "", "heading" => __("Gallery ID", "js_composer"), "param_name" => "id", "value" => __("stage_", "js_composer"), "description" => __("Enter a unique ID stage_one.", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Add an optional title.", "js_composer")), get_common_options('datasource'), get_common_options('data-1'), get_common_options('data-2'), get_common_options('data-2-formats'), get_common_options('data-8'), get_common_options('orderby'), get_common_options('sortby'), get_common_options('excerpt'), array("type" => "textfield", "class" => "", "heading" => __("Post Limit", "js_composer"), "param_name" => "limit", "value" => "", "dependency" => array('element' => 'data_source', 'value' => array('data-2', 'data-8', 'data-5')), "description" => __("Set a posts limit.", "js_composer")), get_common_options('data-3'), get_common_options('data-4'), get_common_options('data-5'), get_common_options('data-5-tags'), get_common_options('data-6'), array("type" => "dropdown", "heading" => __("Ajax Lazy Load", "js_composer"), "param_name" => "load_ajax", "value" => array(__("Disabled", "js_composer") => '', __("Enable", "js_composer") => 'auto_load'), "description" => __("Load Gallery content in via Ajax ( Reduces page load time ).", "js_composer")), array("type" => "textfield", "class" => "", "heading" => __("Lazy Load Initial Limit", "js_composer"), "param_name" => "load_limit", "value" => "", "description" => __("Enter how many slides you wish to display on initial load.", "js_composer"), "dependency" => array('element' => 'load_ajax', 'not_empty' => true)), get_common_options('content'), get_common_options('timeout'), get_common_options('width'), get_common_options('height'), get_common_options('align', 'Gallery'), get_common_options('imageeffect'), array("type" => "dropdown", "class" => "", "heading" => __('Animation Type', "js_composer"), "param_name" => "animation", "value" => get_options_array('animation')), array("type" => "dropdown", "class" => "", "heading" => __('Animation Tween', "js_composer"), "param_name" => "tween", "value" => get_options_array('transition')), array("type" => "dropdown", "class" => "", "heading" => __('Navigation', "js_composer"), "param_name" => "navigation", "value" => array('Bullet Navigation' => '', 'Bullet + Pause' => 'bulletpause', 'Bullet + Directional Navigation' => 'enabled', 'Bullet + Directional Navigation + Pause' => 'enabledpause', 'Directional Navigation' => 'leftrightonly', 'Directional Navigation + Pause' => 'leftrightpause', 'Disable Navigation' => 'disabled')), array("type" => "checkbox", "class" => "", "heading" => __("Lightbox", "js_composer"), "param_name" => "lightbox", "value" => array('Enable' => 'yes')), array("type" => "textfield", "class" => "", "heading" => __("CSS Classes", "js_composer"), "param_name" => "class", "value" => "", "description" => __("Add an optional CSS classes.", "js_composer")))));
add_shortcode('postgallery_image', 'postgallery_image_shortcode');
Esempio n. 11
0
<?php

/* ------------------------------------
	:: DROP CAPS
	------------------------------------*/
function dropcap_shortcode($atts, $content = null)
{
    extract(shortcode_atts(array('style' => '', 'text' => '', 'color' => ''), $atts));
    return '<span class="dropcap ' . $style . ' ' . $color . '">' . $text . '</span>';
}
/* ------------------------------------
	:: DROPCAPS MAP 	
	------------------------------------*/
wpb_map(array("name" => __("Drop Cap", "js_composer"), "base" => "dropcap", "controls" => "edit_popup_delete", "class" => "dropcap", "icon" => "icon-dropcap", 'deprecated' => '4.6', "category" => __('Content', 'js_composer'), "params" => array(array("type" => "dropdown", "heading" => __("Style", "js_composer"), "param_name" => "style", "value" => array(__('Circle + Character', "js_composer") => 'two', __('Character', "js_composer") => 'one')), array("type" => "dropdown", "heading" => __("Color", "js_composer"), "param_name" => "color", "value" => get_options_array('colors'), "description" => __("Select color of the toggle icon.", "js_composer")), array("type" => "textfield", "holder" => 'h4', "heading" => __("Character", "js_composer"), "param_name" => "text", "value" => ""))));
add_shortcode('dropcap', 'dropcap_shortcode');