File: D:/HostingSpaces/KLeeuwen/old.samenbouwen.in/wwwroot/wp-content/themes/dlight/shortcodes.php
<?php
/**
* @package WordPress
* @subpackage DLight Theme
* @author Shindiri Studio (http://www.shindiristudio.com) & http://www.mihajlovicnenad.com/
*/
add_filter( 'widget_text', 'do_shortcode' );
global $darkone_data, $fbuilder, $wpdb;
$counter = 0;
$darkone_categories = get_categories(array('order'=>'desc'));
$darkone_ready_categories = array( '-1' => __('All', 'darkone') );
$darkone_margin = (isset($darkone_data['fb_bmargin'])? $darkone_data['fb_bmargin']:array());
foreach ( $darkone_categories as $category ) {
$counter++;
$darkone_ready_categories = $darkone_ready_categories + array($category->term_id=>$category->name);
}
$darkone_ready_contacts = array();
$counter = 0;
$darkone_contacts = (isset($darkone_data['contact'])?$darkone_data['contact']:array());
foreach ( $darkone_contacts as $contact ) {
$counter++;
$darkone_ready_contacts = $darkone_ready_contacts+array($counter=>$contact['name']);
}
$insert_posts_selected = 1;
$querystr = "
SELECT $wpdb->posts.ID, $wpdb->posts.post_title
FROM $wpdb->posts
WHERE $wpdb->posts.post_status = 'publish'
AND $wpdb->posts.post_type = 'post'
ORDER BY $wpdb->posts.post_date DESC
";
$posts_array = $wpdb->get_results($querystr, OBJECT);
$fbuilder_wp_posts = array();
$first_post = '';
foreach($posts_array as $key => $obj) {
if($first_post == '') $first_post = $obj->ID;
$fbuilder_wp_posts[$obj->ID] = $obj->post_title;
}
$nav_menus = get_terms( 'nav_menu', array( 'hide_empty' => true ));
$fbuilder_menus = array();
$fbuilder_menu_std = '';
if(is_array($nav_menus))
foreach($nav_menus as $menu_div) {
if($fbuilder_menu_std == '') $fbuilder_menu_std = $menu_div->slug;
$fbuilder_menus[$menu_div->slug] = $menu_div->name;
}
$admin_optionsDB = $fbuilder->option();
$opts = array();
foreach($admin_optionsDB as $opt) {
if(isset($opt->name) && isset($opt->value))
$opts[$opt->name] = $opt->value;
}
$animationList = array(
'none' => __('None', 'darkone'),
'flipInX' => __('Flip in X', 'darkone'),
'flipInY' => __('Flip in Y', 'darkone'),
'fadeIn' => __('Fade in', 'darkone'),
'fadeInDown' => __('Fade in from top', 'darkone'),
'fadeInUp' => __('Fade in from bottom', 'darkone'),
'fadeInLeft' => __('Fade in from left', 'darkone'),
'fadeInRight' => __('Fade in from right', 'darkone'),
'fadeInDownBig' => __('Slide in from top', 'darkone'),
'fadeInUpBig' => __('Slide in from bottom', 'darkone'),
'fadeInLeftBig' => __('Slide in from left', 'darkone'),
'fadeInRightBig' => __('Slide in from right', 'darkone'),
'bounceIn' => __('Bounce in', 'darkone'),
'bounceInDown' => __('Bounce in from top', 'darkone'),
'bounceInUp' => __('Bounce in from bottom', 'darkone'),
'bounceInLeft' => __('Bounce in from left', 'darkone'),
'bounceInRight' => __('Bounce in from right', 'darkone'),
'rotateIn' => __('Rotate in', 'darkone'),
'rotateInDownLeft' => __('Rotate in from top-left', 'darkone'),
'rotateInDownRight' => __('Rotate in from top-right', 'darkone'),
'rotateInUpLeft' => __('Rotate in from bottom-left', 'darkone'),
'rotateInUpRight' => __('Rotate in from bottom-right', 'darkone'),
'lightSpeedIn' => __('Lightning speed', 'darkone'),
'rollIn' => __('Roll in', 'darkone')
);
$animationControl = array(
'group_animate' => array(
'type' => 'collapsible',
'label' => __('Animation','darkone'),
'options' => array(
'animate' => array(
'type' => 'select',
'label' => __('Type:','darkone'),
'std' => 'none',
'label_width' => 0.25,
'control_width' => 0.75,
'options' => $animationList
),
'animation_group' => array(
'type' => 'input',
'label' => __('Group:','darkone'),
'std' => '',
'half_column' => 'true'
),
'animation_delay' => array(
'type' => 'number',
'label' => __('Delay:','darkone'),
'std' => 0,
'unit' => 'ms',
'min' => 0,
'step' => 50,
'max' => 10000,
'half_column' => 'true'
)
)
)
);
if(isset($opts['css_classes']) && $opts['css_classes'] == 'true') {
$classControl = array(
'group_css' => array(
'type' => 'collapsible',
'label' => __('ID & Custom CSS','darkone'),
'options' => array(
'shortcode_id' => array(
'type' => 'input',
'label' => __('ID:','darkone'),
'desc' => __('For linking via hashtags','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => ''
),
'class' => array(
'type' => 'input',
'label' => __('Class:','darkone'),
'desc' => __('For custom css','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => ''
)
)
)
);
$tabsId = array(
'custom_id' => array(
'type' => 'input',
'label' => __('Tab ID:','darkone'),
'desc' => __('For use of anchor in url. Make sure that this ID is unique on the page.','darkone'),
'label_width' => 0.25,
'std' => ''
)
);
}
else {
$classControl = array();
$tabsId = array();
}
/* -------------------------------------------------------------------------------- */
/* TESTIMONIALS */
/* -------------------------------------------------------------------------------- */
$testimonials = array(
'testimonials' => array(
'type' => 'draggable',
'text' => __('Testimonials','darkone'),
'icon' => $fbuilder->url.'images/icons/testimonials.png',
'function' => 'fbuilder_testimonials',
'group' => __('Basic', 'frontent-builder'),
'options' => array_merge(
array(
'group_name' => array(
'type' => 'collapsible',
'label' => __('Name','darkone'),
'open' => 'true',
'options' => array(
'name' => array(
'type' => __('input','darkone'),
'label' => __('Name:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => __('John Dough','darkone')
),
'profession' => array(
'type' => 'input',
'label' => __('Title:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => __('photographer / fashion interactive','darkone'),
),
'name_color' => array(
'type' => 'color',
'label' => __('Color:','darkone'),
'label_width' => 0.25,
'control_width' => 0.5,
'std' => $opts['title_color']
),
'url' => array(
'type' => 'input',
'label' => __('Link:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'desc' => 'Type if you want to link the testimonial'
),
'main_color' => array(
'type' => 'color',
'label' => __('Line:','darkone'),
'label_width' => 0.25,
'control_width' => 0.5,
'std' => $opts['main_color']
),
'quote_color' => array(
'type' => 'color',
'label' => __('Quote color','darkone'),
'label_width' => 0.5,
'control_width' => 0.5,
'std' => $opts['text_color']
)
)
),
'group_quote' => array(
'type' => 'collapsible',
'label' => __('Quote','darkone'),
'open' => 'true',
'options' => array(
'quote' => array(
'type' => 'input',
'label' => __('Quote:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
),
'quote_color' => array(
'type' => 'color',
'label' => __('Color:','darkone'),
'label_width' => 0.25,
'control_width' => 0.5,
'std' => $opts['text_color']
)
)
),
'group_image' => array(
'type' => 'collapsible',
'open' => 'true',
'label' => __('Image','darkone'),
'options' => array(
'image' => array(
'type' => 'image',
'desc' => '160x160',
'std' => get_template_directory_uri().'/images/testimonials.jpg'
)
)
),
'group_background' => array(
'type' => 'collapsible',
'label' => __('Background','darkone'),
'open' => 'true',
'options' => array(
'back_color' => array(
'type' => 'color',
'label' => __('Color:','darkone'),
'label_width' => 0.25,
'control_width' => 0.5,
'std' => $opts['light_back_color']
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
/* -------------------------------------------------------------------------------- */
/* TABS */
/* -------------------------------------------------------------------------------- */
$tabs = array(
'tabs' => array(
'type' => 'draggable',
'text' => __('Tabs','darkone'),
'icon' => $fbuilder->url.'images/icons/tabs.png',
'function' => 'fbuilder_tabs',
'group' => __('Basic', 'frontent-builder'),
'options' => array_merge(
array(
'group_basic' => array(
'type' => 'collapsible',
'label' => __('Basic','darkone'),
'open' => 'true',
'options' => array(
'style' => array(
'type' => 'select',
'label' => __('Style','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'Darkone',
'options' => array(
'darkone' => __('Darkone', 'darkone'),
'clean' => __('Clean','darkone'),
'squared' => __('Squared','darkone'),
'rounded' => __('Rounded','darkone')
)
)
)
),
'group_tab_colors' => array(
'type' => 'collapsible',
'label' => __('Tab Colors','darkone'),
'open' => 'true',
'options' => array(
'title_color' => array(
'type' => 'color',
'label' => __('Title:','darkone'),
'std' => $opts['title_color']
),
'active_tab_title_color' => array(
'type' => 'color',
'label' => __('Active title:','darkone'),
'std' => $opts['title_color'],
'hide_if' => array(
'style' => array('clean', 'darkone')
)
),
'tab_back_color' => array(
'type' => 'color',
'label' => __('Background:','darkone'),
'std' => $opts['light_back_color'],
'hide_if' => array(
'style' => array('clean')
)
),
'active_tab_border_color' => array(
'type' => 'color',
'label' => __('Active border:','darkone'),
'std' => $opts['main_color']
)
)
),
'group_content_colors' => array(
'type' => 'collapsible',
'label' => __('Content Colors','darkone'),
'open' => 'true',
'options' => array(
'text_color' => array(
'type' => 'color',
'label' => __('Text:','darkone'),
'std' => $opts['text_color']
),
'border_color' => array(
'type' => 'color',
'label' => __('Border:','darkone'),
'std' => $opts['light_border_color'],
'hide_if' => array(
'style' => array('clean', 'darkone')
)
),
'back_color' => array(
'type' => 'color',
'label' => __('Background:','darkone'),
'std' => $opts['light_back_color'],
'hide_if' => array(
'style' => array('clean', 'darkone')
)
)
)
),
'group_tabs' => array(
'type' => 'collapsible',
'label' => __('Tabs','darkone'),
'open' => 'true',
'options' => array(
'sortable' => array(
'type' => 'sortable',
'desc' => __('Elements are sortable','darkone'),
'item_name' => __('tab item','darkone'),
'label_width' => 0,
'control_width' => 1,
'std' => array(
'items' => array(
0 => array(
'title' => 'Lorem ipsum',
'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
'image' => '',
'active' => 'true'
),
1 => array(
'title' => 'Lorem ipsum',
'content' => 'Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.',
'image' => '',
'active' => 'false'
),
2 => array(
'title' => 'Lorem ipsum',
'content' => 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
'image' => '',
'active' => 'false'
)
),
'order' => array(
0 => 0,
1 => 1,
2 => 2
)
),
'options'=> array(
'title' => array(
'type' => 'input',
'label_width' => 0.25,
'control_width' => 0.75,
'label' => __('Title:','darkone')
),
'content' => array(
'type' => 'textarea'
),
'image' => array(
'type' => 'image',
'label' => __('Image:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'desc' => __('Add an image to tab content','darkone')
),
'active' => array(
'type' => 'checkbox',
'label' => __('Mark as Default','darkone'),
'desc' => __('Only one panel can be active at a time, so be sure to uncheck the others for it to work properly','darkone')
)
)
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
/* -------------------------------------------------------------------------------- */
/* ACCORDION */
/* -------------------------------------------------------------------------------- */
$accordion = array(
'accordion' => array(
'type' => 'draggable',
'text' => __('Accordion','darkone'),
'icon' => $fbuilder->url.'images/icons/accordion.png',
'function' => 'fbuilder_accordion',
'group' => __('Basic', 'frontent-builder'),
'options' => array_merge(
array(
'group_basic' => array(
'type' => 'collapsible',
'label' => __('Basic','darkone'),
'open' => 'true',
'options' => array(
'style' => array(
'type' => 'select',
'label' => __('Style:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'darkone',
'options' => array(
'darkone' => __('Darkone style', 'darkone'),
'clean-right' => __('Clean right','darkone'),
'squared-right' => __('Squared right','darkone'),
'rounded-right' => __('Rounded right','darkone'),
'clean-left' => __('Clean left','darkone'),
'squared-left' => __('Squared left','darkone'),
'rounded-left' => __('Rounded left','darkone')
)
),
'text_color' => array(
'type' => 'color',
'label' => __('Text:','darkone'),
'std' => $opts['text_color']
),
'main_color' => array(
'type' => 'color',
'label' => __('Main:','darkone'),
'std' => $opts['main_color'],
'hide_if' => array(
'style' => array('darkone')
)
),
'fixed_height' => array(
'type' => 'checkbox',
'label' => __('Fixed height','darkone'),
'desc' => __('if desabled height will vary due to content height','darkone'),
'std' => 'true'
)
)
),
'group_title_colors' => array(
'type' => 'collapsible',
'label' => __('Title Colors','darkone'),
'open' => 'true',
'options' => array(
'title_color' => array(
'type' => 'color',
'label' => __('Title','darkone'),
'std' => $opts['title_color']
),
'title_active_color' => array(
'type' => 'color',
'label' => __('Active Title:','darkone'),
'std' => $opts['main_color'],
'hide_if' => array(
'style' => array('clean-right', 'clean-left', 'squared-left', 'rounded-left')
)
)
)
),
'group_trigger_colors' => array(
'type' => 'collapsible',
'label' => __('Trigger Colors','darkone'),
'open' => 'true',
'options' => array(
'trigger_color' => array(
'type' => 'color',
'label' => __('Trigger:','darkone'),
'std' => $opts['light_back_color']
),
'trigger_active_color' => array(
'type' => 'color',
'label' => __('Trigger active:','darkone'),
'std' => $opts['main_color']
)
)
),
'group_background_colors' => array(
'type' => 'collapsible',
'label' => __('Background Colors','darkone'),
'open' => 'true',
'options' => array(
'back_color' => array(
'type' => 'color',
'label' => __('Background:','darkone'),
'std' => ''
),
'border_color' => array(
'type' => 'color',
'label' => __('Border:','darkone'),
'std' => $opts['light_border_color']
)
)
),
'group_accordion_elements' => array(
'type' => 'collapsible',
'label' => __('Accordion Elements','darkone'),
'open' => 'true',
'options' => array(
'sortable' => array(
'type' => 'sortable',
'desc' => __('Elements are sortable','darkone'),
'item_name' => __('accordion item','darkone'),
'label_width' => 0,
'control_width' => 1,
'std' => array(
'items' => array(
0 => array(
'title' => 'Lorem ipsum',
'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
'image' => '',
'active' => 'true'
),
1 => array(
'title' => 'Lorem ipsum',
'content' => 'Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.',
'image' => '',
'active' => 'false'
),
2 => array(
'title' => 'Lorem ipsum',
'content' => 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
'image' => '',
'active' => 'false'
)
),
'order' => array(
0 => 0,
1 => 1,
2 => 2
)
),
'options'=> array(
'title' => array(
'type' => 'input',
'label_width' => 0.25,
'control_width' => 0.75,
'label' => __('Title:','darkone')
),
'content' => array(
'type' => 'textarea'
),
'image' => array(
'type' => 'image',
'label_width' => 0.25,
'control_width' => 0.75,
'label' => __('Image:','darkone'),
'desc' => __('Add an image to accordion content','darkone')
),
'active' => array(
'type' => 'checkbox',
'label' => __('Active','darkone'),
'desc' => __('Only one panel can be active at a time, so be sure to uncheck the others for it to work properly','darkone')
)
)
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
/* -------------------------------------------------------------------------------- */
/* DARKONE PROGRESS BAR */
/* -------------------------------------------------------------------------------- */
$dlshort_progbar = array(
'darkone_progress_bar' => array(
'type' => 'draggable',
'text' => __('Progress Bar','darkone'),
'icon' => get_template_directory_uri() . '/images/fbuilder/progress-bar.png',
'function' => 'darkone_progress_bar',
'group' => __('Charts, Bars, Counters', 'darkone'),
'options' => array_merge(
array(
'group_progsbar' => array(
'type' => 'collapsible',
'label' => __('Progress Bar','darkone'),
'open' => 'true',
'options' => array(
'title' => array(
'type' => 'input',
'label' => __('Title:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'Title'
),
'per_cent' => array(
'type' => 'number',
'label' => __('Value:','darkone'),
'half_column' => 'true',
'std' => 50,
'min' => 0,
'max' => 100,
'unit' => '%'
),
)
),
'group_colors' => array(
'type' => 'collapsible',
'label' => __('Colors','division'),
'open' => 'true',
'options' => array(
'back_color' => array(
'type' => 'color',
'label' => __('Back color:','division'),
'std' => $opts['light_back_color']
),
'front_color' => array(
'type' => 'color',
'label' => __('Front color:','division'),
'std' => $opts['main_color']
),
'title_color' => array(
'type' => 'color',
'label' => __('Tag color:','division'),
'std' => $opts['title_color']
),
'arrow_color' => array(
'type' => 'color',
'label' => __('Tag color:','division'),
'std' => $opts['dark_back_color']
),
'arrow_text_color' => array(
'type' => 'color',
'label' => __('Tag color:','division'),
'std' => $opts['light_back_color']
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
/* -------------------------------------------------------------------------------- */
/* DARKONE INSERT POSTS */
/* -------------------------------------------------------------------------------- */
$dlshort_insposts = array(
'darkone_insert_posts' => array(
'type' => 'draggable',
'text' => __('Posts','darkone'),
'icon' => get_template_directory_uri() . '/images/fbuilder/insered-posts.png',
'function' => 'darkone_insert_posts',
'group' => __('Content', 'frontent-builder'),
'options' => array_merge(
array(
'group_insposts' => array(
'type' => 'collapsible',
'label' => __('Posts','darkone'),
'open' => 'true',
'options' => array(
'category' => array(
'type' => 'select',
'label' => __('Category:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => '-1',
'options' => $darkone_ready_categories,
'search' => 'true',
'multiselect' => 'true'
),
'title' => array(
'type' => 'input',
'label' => __('Title:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => __('Previous/Next Posts','darkone')
),
'type' => array(
'type' => 'select',
'label' => __('Columns','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => '2',
'options' => array (
'0' => '1',
'1' => '2',
'2' => '3',
'3' => '4',
'4' => '5'
)
),
'rows' => array(
'type' => 'input',
'label' => __('Rows:','darkone'),
'label_width' => 0.25,
'control_width' => 0.25,
'std' => 1
),
'orderby' => array(
'type' => 'select',
'label' => __('Sort by:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'date',
'options' => array (
'comment_count'=> __('By Comment Count', 'darkone'),
'date'=> __('By Date', 'darkone'),
'title'=> __('By Title', 'darkone'),
'rand'=> __('Random', 'darkone')
)
),
'order' => array(
'type' => 'select',
'label' => __('Order:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'DESC',
'options' => array (
'ASC'=> __('Ascendic', 'darkone'),
'DESC'=> __('Descendic', 'darkone')
)
),
'excerpt_lenght' => array(
'type' => 'number',
'min' => 0,
'label' => __('Excerpt:','darkone'),
'half_column' => 'true',
'max' => 999,
'std' => 128,
'unit' => ''
),
'ajax' => array(
'type' => 'checkbox',
'std' => 'true',
'label' => __('Ajax Load','darkone'),
'half_column' => 'true'
),
'pagination' => array(
'type' => 'checkbox',
'label' => __('Show Pagination','darkone'),
'std' => 'true',
'half_column' => 'true'
),
'ignoresticky' => array(
'type' => 'checkbox',
'std' => 'true',
'label' => __('Ignore Sticky Posts','darkone')
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
/* -------------------------------------------------------------------------------- */
/* DARKONE PORTFOLIO */
/* -------------------------------------------------------------------------------- */
$dlshort_portfolio = array(
'darkone_portfolio' => array(
'type' => 'draggable',
'text' => __('Portfolio','darkone'),
'icon' => get_template_directory_uri() . '/images/fbuilder/insert-portfolio.png',
'function' => 'darkone_portfolio',
'group' => __('Content', 'frontent-builder'),
'options' => array_merge(
array(
'group_portfolio' => array(
'type' => 'collapsible',
'label' => __('Portfolio','darkone'),
'open' => 'true',
'options' => array(
'category' => array(
'type' => 'select',
'label' => __('Category:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => '-1',
'options' => $darkone_ready_categories,
'search' => 'true',
'multiselect' => 'true'
),
'type' => array(
'type' => 'select',
'label' => __('Columns:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => '3',
'options' => array (
'1' => '2',
'2' => '3',
'3' => '4',
'4' => '5'
)
),
'rows' => array(
'type' => 'input',
'label' => __('Rows:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 5
),
'orderby' => array(
'type' => 'select',
'label' => __('Sort by:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'date',
'options' => array (
'comment_count'=> __('By Comment Count', 'darkone'),
'date'=> __('By Date', 'darkone'),
'title'=> __('By Title', 'darkone'),
'rand'=> __('Random', 'darkone')
)
),
'order' => array(
'type' => 'select',
'label' => __('Order:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'DESC',
'options' => array (
'ASC'=> __('Ascendic', 'darkone'),
'DESC'=> __('Descendic', 'darkone')
)
),
'trans_effect' => array(
'type' => 'select',
'label' => __('Animation:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'snake',
'options' => array (
'snake'=> __('Snake', 'darkone'),
'fade'=> __('Rows', 'darkone')
)
),
'top_pagination' => array(
'type' => 'checkbox',
'std' => 'true',
'label' => __('Show Categories','darkone')
),
'top_align' => array(
'type' => 'select',
'label' => __('Categories Alignment','darkone'),
'std' => 'left',
'options' => array (
'left'=> __('left', 'darkone'),
'center'=> __('center', 'darkone'),
'right'=> __('right', 'darkone')
)
),
'ajax' => array(
'type' => 'checkbox',
'std' => 'true',
'half_column' => 'true',
'label' => __('Ajax Load','darkone')
),
'pagination' => array(
'type' => 'checkbox',
'std' => 'true',
'half_column' => 'true',
'label' => __('Show Pagination','darkone')
),
'ignoresticky' => array(
'type' => 'checkbox',
'std' => 'true',
'label' => __('Ignore Sticky Posts','darkone')
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
/* -------------------------------------------------------------------------------- */
/* DARKONE POST SLIDER */
/* -------------------------------------------------------------------------------- */
$dlshort_postslider = array(
'darkone_slider' => array(
'type' => 'draggable',
'text' => __('Post Slider','darkone'),
'icon' => get_template_directory_uri() . '/images/fbuilder/post-slider.png',
'function' => 'darkone_slider',
'group' => __('Content', 'frontent-builder'),
'options' => array_merge(
array(
'group_postslider' => array(
'type' => 'collapsible',
'label' => __('Post Slider','darkone'),
'open' => 'true',
'options' => array(
'category' => array(
'type' => 'select',
'label' => __('Select categories. Use CTRL+Click to select multiple categories.','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => '-1',
'options' => $darkone_ready_categories,
'search' => 'true',
'multiselect' => 'true'
),
'orderby' => array(
'type' => 'select',
'label' => __('Sort by:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'date',
'options' => array (
'comment_count'=> __('By Comment Count', 'darkone'),
'date'=> __('By Date', 'darkone'),
'title'=> __('By Title', 'darkone'),
'rand'=> __('Random', 'darkone')
)
),
'order' => array(
'type' => 'select',
'label' => __('Order:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => 'DESC',
'options' => array (
'ASC'=> __('Ascendic', 'darkone'),
'DESC'=> __('Descendic', 'darkone')
)
),
'post_count' => array(
'type' => 'number',
'label' => __('Posts','darkone'),
'half_column' => 'true',
'std' => '',
'std' => 5,
'min' => 1,
'max' => 100
),
'slides' => array(
'type' => 'number',
'label' => __('Per View','darkone'),
'half_column' => 'true',
'std' => '',
'std' => 3,
'min' => 1,
'max' => 5
),
'ignoresticky' => array(
'type' => 'checkbox',
'std' => 'true',
'label' => __('Ignore Sticky Posts','darkone')
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
/* -------------------------------------------------------------------------------- */
/* DARKONE TEAM */
/* -------------------------------------------------------------------------------- */
$dlshort_team = array(
'darkone_team' => array(
'type' => 'draggable',
'text' => __('Team','darkone'),
'icon' => get_template_directory_uri() . '/images/fbuilder/team.png',
'function' => 'darkone_team',
'group' => __('Content', 'frontent-builder'),
'options' => array_merge(
array(
'group_team' => array(
'type' => 'collapsible',
'label' => __('Team','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'open' => 'true',
'options' => array(
'user' => array(
'type' => 'select',
'label' => __('User:','darkone'),
'std' => '1',
'options' => $darkone_ready_contacts,
'search' => 'true'
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
/* -------------------------------------------------------------------------------- */
/* DARKONE CONTACT FORM */
/* -------------------------------------------------------------------------------- */
$dlshort_contactform = array(
'darkone_contactform' => array(
'type' => 'draggable',
'text' => __('Contact Form','darkone'),
'icon' => get_template_directory_uri() . '/images/fbuilder/contact-form.png',
'function' => 'darkone_contactform',
'group' => __('Content', 'frontent-builder'),
'options' => array_merge(
array(
'group_contactform' => array(
'type' => 'collapsible',
'label' => __('Contact Form','darkone'),
'open' => 'true',
'options' => array(
'users' => array(
'type' => 'select',
'label' => __('Users:','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'options' => $darkone_ready_contacts,
'search' => 'true',
'multiselect' => 'true'
)
)
)
),
$classControl,
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
),
$animationControl
)
)
);
$darkone_shortcodes = array_merge($testimonials, $tabs, $accordion, $dlshort_contactform, $dlshort_insposts, $dlshort_portfolio, $dlshort_postslider, $dlshort_progbar, $dlshort_team);
if ( isset($fbuilder) ) {
$fbuilder->add_new_shortcodes($darkone_shortcodes);
}
$revsliders = array();
if ( DARKONE_REVSLIDER === true ) {
global $wpdb;
$get_sliders = $wpdb->get_results('SELECT * FROM '.$wpdb->prefix.'revslider_sliders');
if( $get_sliders ) {
$default = $get_sliders[0]->alias;
foreach( $get_sliders as $slider ) {
$revsliders[$slider->alias] = $slider->title;
}
}
else {
$default = array( 1 => __('No sliders set.', 'darkone') );
}
$revolution_slider = array (
'darkone_revslider' => array(
'type' => 'draggable',
'text' => __('Revolution Slider','darkone'),
'icon' => get_template_directory_uri() . '/images/fbuilder/revolution-slider.png',
'function' => 'darkone_revslider',
'group' => __('Content', 'darkone'),
'options' => array(
'slider' => array(
'type' => 'select',
'label' => __('Select slider','darkone'),
'label_width' => 0.25,
'control_width' => 0.75,
'std' => $default,
'options' => $revsliders
)
),
array(
'group_general' => array(
'type' => 'collapsible',
'label' => __('General','darkone'),
'options' => array(
'bot_margin' => array(
'type' => 'number',
'label' => __('Bottom margin:','darkone'),
'std' => $opts['bottom_margin'],
'unit' => 'px'
)
)
)
)
)
);
if ( isset($fbuilder) ) { $fbuilder->add_new_shortcodes($revolution_slider); }
}
// [darkone_team]
if ( !function_exists( 'darkone_team' ) ) :
function darkone_team( $atts, $content = null ) {
extract( shortcode_atts( array(
'user' => 1,
'bot_margin' => 36,
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ) );
global $darkone_data;
$bot_margin = (int)$bot_margin;
$out = '';
if ( is_array( $darkone_data['contact'] ) ) $contacts = $darkone_data['contact']; else return;
$users_array = explode( ',', $user );
if ( !is_array ( $users_array ) ) { $users_array[] = $user; }
$counter = 0;
$counter_clear = 0;
$out = '';
foreach ( $contacts as $contact ) {
$counter++;
$contact_networks = $contact['contact'];
if ( in_array ( $counter, $users_array ) ) {
$counter_clear++;
$contact_name = $contact['name'];
$contact_description = $contact['description'];
$contact_url = $contact['url'];
$contact_job = $contact['job'];
$out .= '<div class="team_member_module"><div class="img_wrapper margin-bottom18 relative float_left"><img src="'.$contact_url.'" alt="image" class="maxfullwidth block" /><div class="shade"></div><div class="hover_element"><div class="vert_align_wrap_system"><nav><ul class="socials list_style text-center">';
foreach ( $contact_networks as $contact_network ) {
$out .= '<li><a href="'. $contact_network['socialnetworksurl'] .'" class="darkone_hover_color"><img width="24px" height="24px" src="' . get_bloginfo ( 'template_directory' ) . '/images/socialnetworks/' . $contact_network['socialnetworks'] . '" class="block" /></a></li>';
}
$out .= sprintf ('</ul></nav></div></div></div><div class="clearfix"></div><h6 class="darkone_header_font">%2$s</h6><h3 class="darkone_theme_color">%1$s</h3><div class="text">%3$s</div><div class="clearfix"></div></div>', $contact_name, $contact_job, $contact_description );
}
}
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html_animated = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$out.'</div>';
return $html_animated;
}
endif;
// [darkone_insert_posts]
if ( !function_exists( 'darkone_insert_posts' ) ) :
function darkone_insert_posts( $atts, $content = null ) {
extract( shortcode_atts( array(
'title' => 'Title',
'type' => 1,
'category' => "-1",
'rows' => 1,
'orderby' => 'date',
'ajax' => 'no',
'order' => 'DESC',
'pagination' => 'yes',
'ignoresticky' => 1,
'excerpt_lenght' => 128,
'bot_margin' => 36,
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ) );
$out = '';
$post_counter = 0;
$add_class = '';
$bot_margin = (int)$bot_margin;
$margin = ' style="margin-bottom:'.$bot_margin.'px"';
if ( $ajax == 'true' ) $ajax = 'yes'; else $ajax = 'no';
if ( $pagination == 'true' ) $pagination = 'yes';
if ( $ignoresticky == 'false' ) $ignoresticky = 0; else $ignoresticky = 1;
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; }
if ( $ajax == 'yes' ) $paged = 1;
switch ($type) {
case 0 :
$columns = 1;
$image_size = 'darkone-portfolio';
break;
case 1 :
$columns = 2;
$image_size = 'darkone-portfolio';
break;
case 2 :
$columns = 3;
$image_size = 'darkone-portfolio';
break;
case 3 :
$columns = 4;
$image_size = 'darkone-portfolio';
break;
case 4 :
$columns = 5;
$image_size = 'darkone-portfolio';
break;
default :
die( __('No type set', 'darkone') );
}
$words = $excerpt_lenght;
$query_string = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => $columns * $rows,
'paged' => $paged,
'orderby' => $orderby,
'order' => $order,
'ignore_sticky_posts' => $ignoresticky
);
if ( $category !== "-1" ){
$query_string = $query_string + array(
'cat' => $category
);
}
$query_string_ajax = http_build_query($query_string);
$darkone_posts = new WP_Query( $query_string );
$count = $darkone_posts->post_count;
if ( $darkone_posts->have_posts() ) :
if ( $pagination == 'yes' ) { if ( darkone_mini_pagination($darkone_posts->max_num_pages, $paged, 3, $ajax, $title) ) { $out .= darkone_mini_pagination($darkone_posts->max_num_pages, $paged, 3, $ajax, $title); } else { $out .= ''; } } else { $out .= ''; }
$out .= "<div class='blog_content darkone_type_{$type}' data-string='{$query_string_ajax}' data-shortcode='{$words}|{$bot_margin}|{$title}'{$margin}>";
$out .= '<div class="separate-post-column anivia_row margin-top24 fbuilder_row"><div>';
while( $darkone_posts->have_posts() ): $darkone_posts->the_post();
$feat_area = '';
$post_counter++;
if ( $ignoresticky == 0 && is_sticky() ) $sticky_icon = '<i class="fa fa-pushpin"></i> '; else $sticky_icon = '';
if ( $add_class !== '' ) $out .= '</div></div><div class="separate-post-column anivia_row margin-top36 fbuilder_row"><div>';
$out .= '<div class=" '.implode(' ', get_post_class()).' fbuilder_column fbuilder_column-1-'.$columns.'"><div class="headline_highlighted_column_block">';
$out .= darkone_get_featarea($image_size);
$timecode = get_the_date();
$heading = '<div class="darkone_posts_meta uppercase"><div class="darkone_div_category_meta inline-block a-inherit">'.get_the_category_list( ', ' ).'</div>; <div class="darkone_div_author_meta inline-block a-inherit">'.__('by', 'anivia').' '.get_the_author_link().'</div></div>';
$heading .= '<h4 class="darkone_blog_title uppercase darkone_theme_color"><a href="'.get_permalink().'">'.$sticky_icon.get_the_title().'</a></h4>';
$out .= ( $type == 0 ? $heading . $feat_area : $feat_area . $heading );
if ( $words !== '0 ' ) {
$excerpt = get_the_excerpt();
$out .= '<div class="text margin-top6 margin-bottom6">'. darkone_string_limit_words( $excerpt, $words ).'</div>';
}
$out .= '</div></div>';
if ( $post_counter == $columns ){
$post_counter = 0;
$add_class = 'new_row';
}
else {
$add_class = '';
}
endwhile;
$out .= '</div></div>';
$out .= '<div class="clearfix"></div>';
endif;
$out .= '</div>';
wp_reset_query();
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html_animated = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="darkone_div_inherit_width darkone_div_touch_optimized '.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$out.'</div>';
return $html_animated;
}
endif;
// [darkone_title]
if ( !function_exists( 'darkone_title' ) ) :
function darkone_title( $atts, $content = null ) {
extract( shortcode_atts( array(
'align' => 'center',
'type' => 'h3',
'bot_margin' => 24,
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ) );
$bot_margin = (int)$bot_margin;
$margin = ' style="padding-bottom:'.$bot_margin.'px"';
$out = sprintf( '<%3$s class="darkone_title darkone_header_font text-%2$s">%1$s</%3$s>', $content, $align, $type );
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html_animated = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$out.'</div>';
return $html_animated;
}
endif;
// [darkone_revslider]
if ( !function_exists( 'darkone_revslider' ) ) :
function darkone_revslider( $atts, $content = null ) {
extract( shortcode_atts( array(
'slider' => '',
'bot_margin' => 36
), $atts ) );
if ( $slider == '' ) echo 'Please set slider.';
return do_shortcode('[rev_slider '.$slider.']' );
}
endif;
// [darkone_contactform]
if ( !function_exists( 'darkone_contactform' ) ) :
function darkone_contactform( $atts, $content = null ) {
extract( shortcode_atts( array(
'users' => 1,
'bot_margin' => 36,
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ) );
$bot_margin = (int)$bot_margin;
$out = '';
$out .= darkone_contact_form( $users, '' );
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html_animated = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$out.'</div>';
return $html_animated;
}
endif;
// [fbuilder_accordion_alt]
if ( !function_exists( 'fbuilder_accordion_alt' ) ) :
function fbuilder_accordion_alt ( $atts, $content=null ) {
extract (shortcode_atts( array(
'active' => '',
'title' => '',
'image' => '',
'style' => 'darkone',
'fixed_height' => 'true',
'bot_margin' => 24,
'title_color' => '#376a6e',
'text_color' => '#376a6e',
'trigger_color' => '#376a6e',
'title_active_color' => '#376a6e',
'trigger_active_color' => '#376a6e',
'main_color' => '#27a8e1',
'border_color' => '#376a6e',
'back_color' => '',
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ));
$content = nl2br($content);
$styled = $style;
$styleArray = array('darkone', 'clean-right', 'squared-right', 'rounded-right', 'clean-left', 'squared-left', 'rounded-left');
if(!in_array($style,$styleArray)) $style = 'clean-right';
$title = explode('|', $title);
$content = explode('|', $content);
$active = explode('|', $active);
$image = explode('|', $image);
if($border_color == '') $border_color = 'transparent';
if($back_color == '') $back_color = 'transparent';
$randomId = rand();
if ( $styled !== 'darkone' ) :
$html = '
<style>
#frb_accordion_'.$randomId.' {border-bottom-color:'.$border_color.';}
#frb_accordion_'.$randomId.' h3 {color:'.$title_color.'; background:'.$back_color.'; border-top-color:'.$border_color.'; border-left-color:'.$border_color.';}
#frb_accordion_'.$randomId.' h3 .frb_accordion_trigger{color:'.$trigger_color.'; background:'.$back_color.';}
#frb_accordion_'.$randomId.' h3.ui-state-active {color:'.$title_active_color.';}
#frb_accordion_'.$randomId.' h3.ui-state-active .frb_accordion_trigger{color:'.$trigger_active_color.';}
#frb_accordion_'.$randomId.' div {color:'.$text_color.'; background:'.$back_color.';}
#frb_accordion_'.$randomId.' h3.ui-accordion-header-active{'.($style == 'squared-right' || $style == 'rounded-right' ? 'background:'.$main_color.';' : 'color:'.$main_color.';').' border-left-color:'.$main_color.';}
#frb_accordion_'.$randomId.' h3.ui-accordion-header-active .frb_accordion_trigger{'.($style == 'squared-left' || $style == 'rounded-left' ? 'background:'.$main_color.';':'').'}
#frb_accordion_'.$randomId.' div.ui-accordion-content-active{'.($style == 'squared-right' || $style == 'rounded-right' ? 'background:'.$main_color.';' : '').' border-left-color:'.$main_color.';}
</style>';
else :
$html = '
<style>
#frb_accordion_'.$randomId.' {border-bottom-color:'.$border_color.';}
#frb_accordion_'.$randomId.' h3 {color:'.$title_color.'; background:'.$back_color.'; border-top-color:'.$border_color.'; border-left-color:'.$border_color.';}
#frb_accordion_'.$randomId.' h3 .frb_accordion_trigger:after {background:'.$trigger_color.';}
#frb_accordion_'.$randomId.' h3.ui-state-active {color:'.$title_active_color.';}
#frb_accordion_'.$randomId.' div {color:'.$text_color.'; background:'.$back_color.';}
#frb_accordion_'.$randomId.' h3.ui-state-active .frb_accordion_trigger:after {background:'.$trigger_active_color.';}
</style>';
endif;
$html .= '<div id="frb_accordion_'.$randomId.'" class="frb_accordion frb_accordion_'.$style.'" data-fixedheight="'.$fixed_height.'">';
if(is_array($title) && is_array($content)){
for($i=0; $i<count($title); $i++) {
$html .= '<h3'.($active[$i] == 'true' ? ' class="ui-state-active"' : '').' >'.$title[$i].'<span class="frb_accordion_trigger"></span></h3>';
$image[$i] = ($image[$i] != '' ? '<img style="float:left; margin-right:10px;" src="'.$image[$i].'" alt="" />' : '');
$html .= '<div style="">'.$image[$i].$content[$i].'<div style="clear:both;"></div></div>';
}
}
$html .='</div>';
$bot_margin = (int)$bot_margin;
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.(do_shortcode($html)).'</div>';
return $html;
}
endif;
remove_shortcode( 'fbuilder_accordion' );
add_shortcode( 'fbuilder_accordion', 'fbuilder_accordion_alt' );
// [fbuilder_tabs_alt]
if ( !function_exists( 'fbuilder_tabs_alt' ) ) :
function fbuilder_tabs_alt ( $atts, $content=null ) {
extract (shortcode_atts( array(
'active' => '',
'title' => '',
'image' => '',
'style' => 'clean',
'bot_margin' => 24,
'title_color' => '#376a6e',
'text_color' => '#376a6e',
'active_tab_title_color' => '#376a6e',
'active_tab_border_color' => '#27a8e1',
'border_color' => '#ebecee',
'tab_back_color' => '#376a6e',
'back_color' => '#f4f4f4',
'class' => '',
'custom_id' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ));
$content = nl2br($content);
$styled = $style;
$styleArray = array('darkone', 'clean', 'squared', 'rounded');
if(!in_array($style,$styleArray)) $style = 'clean';
$title = explode('|', $title);
$content = explode('|', $content);
$active = explode('|', $active);
$image = explode('|', $image);
$custom_id = explode('|', $custom_id);
if($border_color == '') $border_color = 'transparent';
if($back_color == '') $back_color = 'transparent';
$randomId = rand();
if ( $styled !== 'darkone' ) :
$html = '
<style>
#frb_tabs_'.$randomId.' .frb_tabs-content {
color:'.$text_color.';
border:2px solid '.$border_color.';
'.($style != 'clean' ? 'background:'.$back_color.';' :'').'
}
#frb_tabs_'.$randomId.' ul:first-child a {
color:'.$title_color.';
'.($style != 'clean' ? '
background:'.$tab_back_color.';':'').'
}
#frb_tabs_'.$randomId.' ul:first-child a.active{
'.($style != 'clean' ? '
background:'.$back_color.';
color:'.$active_tab_title_color.';
border-top:2px solid '.$active_tab_border_color.';
padding-bottom:10px !important;
margin-top:-2px !important' : '
padding-bottom:10px !important;
border-bottom:2px solid '.$active_tab_border_color.';').'
}
#frb_tabs_'.$randomId.' ul:first-child a:hover{
'.($style != 'clean' ? '
background-color:'.$back_color.';
color:'.$active_tab_title_color.';
border-top:2px solid '.$active_tab_border_color.';
padding-bottom:10px !important;
margin-top:-2px !important;
transition: border-top-color 300ms, background-color 300ms;
-webkit-transition: border-top-color 300ms, background-color 300ms;' : '
padding-bottom:10px !important;
border-bottom:2px solid '.$active_tab_border_color.';
transition: border-bottom-color 300ms;
-webkit-transition: border-bottom-color 300ms;').'
}
'.($style == 'rounded' ? '
#frb_tabs_'.$randomId.' ul:first-child li:first-child a {
border-radius:5px 0 0 0;
}
#frb_tabs_'.$randomId.' ul:first-child li:last-child a {
border-radius:0 5px 0 0;
}
': '').'
</style>';
else :
$html = '
<style>
#frb_tabs_'.$randomId.' .frb_tabs-content {
color:'.$text_color.';
background: '.$tab_back_color.';
}
#frb_tabs_'.$randomId.' ul:first-child a {
color:'.$title_color.';
}
#frb_tabs_'.$randomId.' ul:first-child a.active{
color:'.$active_tab_title_color.';
}
#frb_tabs_'.$randomId.' ul:first-child a.active:after {
border-top-color:'.$active_tab_border_color.' !important;
}
#frb_tabs_'.$randomId.' ul:first-child a.active {
background:'.$active_tab_border_color.';
}
#frb_tabs_'.$randomId.' ul:first-child a {
background:'.$tab_back_color.';
}
</style>';
endif;
$html .= '<div id="frb_tabs_'.$randomId.'" class="frb_tabs frb_tabs_'.$styled.'"><ul>';
if(is_array($title) && is_array($content)){
for($i=0; $i<count($title); $i++) {
$html .='<li><a href="'.(isset($custom_id[$i]) && $custom_id[$i] != '' ? '#'.$custom_id[$i] : '#frb_tabs_'.$randomId.'_'.$i).'"'.($active[$i] == 'true' ? ' class="active"' : '').'>'.$title[$i].'</a></li>';
}
}
$html .='</ul><div style="clear:both;"></div>';
if(is_array($title) && is_array($content)){
for($i=0; $i<count($title); $i++) {
$image[$i] = ($image[$i] != '' ? '<img style="float:left; margin-right:10px;" src="'.$image[$i].'" alt="" />' : '');
$html .= '<div id="'.(isset($custom_id[$i]) && $custom_id[$i] != '' ? $custom_id[$i] : 'frb_tabs_'.$randomId.'_'.$i).'" class="frb_tabs-content">'.$image[$i].$content[$i].'<div style="clear:both;"></div></div>';
}
}
$html .='</div>';
$bot_margin = (int)$bot_margin;
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.(do_shortcode($html)).'</div>';
return $html;
}
endif;
remove_shortcode( 'fbuilder_tabs' );
add_shortcode( 'fbuilder_tabs', 'fbuilder_tabs_alt' );
// [fbuilder_tabs_alt]
if ( !function_exists( 'fbuilder_testimonials_alt' ) ) :
function fbuilder_testimonials_alt ( $atts, $content=null ) {
extract (shortcode_atts( array(
'name' => 'John Dough',
'profession' => 'photographer / fashion interactive',
'quote' => 'lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
'url' => '',
'image' => '',
'style' => 'clean',
'bot_margin' => 24,
'name_color' => '#376a6e',
'quote_color' => '#376a6e',
'back_color' => '',
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ));
$content = nl2br($content);
$randomId = rand();
$styled = '
<style>
#frb_testimonials_'.$randomId.':after {
border-top-color:'.($back_color != '' ? $back_color : 'transparent' ).' !important;
}
</style>';
$name_block = '<span class="frb_testimonials_name"><b'.($name_color != '' ? ' style="color:'.$name_color.'"' : '').'>'.$name.'</b>'.'<span'.($name_color != '' ? ' style="color:'.$name_color.'"' : '').'>'.$profession.'</span></span>';
if($image != ''){
$quote_block = '<div class="frb_testimonials_quote" '.($quote_color != '' ? 'style="color:'.$quote_color.'"' : '').'>'.$quote.'</div>';
$image = ($url != '' ? '<a href="'.$url.'"><img class="frb_testimonials_img" src="'.$image.'" alt=""/></a>' : '<img class="frb_testimonials_img" src="'.$image.'" alt=""/>');
$main_block = '<div class="frb_testimonials_main_block">'.$image.'</div>';
$html = '<div id="frb_testimonials_'.$randomId.'" class="frb_testimonials frb_testimonials_'.$style.'" style="'.($back_color != '' ? 'background:'.$back_color.';' : '').'">'.$quote_block.'</div>'.$main_block.$name_block;
}
else {
$quote_block = '<div class="frb_testimonials_quote'.($style == 'clean' ? ' frb_testimonials_quote_border' : '').'" style="'.($quote_color != '' ? 'color:'.$quote_color.';' : '').($main_color != '' ? ' border-color:'.$main_color.';' : '').'">'.$quote.'</div>';
$name_block = ($url != '' ? '<a href="'.$url.'">'.$name_block.'</a>' : $name_block);
$main_block = '<div class="frb_testimonials_main_block" style="'.($main_color != '' ? 'background:'.$main_color.'; border-color:'.$main_color.';' : '').'">'.$name_block.'</div>';
$html = '<div id="frb_testimonials_'.$randomId.'" class="frb_testimonials frb_testimonials_'.$style.'" style="'.($back_color != '' ? 'background:'.$back_color.';' : '').($main_color != '' ? ' border-color:'.$main_color.';' : '').'">'.$main_block.$quote_block.'</div>';
}
$bot_margin = (int)$bot_margin;
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html = $styled.'<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$html.'</div>';
return $html;
}
endif;
remove_shortcode( 'fbuilder_testimonials' );
add_shortcode( 'fbuilder_testimonials', 'fbuilder_testimonials_alt' );
// [darkone_progress_bar]
if ( !function_exists( 'darkone_progress_bar' ) ) :
function darkone_progress_bar( $atts, $content = null ) {
extract (shortcode_atts( array(
'title' => '',
'per_cent' => 50,
'back_color' => '',
'front_color' => '',
'arrow_color' => '',
'title_color' => '',
'arrow_text_color' => '',
'bot_margin' => 36,
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ));
$randomId = 'frb_darkone_div_prog_'.rand();
$bot_margin = (int)$bot_margin;
$per_cent = (int)$per_cent;
$out = '';
$script = '<script>
(function($){
$(document).ready(function(){
$(document).on("onscreen", "#'.$randomId.' .progress-done", function(){
$(this).css({"width": "'.$per_cent.'%", "opacity": 1});
});
});
})(jQuery);
</script>';
$style = '
<style>
#'.$randomId.' .progress-title {
color: '.$title_color.';
}
#'.$randomId.' .progress-full {
background-color: '.$back_color.';
}
#'.$randomId.' .progress-done {
background-color: '.$front_color.';
}
#'.$randomId.' .tag-place {
background-color: '.$arrow_color.';
color: '.$arrow_text_color.';
}
#'.$randomId.' .tag-place:after {
border-top-color: '.$arrow_color.';
}
</style>
';
$out .= $script . $style;
$out .= '<div id="'.$randomId.'" class="progers-bars-wrapper"><div class="progress-title darkone_header_font margin-bottom12">'.$title.'</div><div class="progress-full"><div class="progress-done frb_animated"><div class="progress-tag"><span class="tag-place">'.$per_cent.'%</span></div></div></div></div>';
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html_animated = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$out.'</div>';
return $html_animated;
}
endif;
// [darkone_post_pagination]
if ( !function_exists( 'darkone_post_pagination' ) ) :
function darkone_post_pagination( $atts, $content = null ) {
extract (shortcode_atts( array(
'previous' => __('Previous Post', 'darkone'),
'next' => __('Next Post', 'darkone'),
'category' => '-1',
'post_id' => '',
'ajax' => '',
'bot_margin' => 36,
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ));
global $post, $wp_query;
$wp_query->is_single = true;
$prev_link = '';
$next_link = '';
$categories = $category;
$cat_switch = explode(',', $category);
if ( $post === NULL ) {
$post = get_post( $post_id );
}
$bot_margin = (int)$bot_margin;
if ( $category !== '-1' && strpos($category, ',') == true ) :
$category = explode(',', $category);
foreach ($category as $cat) {
$child_cats = (array) get_term_children($cat, 'category');
$cat_switch = $cat_switch + $child_cats;
}
$category_ids = get_all_category_ids();
$exclude = implode(',', array_diff($category_ids, $cat_switch));
$next_post = get_next_post(false, $exclude);
$prev_post = get_previous_post(false, $exclude);
elseif ( strpos($category, ',') == false ) :
$category_ids = get_all_category_ids();
$exclude = implode(',', array_diff($category_ids, array($category)));
$next_post = get_next_post(false, $exclude);
$prev_post = get_previous_post(false, $exclude);
else :
$next_post = get_next_post(false);
$prev_post = get_previous_post(false);
endif;
if (!empty( $next_post )) {
if ( $ajax == 'yes') {
$ajax_fnc = ' onclick="darkone_ajaxload_portfolio_single_inner(jQuery(this), \''.$next_post->ID.'\'); return false;"';
}
$next_link = '<div class="inline-block a-inherit"><a href="'.get_permalink( $next_post->ID ).'"'.$ajax_fnc.'>'.$previous.'</a></div>';
}
else {
$next_link = '<div class="inline-block a-inherit not-active">'.$previous.'</div>';
}
if (!empty( $prev_post )){
if ( $ajax == 'yes') {
$ajax_fnc = ' onclick="darkone_ajaxload_portfolio_single_inner(jQuery(this), \''.$prev_post->ID.'\'); return false;"';
}
$prev_link = '<div class="inline-block a-inherit"><a href="'.get_permalink( $prev_post->ID ).'"'.$ajax_fnc.'>'.$next.'</a></div>';
}
else {
$prev_link = '<div class="inline-block a-inherit not-active">'.$next.'</div>';
}
$out = '';
if ( empty( $next_post ) && empty( $prev_post ) ) {
$next_link = '<div class="inline-block a-inherit not-active">'.$previous.'</div>';
$prev_link = '<div class="inline-block a-inherit not-active">'.$next.'</div>';
}
$out .= sprintf( '<div class="darkone_nav_element darkone_header_font"%3$s>
%1$s
%2$s
%4$s
</div>', $next_link, $prev_link, ' data-categories="'.$categories.'"', '<div id="darkone_port_close" class="float_right a-inherit"><a href="#"><i class="f-darkone-close"></i></a></div>');
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html_animated = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$out.'</div>';
return $html_animated;
}
endif;
// [darkone_portfolio]
if ( !function_exists( 'darkone_portfolio' ) ) :
function darkone_portfolio( $atts, $content = null ) {
extract( shortcode_atts( array(
'type' => 1,
'category' => "-1",
'rows' => 1,
'orderby' => 'date',
'ajax' => 'no',
'order' => 'DESC',
'top_pagination' => 'yes',
'top_align' => 'left',
'pagination' => 'yes',
'ignoresticky' => 1,
'trans_effect' => 'snake',
'bot_margin' => 36,
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ) );
$out = '';
$post_counter = 0;
$add_class = '';
$bot_margin = (int)$bot_margin;
$margin = ' style="margin-bottom:'.$bot_margin.'px"';
if ( $ajax == 'true' ) $ajax = 'yes'; else $ajax = 'no';
if ( $top_pagination == 'true' ) $top_pagination = 'yes';
if ( $pagination == 'true' ) $pagination = 'yes';
if ( $ignoresticky == 'false' ) $ignoresticky = 0; else $ignoresticky = 1;
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; }
if ( $ajax == 'yes' ) $paged = 1;
switch ($type) {
case 1 :
$columns = 2;
$image_size = 'darkone-portfolio';
break;
case 2 :
$columns = 3;
$image_size = 'darkone-portfolio';
break;
case 3 :
$columns = 4;
$image_size = 'darkone-portfolio';
break;
case 4 :
$columns = 5;
$image_size = 'darkone-portfolio';
break;
default :
die( __('No type set', 'darkone') );
}
$query_string = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => $columns * $rows,
'paged' => $paged,
'orderby' => $orderby,
'order' => $order,
'ignore_sticky_posts' => $ignoresticky
);
if ( $category !== "-1" ){
$query_string = $query_string + array(
'cat' => $category
);
}
$query_string_ajax = http_build_query($query_string);
$darkone_posts = new WP_Query( $query_string );
$count = $darkone_posts->post_count;
if ( $darkone_posts->have_posts() ) :
$out .= "<div class='darkone_spinner'><i class='fa fa-repeat fa-spin'></i></div>";
$out .= "<div class='darkone_portfolio_single_loader'></div>";
$out .= "<div class='portfolio_content darkone_portfolio_{$type}' data-string='{$query_string_ajax}' data-shortcode='{$bot_margin}|{$category}|{$top_pagination}|{$top_align}|{$trans_effect}|{$pagination}' data-columns='{$columns}'{$margin}>";
if ( $top_pagination == 'yes' ) {
$separate_categories = explode(',', $category);
$out .= '<div class="darkone_div_top_nav_wrap" data-category="'.$category.'"><ul class="darkone_container darkone_div_top_nav_cat a-inherit darkone_anim_'.$trans_effect.' text-'.$top_align.'">';
$sms_cnt = 0;
if ( count($separate_categories) > 1 && !array_search('-1', $separate_categories, true) ) {
$out .= sprintf( '<li class="darkone_div_ajax_port_selected"><a href="#" onclick="darkone_ajaxload_portfolio(jQuery(this)); return false;" data-cat="%2$s">%1$s</a></li>', __('All', 'darkone'), '-1' );
$sms_cnt++;
}
foreach ( $separate_categories as $category_loop ) {
$sms_cnt++;
$selected_class = ( $sms_cnt == 1 ? ' class="darkone_div_ajax_port_selected"' : '' );
if ( $category_loop == '-1' ) {
$category_unique = __('All', 'darkone');
$queried_category = '-1';
$out .= sprintf( '<li%3$s><a href="#" onclick="darkone_ajaxload_portfolio(jQuery(this)); return false;" data-cat="%2$s">%1$s</a></li>', $category_unique, $category_loop, $selected_class );
}
else {
$category_unique = get_cat_name( $category_loop );
$queried_category = sanitize_title($category_unique);
$out .= sprintf( '<li%3$s><a href="#" onclick="darkone_ajaxload_portfolio(jQuery(this)); return false;" data-cat="%2$s">%1$s</a></li>', $category_unique, $category_loop, $selected_class );
}
}
$out .= '</ul></div>';
}
$out .= '<div class="separate-portfolio-column anivia_row margin-top24 fbuilder_row text-left"><div>';
while( $darkone_posts->have_posts() ): $darkone_posts->the_post();
if ( has_post_thumbnail()) {
$cat = get_the_category();
if ( $ignoresticky == 0 && is_sticky() ) $sticky_icon = '<i class="fa fa-pushpin"></i> '; else $sticky_icon = '';
$out .= '<div class="darkone_div_ajax_col fbuilder_column fbuilder_column-1-'.$columns.'" data-type="'.sanitize_title($cat[0]->name).'">
<a href="'.get_permalink().'" rel="nofollow" onclick="darkone_ajaxload_portfolio_single(jQuery(this), \''.get_the_ID().'\'); return false;">';
$out .= sprintf('<div href="%1$s" class="margin-bottom36 darkone_hover">', get_permalink() );
$out .= get_the_post_thumbnail( get_the_ID(), $image_size, array('class' => sprintf('block')));
$out .= '<div class="darkone_hover_over"><div class="darkone_portfolio_meta darkone_header_font border-box">
<h4 class="darkone_portoflio_title uppercase darkone_theme_color">'.$sticky_icon.get_the_title().'</h4>
<div class="category_meta inline-block a-inherit uppercase">';
$post_categories = wp_get_post_categories( get_the_ID() );
$cats = array();
foreach($post_categories as $c){
$cat = get_category( $c );
$out .= $cat->name;
}
$out .= ';</div></div></div>';
$out .= sprintf('</div>' );
$out .= '</a></div>';
}
endwhile;
$out .= '</div></div>';
if ( $pagination == 'yes' ) { if ( darkone_pagination($darkone_posts->max_num_pages, $paged, 3, $ajax) ) { $out .= darkone_pagination($darkone_posts->max_num_pages, $paged, 3, $ajax); } else { $out .= ''; } } else { $out .= ''; }
$out .= '</div>';
endif;
wp_reset_query();
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html_animated = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="darkone_div_inherit_width darkone_div_touch_optimized '.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$out.'</div>';
return $html_animated;
}
endif;
// [darkone_slider]
if ( !function_exists( 'darkone_slider' ) ) :
function darkone_slider( $atts, $content = null ) {
extract( shortcode_atts( array(
'category' => "-1",
'post_count' => 10,
'slides' => 3,
'orderby' => 'date',
'order' => 'DESC',
'ignoresticky' => 1,
'bot_margin' => 36,
'class' => '',
'shortcode_id' => '',
'animate' => 'none',
'animation_delay' => 0,
'animation_group' => ''
), $atts ) );
$out = '';
$post_counter = 0;
$add_class = '';
$bot_margin = (int)$bot_margin;
if ( $ignoresticky == 'false' ) $ignoresticky = 0; else $ignoresticky = 1;
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; }
$query_string = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => $post_count,
'paged' => $paged,
'orderby' => $orderby,
'order' => $order,
'ignore_sticky_posts' => $ignoresticky
);
if ( $category !== "-1" ){
$query_string = $query_string + array(
'cat' => $category
);
}
$darkone_posts = new WP_Query( $query_string );
$count = $darkone_posts->post_count;
$out .= "<div class='darkone_slider_wrapper' data-slides='{$slides}'>";
if ( $darkone_posts->have_posts() ) :
$out .= "<div class='darkone_slider_content'>";
while( $darkone_posts->have_posts() ): $darkone_posts->the_post();
$post_counter++;
if ( $ignoresticky == 0 && is_sticky() ) $sticky_icon = '<i class="fa fa-pushpin"></i> '; else $sticky_icon = '';
$out .= '<div class="separate-slider-column">';
if ( has_post_thumbnail()) {
$out .= sprintf('<a class="darkone_div_slider_img" href="%1$s" rel="bookmark">', get_permalink() );
$out .= get_the_post_thumbnail( get_the_ID(), 'darkone-blog', array('class' => 'block'));
$out .= '</a>';
}
$out .= '<div class="darkone_slider_meta darkone_header_font uppercase"><h4 class="darkone_theme_color a-inherit margin-bottom6"><a href="'.get_permalink().'" rel="bookmark">'.$sticky_icon.get_the_title().'</a></h4><h6 class="category_meta a-inherit ">'.get_the_category_list( ', ' ).'</h6></div>';
$out .= '</div>';
endwhile;
$out .= '</div>';
endif;
$out .= '</div>';
wp_reset_query();
if($animate != 'none') {
$animate = ' frb_animated frb_'.$animate.'"';
if($animation_delay != 0) {
$animation_delay = (int)$animation_delay;
$animate .= ' data-adelay="'.$animation_delay.'"';
}
if($animation_group != '') {
$animate .= ' data-agroup="'.$animation_group.'"';
}
}
else
$animate = '"';
$html_animated = '<div '.($shortcode_id != '' ? 'id="'.$shortcode_id.'"' : '').' class="'.$class.$animate.' style="padding-bottom:'.$bot_margin.'px !important;">'.$out.'</div>';
return $html_animated;
}
endif;
// Init shortcodes
if ( !function_exists( 'darkone_shortcodes' ) ) :
function darkone_shortcodes() {
add_shortcode( 'darkone_progress_bar', 'darkone_progress_bar' );
add_shortcode( 'darkone_team', 'darkone_team' );
add_shortcode( 'darkone_contactform', 'darkone_contactform' );
add_shortcode( 'darkone_insert_posts', 'darkone_insert_posts' );
add_shortcode( 'darkone_title', 'darkone_title' );
add_shortcode( 'darkone_revslider', 'darkone_revslider' );
add_shortcode( 'darkone_post_pagination', 'darkone_post_pagination' );
add_shortcode( 'darkone_portfolio', 'darkone_portfolio' );
add_shortcode( 'darkone_slider', 'darkone_slider' );
}
endif;
add_action( 'init', 'darkone_shortcodes' );
?>