Example #1
0
/**
 * Less handler function for widgetimage function
 *
 * @param $url
 * @return string
 */
function origin_widgets_less_widgetimage($url)
{
    $the_url = '';
    foreach ($url[2] as $p) {
        if (is_string($p)) {
            $the_url .= $p;
        } elseif (is_array($p)) {
            $the_url .= $p[1];
        }
    }
    // Search for the appropriate image
    $return_url = '';
    foreach (SiteOrigin_Panels_Widget::get_image_folders() as $folder => $folder_url) {
        if (file_exists($folder . '/' . $the_url)) {
            $return_url = $folder_url . '/' . $the_url;
        }
    }
    if (is_ssl()) {
        $return_url = str_replace('http://', 'https://', $return_url);
    }
    return $return_url;
}
Example #2
0
 function __construct()
 {
     parent::__construct(__('Button ( Pootle )', 'siteorigin-panels'), array('description' => __('A simple button', 'siteorigin-panels'), 'default_style' => 'simple'), array(), array('text' => array('type' => 'text', 'label' => __('Text', 'siteorigin-panels')), 'url' => array('type' => 'text', 'label' => __('Destination URL', 'siteorigin-panels')), 'new_window' => array('type' => 'checkbox', 'label' => __('Open In New Window', 'siteorigin-panels')), 'align' => array('type' => 'select', 'label' => __('Button Alignment', 'siteorigin-panels'), 'options' => array('left' => __('Left', 'siteorigin-panels'), 'right' => __('Right', 'siteorigin-panels'), 'center' => __('Center', 'siteorigin-panels'), 'justify' => __('Justify', 'siteorigin-panels')))));
 }
Example #3
0
/**
 * Less handler function for widgetimage function
 *
 * @param $url
 * @return string
 */
function origin_widgets_less_widgetimage($url)
{
    $the_url = '';
    foreach ($url[2] as $p) {
        if (is_string($p)) {
            $the_url .= $p;
        } elseif (is_array($p)) {
            $the_url .= $p[1];
        }
    }
    // Search for the appropriate image
    foreach (SiteOrigin_Panels_Widget::get_image_folders() as $folder => $folder_url) {
        if (file_exists($folder . '/' . $the_url)) {
            return esc_url($folder_url . '/' . $the_url);
        }
    }
    return '';
}
 function __construct()
 {
     parent::__construct(__('Call To Action (PB)', 'siteorigin-panels'), array('description' => __('A Call to Action block', 'siteorigin-panels'), 'default_style' => 'simple'), array(), array('title' => array('type' => 'text', 'label' => __('Title', 'siteorigin-panels')), 'subtitle' => array('type' => 'text', 'label' => __('Sub Title', 'siteorigin-panels')), 'button_text' => array('type' => 'text', 'label' => __('Button Text', 'siteorigin-panels')), 'button_url' => array('type' => 'text', 'label' => __('Button URL', 'siteorigin-panels')), 'button_new_window' => array('type' => 'checkbox', 'label' => __('Open In New Window', 'siteorigin-panels'))));
     // We need the button style
     $this->add_sub_widget('button', __('Button', 'siteorigin-panels'), 'SiteOrigin_Panels_Widget_Button');
 }
Example #5
0
 function __construct()
 {
     parent::__construct(__('Testimonial (PB)', 'siteorigin-panels'), array('description' => __('Displays a bullet list of points', 'siteorigin-panels'), 'default_style' => 'simple'), array(), array('name' => array('type' => 'text', 'label' => __('Name', 'siteorigin-panels')), 'location' => array('type' => 'text', 'label' => __('Location', 'siteorigin-panels')), 'image' => array('type' => 'text', 'label' => __('Image', 'siteorigin-panels')), 'text' => array('type' => 'textarea', 'label' => __('Text', 'siteorigin-panels')), 'url' => array('type' => 'text', 'label' => __('URL', 'siteorigin-panels')), 'new_window' => array('type' => 'checkbox', 'label' => __('Open In New Window', 'siteorigin-panels'))));
 }
 function __construct()
 {
     parent::__construct(__('Animated Image (PB)', 'siteorigin-panels'), array('description' => __('An image that animates in when it enters the screen.', 'siteorigin-panels'), 'default_style' => 'simple'), array(), array('image' => array('type' => 'text', 'label' => __('Image URL', 'siteorigin-panels')), 'animation' => array('type' => 'select', 'label' => __('Animation', 'siteorigin-panels'), 'options' => array('fade' => __('Fade In', 'siteorigin-panels'), 'slide-up' => __('Slide Up', 'siteorigin-panels'), 'slide-down' => __('Slide Down', 'siteorigin-panels'), 'slide-left' => __('Slide Left', 'siteorigin-panels'), 'slide-right' => __('Slide Right', 'siteorigin-panels')))));
 }
Example #7
0
 function __construct()
 {
     parent::__construct(__('Price Box (PB)', 'siteorigin-panels'), array('description' => __('Displays a bullet list of elements', 'siteorigin-panels'), 'default_style' => 'simple'), array(), array('title' => array('type' => 'text', 'label' => __('Title', 'siteorigin-panels')), 'price' => array('type' => 'text', 'label' => __('Price', 'siteorigin-panels')), 'per' => array('type' => 'text', 'label' => __('Per', 'siteorigin-panels')), 'information' => array('type' => 'text', 'label' => __('Information Text', 'siteorigin-panels')), 'features' => array('type' => 'textarea', 'label' => __('Features Text', 'siteorigin-panels'), 'description' => __('Start each new point with an asterisk (*)', 'siteorigin-panels')), 'button_text' => array('type' => 'text', 'label' => __('Button Text', 'siteorigin-panels')), 'button_url' => array('type' => 'text', 'label' => __('Button URL', 'siteorigin-panels')), 'button_new_window' => array('type' => 'checkbox', 'label' => __('Open In New Window', 'siteorigin-panels'))));
     $this->add_sub_widget('button', __('Button', 'siteorigin-panels'), 'SiteOrigin_Panels_Widget_Button');
     $this->add_sub_widget('list', __('Feature List', 'siteorigin-panels'), 'SiteOrigin_Panels_Widget_List');
 }
Example #8
0
 function __construct()
 {
     parent::__construct(__('List ( Pootle )', 'siteorigin-panels'), array('description' => __('Displays a bullet list of elements', 'siteorigin-panels'), 'default_style' => 'simple'), array(), array('title' => array('type' => 'text', 'label' => __('Title', 'siteorigin-panels')), 'text' => array('type' => 'textarea', 'label' => __('Text', 'siteorigin-panels'), 'description' => __('Start each new point with an asterisk ( * )', 'siteorigin-panels'))));
 }