PHP apply_filters Examples

PHP apply_filters - 30 examples found. These are the top rated real world PHP examples of apply_filters extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
1
/**
 * This function outputs a 404 "Not Found" error message
 *
 * @since 1.6
 */
function genesis_404()
{
    echo genesis_html5() ? '<article class="entry">' : '<div class="post hentry">';
    printf('<h1 class="entry-title">%s</h1>', apply_filters('genesis_404_entry_title', __('Not found, error 404', 'genesis')));
    echo '<div class="entry-content">';
    if (genesis_html5()) {
        echo apply_filters('genesis_404_entry_content', '<p>' . sprintf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it by using the search form below.', 'genesis'), trailingslashit(home_url())) . '</p>');
        get_search_form();
    } else {
        ?>

			<p><?php 
        printf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it with the information below.', 'genesis'), trailingslashit(home_url()));
        ?>
</p>



	<?php 
    }
    if (!genesis_html5()) {
        genesis_sitemap('h4');
    } elseif (genesis_a11y('404-page')) {
        echo '<h2>' . __('Sitemap', 'genesis') . '</h2>';
        genesis_sitemap('h3');
    }
    echo '</div>';
    echo genesis_html5() ? '</article>' : '</div>';
}
Example #2
1
 /**
  * Get fonts URL.
  *
  * @return string
  */
 function educator_theme_fonts_url()
 {
     $fonts = array();
     $fonts[] = get_theme_mod('headings_font', 'Open Sans');
     $fonts[] = get_theme_mod('body_font', 'Open Sans');
     $font_families = array();
     $available_fonts = apply_filters('ib_theme_get_fonts', array());
     foreach ($fonts as $font_name) {
         if (isset($font_families[$font_name])) {
             continue;
         }
         if (isset($available_fonts[$font_name])) {
             $font = $available_fonts[$font_name];
             $font_families[$font_name] = urlencode($font_name);
             if (!empty($font['font_styles'])) {
                 $font_families[$font_name] .= ':' . $font['font_styles'];
             }
         }
     }
     if (empty($font_families)) {
         return false;
     }
     $query_args = array(array('family' => implode('|', $font_families)));
     $charater_sets = get_theme_mod('charater_sets', 'latin,latin-ext');
     if (!empty($charater_sets)) {
         $query_args['subset'] = educator_sanitize_character_sets($charater_sets);
     }
     return add_query_arg($query_args, '//fonts.googleapis.com/css');
 }
function friends_screen_requests()
{
    if (bp_is_action_variable('accept', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_accept_friendship');
        if (friends_accept_friendship(bp_action_variable(1))) {
            bp_core_add_message(__('Friendship accepted', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship could not be accepted', 'buddypress'), 'error');
        }
        bp_core_redirect(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action());
    } elseif (bp_is_action_variable('reject', 0) && is_numeric(bp_action_variable(1))) {
        // Check the nonce
        check_admin_referer('friends_reject_friendship');
        if (friends_reject_friendship(bp_action_variable(1))) {
            bp_core_add_message(__('Friendship rejected', 'buddypress'));
        } else {
            bp_core_add_message(__('Friendship could not be rejected', 'buddypress'), 'error');
        }
        bp_core_redirect(bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action());
    }
    do_action('friends_screen_requests');
    if (isset($_GET['new'])) {
        bp_core_delete_notifications_by_type(bp_loggedin_user_id(), 'friends', 'friendship_request');
    }
    bp_core_load_template(apply_filters('friends_template_requests', 'members/single/home'));
}
 /**
  * s2Member's PayPal Auto-Return/PDT handler (inner processing routine).
  *
  * @package s2Member\PayPal
  * @since 110720
  *
  * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
  * @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply.
  */
 public static function cp($vars = array())
 {
     extract($vars);
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_before_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     $paypal["s2member_log"][] = "No Return-Data. Customer MUST wait for Email Confirmation.";
     $paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering an Initial/Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only (i.e. behind-the-scene), and the Customer must wait for Email Confirmation in these cases.";
     $paypal["s2member_log"][] = var_export($_REQUEST, true);
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_during_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     if ($custom_success_redirection) {
         $paypal["s2member_log"][] = "Redirecting Customer to a custom URL: " . $custom_success_redirection . ".";
         wp_redirect($custom_success_redirection);
     } else {
         $paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after asking Customer to check their email).";
         echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! (you MUST check your email before proceeding).</strong><br /><br />* Note: It can take <em>(up to 15 minutes)</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/"));
     }
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     return apply_filters("c_ws_plugin__s2member_paypal_return_in_no_tx_data", $paypal, get_defined_vars());
 }
 /**
  * Widget
  *
  * @return   void
  * @since    1.0
  */
 function widget($args, $instance)
 {
     if (false == ($cache = get_transient('edd_widgets_archives'))) {
         // get the title and apply filters
         $title = apply_filters('widget_title', $instance['title'] ? $instance['title'] : '');
         // get show count boolean
         $show_count = isset($instance['show_count']) && $instance['show_count'] === 1 ? 1 : 0;
         // start collecting the output
         $out = "";
         // check if there is a title
         if ($title) {
             // add the title to the ouput
             $out .= $args['before_title'] . $title . $args['after_title'];
         }
         $out .= "<ul>\n";
         // add download post type to archives
         add_filter('getarchives_where', array(&$this, 'getarchives_where_filter'), 10, 2);
         add_filter('month_link', array($this, 'month_link'), 10, 3);
         // output the archives
         $out .= wp_get_archives(array('echo' => 0, 'show_post_count' => $show_count));
         // remove filter
         remove_filter('getarchives_where', array(&$this, 'getarchives_where_filter'), 10, 2);
         remove_filter('month_link', array($this, 'month_link'), 10, 3);
         // finish the list
         $out .= "</ul>\n";
         // set the widget's containers
         $cache = $args['before_widget'] . $out . $args['after_widget'];
         // store the result on a temporal transient
         set_transient('edd_widgets_archives', $cache);
     }
     echo $cache;
 }
 /**
  * Hook in tabs.
  */
 public function __construct()
 {
     if (apply_filters('woocommerce_enable_setup_wizard', true) && current_user_can('manage_woocommerce')) {
         add_action('admin_menu', array($this, 'admin_menus'));
         add_action('admin_init', array($this, 'setup_wizard'));
     }
 }
Example #7
0
    function widget($args, $instance)
    {
        $title = $instance['title'];
        $flickrid = $instance['flickrid'];
        $number = $instance['number'];
        echo ts_essentials_escape($args['before_widget']);
        if (!empty($title)) {
            echo ts_essentials_escape($args['before_title'] . apply_filters('widget_title', $title) . $args['after_title']);
        }
        ?>
		<div class="flickr ts-mfp-gallery">
            <ul id="<?php 
        echo esc_attr($args['widget_id']);
        ?>
-ul" class="flickr-widget clearfix"></ul>            
            <div><script type="text/javascript">jQuery(document).ready(function($){if ($.fn.jflickrfeed){jQuery('#<?php 
        echo esc_js($args['widget_id']);
        ?>
-ul').jflickrfeed({limit: <?php 
        echo absint($number);
        ?>
,qstrings: { id: '<?php 
        echo esc_js($flickrid);
        ?>
' }}, function(data){if(typeof(ts_magnificPopup)=="function"){ ts_magnificPopup()}})}});</script></div>
		</div>

		<?php 
        echo ts_essentials_escape($args['after_widget']);
    }
Example #8
0
 /**
  * Sets up theme defaults and registers support for various WordPress features.
  *
  * Note that this function is hooked into the after_setup_theme hook, which
  * runs before the init hook. The init hook is too late for some features, such
  * as indicating support for post thumbnails.
  */
 function activello_setup()
 {
     /*
      * Make theme available for translation.
      * Translations can be filed in the /languages/ directory.
      */
     load_theme_textdomain('activello', get_template_directory() . '/languages');
     // Add default posts and comments RSS feed links to head.
     add_theme_support('automatic-feed-links');
     /**
      * Enable support for Post Thumbnails on posts and pages.
      *
      * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
      */
     add_theme_support('post-thumbnails');
     add_image_size('activello-featured', 1170, 550, true);
     add_image_size('activello-slider', 1920, 550, true);
     add_image_size('activello-thumbnail', 330, 220, true);
     add_image_size('activello-medium', 640, 480, true);
     // This theme uses wp_nav_menu() in one location.
     register_nav_menus(array('primary' => esc_html__('Primary Menu', 'activello')));
     // Enable support for Post Formats.
     add_theme_support('post-formats', array('video', 'audio'));
     // Setup the WordPress core custom background feature.
     add_theme_support('custom-background', apply_filters('activello_custom_background_args', array('default-color' => 'FFFFFF', 'default-image' => '')));
     // Enable support for HTML5 markup.
     add_theme_support('html5', array('comment-list', 'search-form', 'comment-form', 'gallery', 'caption'));
     /*
      * Let WordPress manage the document title.
      * By adding theme support, we declare that this theme does not use a
      * hard-coded <title> tag in the document head, and expect WordPress to
      * provide it for us.
      */
     add_theme_support('title-tag');
 }
Example #9
0
 function widget($args, $instance)
 {
     $title = apply_filters('widget_title', $instance['title']);
     if (empty($instance['user_id']) || 'invalid' === $instance['user_id']) {
         if (current_user_can('edit_theme_options')) {
             echo $args['before_widget'];
             echo '<p>' . sprintf(__('You need to enter your numeric user ID for the <a href="%1$s">Goodreads Widget</a> to work correctly. <a href="%2$s">Full instructions</a>.', 'jetpack'), esc_url(admin_url('widgets.php')), 'http://support.wordpress.com/widgets/goodreads-widget/#goodreads-user-id') . '</p>';
             echo $args['after_widget'];
         }
         return;
     }
     if (!array_key_exists($instance['shelf'], $this->shelves)) {
         return;
     }
     $instance['user_id'] = absint($instance['user_id']);
     // Set widget ID based on shelf.
     $this->goodreads_widget_id = $instance['user_id'] . '_' . $instance['shelf'];
     if (empty($title)) {
         $title = esc_html__('Goodreads', 'jetpack');
     }
     echo $args['before_widget'];
     echo $args['before_title'] . $title . $args['after_title'];
     $goodreads_url = 'https://www.goodreads.com/review/custom_widget/' . urlencode($instance['user_id']) . '.' . urlencode($instance['title']) . ':%20' . urlencode($instance['shelf']) . '?cover_position=&cover_size=small&num_books=5&order=d&shelf=' . urlencode($instance['shelf']) . '&sort=date_added&widget_bg_transparent=&widget_id=' . esc_attr($this->goodreads_widget_id);
     echo '<div class="gr_custom_widget" id="gr_custom_widget_' . esc_attr($this->goodreads_widget_id) . '"></div>' . "\n";
     echo '<script src="' . esc_url($goodreads_url) . '"></script>' . "\n";
     echo $args['after_widget'];
     do_action('jetpack_stats_extra', 'widget', 'goodreads');
 }
 public function __construct($data = array())
 {
     parent::__construct($data);
     if (!isset($data['name'])) {
         $this->name = 'eventlist';
     }
     if (!isset($data['posts'])) {
         $event_args = array();
         // Get the active plugins.
         $active_plugins = get_option('active_plugins');
         // We do some guessing here for Tzolkin
         if (in_array('tzolkin/tzolkin.php', $active_plugins)) {
             $event_args = ['post_type' => 'tz_events'];
         }
         // Some more guessing for The Events Calendar
         if (in_array('the-events-calendar/the-events-calendar.php', $active_plugins)) {
             $event_args = ['post_type' => \Tribe__Events__Main::POSTTYPE, 'orderby' => 'event_date', 'order' => 'ASC', 'posts_per_page' => tribe_get_option('postsPerPage', 10), 'tribe_render_context' => 'default'];
         }
         $eventlist_event_args_filter = $this->name . '_event_args';
         $event_args = apply_filters($eventlist_event_args_filter, $event_args);
         Atom::add_debug_entry('Filter', $eventlist_event_args_filter);
         $this->posts = new \WP_Query($event_args);
     }
     if (!isset($data['posts-structure'])) {
         $posts_structure = ['PostClass' => ['children' => ['image', 'text']], 'image' => ['parts' => ['PostThumbnail']], 'text' => ['parts' => ['EventBadge', 'PostTitleLink', 'EventDate', 'ForceExcerpt', 'PostLink' => 'Read More']]];
         $postlist_posts_structure_filter = $this->name . '_posts_structure';
         $this->posts_structure = apply_filters($postlist_posts_structure_filter, $posts_structure);
         Atom::add_debug_entry('Filter', $postlist_posts_structure_filter);
     }
 }
function wplms_dashboard_template()
{
    if (!is_user_logged_in()) {
        wp_redirect(site_url());
    }
    $template = 'templates/dashboard';
    global $bp;
    if ($bp->current_component == 'dashboard') {
        wp_enqueue_style('wplms-dashboard-css', WPLMS_DASHBOARD_URL . '/css/wplms-dashboard.css', array(), '1.0');
        wp_enqueue_script('wplms-dashboard-js', WPLMS_DASHBOARD_URL . '/js/wplms-dashboard.js', array('jquery', 'jquery-ui-sortable'), '1.0');
        if (is_active_widget(false, false, 'wplms_instructor_dash_stats', true) || is_active_widget(false, false, 'wplms_dash_stats', true)) {
            wp_enqueue_script('wplms-sparkline', WPLMS_DASHBOARD_URL . '/js/jquery.sparkline.min.js', array('jquery'), true);
        }
        if (is_active_widget(false, false, 'wplms_instructor_stats', true) || is_active_widget(false, false, 'wplms_instructor_commission_stats', true) || is_active_widget(false, false, 'wplms_student_stats', true)) {
            wp_enqueue_script('wplms-raphael', WPLMS_DASHBOARD_URL . '/js/raphael-min.js', array('jquery'), true);
            wp_enqueue_script('wplms-morris', WPLMS_DASHBOARD_URL . '/js/morris.min.js', array('jquery'), true);
        }
        $translation_array = array('earnings' => __('Earnings', 'wplms-dashboard'), 'payout' => __('Payout', 'wplms-dashboard'), 'students' => __('# Students', 'wplms-dashboard'), 'saved' => __('SAVED', 'wplms-dashboard'), 'saving' => __('SAVING ...', 'wplms-dashboard'), 'stats_calculated' => __('Stats Calculated, reloading page ...', 'wplms-dashboard'));
        wp_localize_script('wplms-dashboard-js', 'wplms_dashboard_strings', $translation_array);
    }
    $located_template = apply_filters('bp_located_template', locate_template($template, false), $template);
    if ($located_template && $located_template != '') {
        bp_get_template_part(apply_filters('bp_load_template', $located_template));
    } else {
        bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/dashboard'));
    }
}
Example #12
0
/**
 * Returns classic grid element for a given product
 *
 * @param object $post Product post object
 * @param string $archive_template
 * @return string
 */
function get_grid_archive_theme($post, $archive_template = null)
{
    $archive_template = isset($archive_template) ? $archive_template : get_product_listing_template();
    $return = '';
    if ($archive_template == 'grid') {
        $image_id = get_post_thumbnail_id($post->ID);
        $thumbnail_product = wp_get_attachment_image_src($image_id, 'classic-grid-listing');
        $product_name = get_product_name();
        if ($thumbnail_product) {
            $img_class['alt'] = $product_name;
            $img_class['class'] = 'classic-grid-image';
            $image = wp_get_attachment_image($image_id, 'classic-grid-listing', false, $img_class);
        } else {
            $url = default_product_thumbnail_url();
            $image = '<img src="' . $url . '" class="classic-grid-image" alt="' . $product_name . '" >';
        }
        $archive_price = apply_filters('archive_price_filter', '', $post);
        $classic_grid_settings = get_classic_grid_settings();
        $row_class = get_row_class($classic_grid_settings);
        $return = '<div class="archive-listing product-' . $post->ID . ' classic-grid ' . $row_class . ' ' . product_class($post->ID) . '">';
        $return .= '<a href="' . get_permalink() . '">';
        //$return .= '<div style="background-image:url(\'' . $url . '\');" class="classic-grid-element"></div>';
        $return .= '<div class="classic-grid-image-wrapper"><div class="pseudo"></div><div class="image">' . $image . '</div></div>';
        $return .= '<h3 class="product-name">' . $product_name . '</h3>' . $archive_price . '</a></div>';
    }
    return $return;
}
 /**
  * Outputs the HTML for this widget.
  *
  * @param array  An array of standard parameters for widgets in this theme 
  * @param array  An array of settings for this widget instance 
  * @return void Echoes it's output
  **/
 public function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $count = esc_attr($instance['count']);
     $count = 0 < $count && $count < 10 ? $count : 2;
     $loop = new WP_Query(array('post_type' => 'event', 'posts_per_page' => $count, 'order' => 'ASC', 'orderby' => 'meta_value_num', 'meta_key' => '_event_start', 'meta_query' => array(array('key' => '_event_end', 'value' => time(), 'compare' => '>'))));
     if ($loop->have_posts()) {
         echo $before_widget;
         if ($instance['title']) {
             echo $before_title . apply_filters('widget_title', $instance['title']) . $after_title;
         }
         echo '<ul>';
         while ($loop->have_posts()) {
             $loop->the_post();
             global $post;
             $output = '<span class="meta">' . date(get_option('date_format'), get_post_meta(get_the_ID(), '_event_start', true)) . '</span> <a href="' . get_permalink() . '">' . get_the_title() . '</a>';
             $read_more = apply_filters('em4wp_events_manager_upcoming_widget_output', $output, $post);
             if ($read_more) {
                 echo '<li>' . $read_more . '</li>';
             }
         }
         if ($instance['more_text']) {
             echo '<li><a href="' . get_post_type_archive_link('event') . '">' . esc_attr($instance['more_text']) . '</a></li>';
         }
         echo '</ul>';
         echo $after_widget;
     }
     wp_reset_postdata();
 }
 static function query_and_render($args)
 {
     $ctype = p2p_type($args['ctype']);
     if (!$ctype) {
         trigger_error(sprintf("Unregistered connection type '%s'.", $ctype), E_USER_WARNING);
         return '';
     }
     $directed = $ctype->find_direction($args['item']);
     if (!$directed) {
         return '';
     }
     $context = $args['context'];
     $extra_qv = array('p2p:per_page' => -1, 'p2p:context' => $context);
     $connected = call_user_func(array($directed, $args['method']), $args['item'], $extra_qv, 'abstract');
     switch ($args['mode']) {
         case 'inline':
             $render_args = array('separator' => ', ');
             break;
         case 'ol':
             $render_args = array('before_list' => '<ol id="' . $ctype->name . '_list">', 'after_list' => '</ol>');
             break;
         case 'ul':
         default:
             $render_args = array('before_list' => '<ul id="' . $ctype->name . '_list">', 'after_list' => '</ul>');
             break;
     }
     $render_args['echo'] = false;
     $html = self::render($connected, $render_args);
     return apply_filters("p2p_{$context}_html", $html, $connected, $directed, $args['mode']);
 }
Example #15
0
 public function top_level()
 {
     $projects = $this->many("SELECT * FROM {$this->table} WHERE parent_project_id IS NULL OR parent_project_id < 1 ORDER BY name ASC");
     /** This filter is documented in gp-includes/things/project.php */
     $projects = apply_filters('gp_projects', $projects, 0);
     return $projects;
 }
Example #16
0
 function options()
 {
     $dslc_options = array(array('label' => __('Show On', 'live-composer-page-builder'), 'id' => 'css_show_on', 'std' => 'desktop tablet phone', 'type' => 'checkbox', 'choices' => array(array('label' => __('Desktop', 'live-composer-page-builder'), 'value' => 'desktop'), array('label' => __('Tablet', 'live-composer-page-builder'), 'value' => 'tablet'), array('label' => __('Phone', 'live-composer-page-builder'), 'value' => 'phone'))), array('label' => __('Show Again After ( days )', 'live-composer-page-builder'), 'help' => __('Amount of days until the notifications shows again to the user that closed it.<br>If value empty it will show on every page load.', 'live-composer-page-builder'), 'id' => 'notification_timeout', 'std' => '', 'type' => 'text'), array('label' => __('BG Color', 'live-composer-page-builder'), 'id' => 'css_bg_color', 'std' => '#f65757', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'background-color', 'section' => 'styling'), array('label' => __('Border Color', 'live-composer-page-builder'), 'id' => 'css_border_color', 'std' => '#e43737', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'border-color', 'section' => 'styling'), array('label' => __('Border Width', 'live-composer-page-builder'), 'id' => 'css_border_width', 'min' => 0, 'max' => 10, 'increment' => 1, 'std' => '1', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'border-width', 'section' => 'styling', 'ext' => 'px'), array('label' => __('Borders', 'live-composer-page-builder'), 'id' => 'css_border_trbl', 'std' => 'top right bottom left', 'type' => 'checkbox', 'choices' => array(array('label' => __('Top', 'live-composer-page-builder'), 'value' => 'top'), array('label' => __('Right', 'live-composer-page-builder'), 'value' => 'right'), array('label' => __('Bottom', 'live-composer-page-builder'), 'value' => 'bottom'), array('label' => __('Left', 'live-composer-page-builder'), 'value' => 'left')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'border-style', 'section' => 'styling'), array('label' => __('Border Radius', 'live-composer-page-builder'), 'id' => 'css_border_radius', 'min' => 0, 'max' => 100, 'increment' => 1, 'std' => '3', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'border-radius', 'min' => 0, 'max' => 100, 'increment' => 1, 'section' => 'styling', 'ext' => 'px'), array('label' => __('Margin Bottom', 'live-composer-page-builder'), 'id' => 'css_margin_bottom', 'min' => -1000, 'max' => 1000, 'increment' => 1, 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'styling', 'ext' => 'px'), array('label' => __('Minimum Height', 'live-composer-page-builder'), 'id' => 'css_min_height', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'min-height', 'section' => 'styling', 'ext' => 'px', 'min' => 0, 'max' => 1000, 'increment' => 5), array('label' => __('Padding Vertical', 'live-composer-page-builder'), 'id' => 'css_padding_vertical', 'min' => 0, 'max' => 600, 'increment' => 1, 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'padding-top,padding-bottom', 'section' => 'styling', 'ext' => 'px'), array('label' => __('Padding Horizontal', 'live-composer-page-builder'), 'id' => 'css_padding_horizontal', 'min' => 0, 'max' => 1000, 'increment' => 1, 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'padding-left,padding-right', 'section' => 'styling', 'ext' => 'px'), array('label' => __('Content', 'live-composer-page-builder'), 'id' => 'content', 'std' => __('This is just placeholder text.', 'live-composer-page-builder'), 'type' => 'textarea', 'visibility' => 'hidden', 'section' => 'styling', 'tab' => __('Text', 'live-composer-page-builder')), array('label' => __('Align', 'live-composer-page-builder'), 'id' => 'css_text_align', 'std' => 'left', 'type' => 'text_align', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box, .dslc-notification-box p', 'affect_on_change_rule' => 'text-align', 'section' => 'styling', 'tab' => __('Text', 'live-composer-page-builder')), array('label' => __('Color', 'live-composer-page-builder'), 'id' => 'css_text_color', 'std' => '#ffffff', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box, .dslc-notification-box p', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Text', 'live-composer-page-builder')), array('label' => __('Link - Color', 'live-composer-page-builder'), 'id' => 'css_text_link_color', 'std' => '#ffffff', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box a', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Text', 'live-composer-page-builder')), array('label' => __('Font Size', 'live-composer-page-builder'), 'id' => 'css_text_font_size', 'min' => 0, 'max' => 100, 'increment' => 1, 'std' => '13', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box, .dslc-notification-box p', 'affect_on_change_rule' => 'font-size', 'section' => 'styling', 'tab' => __('Text', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Font Weight', 'live-composer-page-builder'), 'id' => 'css_text_font_weight', 'std' => '400', 'type' => 'select', 'choices' => array(array('label' => '100 - Thin', 'value' => '100'), array('label' => '200 - Extra Light', 'value' => '200'), array('label' => '300 - Light', 'value' => '300'), array('label' => '400 - Normal', 'value' => '400'), array('label' => '500 - Medium', 'value' => '500'), array('label' => '600 - Semi Bold', 'value' => '600'), array('label' => '700 - Bold', 'value' => '700'), array('label' => '800 - Extra Bold', 'value' => '800'), array('label' => '900 - Black', 'value' => '900')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box, .dslc-notification-box p', 'affect_on_change_rule' => 'font-weight', 'section' => 'styling', 'tab' => __('Text', 'live-composer-page-builder'), 'ext' => ''), array('label' => __('Line Height', 'live-composer-page-builder'), 'id' => 'css_text_line_height', 'min' => 0, 'max' => 120, 'increment' => 1, 'std' => '26', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box, .dslc-notification-box p', 'affect_on_change_rule' => 'line-height', 'section' => 'styling', 'tab' => __('Text', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Font Family', 'live-composer-page-builder'), 'id' => 'css_font_family', 'std' => 'Droid Serif', 'type' => 'font', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box, .dslc-notification-box p', 'affect_on_change_rule' => 'font-family', 'section' => 'styling', 'tab' => __('Text', 'live-composer-page-builder')), array('label' => __('Enable/Disable', 'live-composer-page-builder'), 'id' => 'css_close_display', 'std' => 'flex', 'type' => 'select', 'choices' => array(array('label' => __('Enabled', 'live-composer-page-builder'), 'value' => 'flex'), array('label' => __('Disabled', 'live-composer-page-builder'), 'value' => 'none')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'display', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('BG Color', 'live-composer-page-builder'), 'id' => 'css_close_bg_color', 'std' => '#fff', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'background-color', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('BG Color - Hover', 'live-composer-page-builder'), 'id' => 'css_close_bg_color_hover', 'std' => '', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close:hover', 'affect_on_change_rule' => 'background-color', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('Border Color', 'live-composer-page-builder'), 'id' => 'css_close_border_color', 'std' => '', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'border-color', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('Border Color - Hover', 'live-composer-page-builder'), 'id' => 'css_close_border_color_hover', 'std' => '', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close:hover', 'affect_on_change_rule' => 'border-color', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('Border Width', 'live-composer-page-builder'), 'id' => 'css_close_border_width', 'min' => 0, 'max' => 10, 'increment' => 1, 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'border-width', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Borders', 'live-composer-page-builder'), 'id' => 'css_close_border_trbl', 'std' => 'top right bottom left', 'type' => 'checkbox', 'choices' => array(array('label' => __('Top', 'live-composer-page-builder'), 'value' => 'top'), array('label' => __('Right', 'live-composer-page-builder'), 'value' => 'right'), array('label' => __('Bottom', 'live-composer-page-builder'), 'value' => 'bottom'), array('label' => __('Left', 'live-composer-page-builder'), 'value' => 'left')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'border-style', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('Border Radius', 'live-composer-page-builder'), 'id' => 'css_close_border_radius', 'min' => 0, 'max' => 100, 'increment' => 1, 'std' => '50', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'border-radius', 'min' => 0, 'max' => 100, 'increment' => 1, 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Margin Top', 'live-composer-page-builder'), 'id' => 'css_close_top', 'std' => '20', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'top', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Margin Right', 'live-composer-page-builder'), 'id' => 'css_close_right', 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'right', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Size', 'live-composer-page-builder'), 'id' => 'css_close_size', 'std' => '18', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'width, height', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('Icon - Color', 'live-composer-page-builder'), 'id' => 'css_close_icon_color', 'std' => '#f65757', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close .dslc-icon', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('Icon - Color - Hover', 'live-composer-page-builder'), 'id' => 'css_close_icon_color', 'std' => '#f65757', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close:hover .dslc-icon', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('Icon - Size', 'live-composer-page-builder'), 'id' => 'css_close_icon_size', 'std' => '13', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close .dslc-icon', 'affect_on_change_rule' => 'font-size, width', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Close', 'live-composer-page-builder')), array('label' => __('Responsive Styling', 'live-composer-page-builder'), 'id' => 'css_res_t', 'std' => 'disabled', 'type' => 'select', 'choices' => array(array('label' => __('Disabled', 'live-composer-page-builder'), 'value' => 'disabled'), array('label' => __('Enabled', 'live-composer-page-builder'), 'value' => 'enabled')), 'section' => 'responsive', 'tab' => __('Tablet', 'live-composer-page-builder')), array('label' => __('Margin Bottom', 'live-composer-page-builder'), 'id' => 'css_res_t_margin_bottom', 'min' => -1000, 'max' => 1000, 'increment' => 1, 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'responsive', 'tab' => __('Tablet', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Padding Vertical', 'live-composer-page-builder'), 'id' => 'css_res_t_padding_vertical', 'min' => 0, 'max' => 600, 'increment' => 1, 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'padding-top,padding-bottom', 'section' => 'responsive', 'tab' => __('Tablet', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Padding Horizontal', 'live-composer-page-builder'), 'id' => 'css_res_t_padding_horizontal', 'min' => 0, 'max' => 1000, 'increment' => 1, 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'padding-left,padding-right', 'section' => 'responsive', 'tab' => __('Tablet', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Font Size', 'live-composer-page-builder'), 'id' => 'css_res_t_text_font_size', 'min' => 0, 'max' => 100, 'increment' => 1, 'std' => '13', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'font-size', 'section' => 'responsive', 'tab' => __('Tablet', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Line Height', 'live-composer-page-builder'), 'id' => 'css_res_t_text_line_height', 'min' => 0, 'max' => 120, 'increment' => 1, 'std' => '26', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'line-height', 'section' => 'responsive', 'tab' => __('Tablet', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Icon - Size ( Wrapper )', 'live-composer-page-builder'), 'id' => 'css_res_t_close_icon_size', 'std' => '12', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close .dslc-icon', 'affect_on_change_rule' => 'font-size', 'section' => 'responsive', 'tab' => __('Tablet', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Icom - Size ( Icon )', 'live-composer-page-builder'), 'id' => 'css_res_t_close_size', 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'width,height', 'section' => 'responsive', 'tab' => __('Tablet', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Responsive Styling', 'live-composer-page-builder'), 'id' => 'css_res_p', 'std' => 'disabled', 'type' => 'select', 'choices' => array(array('label' => __('Disabled', 'live-composer-page-builder'), 'value' => 'disabled'), array('label' => __('Enabled', 'live-composer-page-builder'), 'value' => 'enabled')), 'section' => 'responsive', 'tab' => __('Phone', 'live-composer-page-builder')), array('label' => __('Margin Bottom', 'live-composer-page-builder'), 'id' => 'css_res_p_margin_bottom', 'min' => -1000, 'max' => 1000, 'increment' => 1, 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'responsive', 'tab' => __('Phone', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Padding Vertical', 'live-composer-page-builder'), 'id' => 'css_res_p_padding_vertical', 'min' => 0, 'max' => 600, 'increment' => 1, 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'padding-top,padding-bottom', 'section' => 'responsive', 'tab' => __('Phone', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Padding Horizontal', 'live-composer-page-builder'), 'id' => 'css_res_p_padding_horizontal', 'min' => 0, 'max' => 1000, 'increment' => 1, 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'padding-left,padding-right', 'section' => 'responsive', 'tab' => __('Phone', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Font Size', 'live-composer-page-builder'), 'id' => 'css_res_p_text_font_size', 'min' => 0, 'max' => 100, 'increment' => 1, 'std' => '13', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'font-size', 'section' => 'responsive', 'tab' => __('Phone', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Line Height', 'live-composer-page-builder'), 'id' => 'css_res_p_text_line_height', 'min' => 0, 'max' => 120, 'increment' => 1, 'std' => '26', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box', 'affect_on_change_rule' => 'line-height', 'section' => 'responsive', 'tab' => __('Phone', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Icon - Size ( Wrapper )', 'live-composer-page-builder'), 'id' => 'css_res_p_close_icon_size', 'std' => '12', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close .dslc-icon', 'affect_on_change_rule' => 'font-size', 'section' => 'responsive', 'tab' => __('Phone', 'live-composer-page-builder'), 'ext' => 'px'), array('label' => __('Icom - Size ( Icon )', 'live-composer-page-builder'), 'id' => 'css_res_p_close_size', 'std' => '15', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-notification-box-close', 'affect_on_change_rule' => 'width,height', 'section' => 'responsive', 'tab' => __('Phone', 'live-composer-page-builder'), 'ext' => 'px'));
     $dslc_options = array_merge($dslc_options, $this->shared_options('animation_options', array('hover_opts' => false)));
     $dslc_options = array_merge($dslc_options, $this->presets_options());
     return apply_filters('dslc_module_options', $dslc_options, $this->module_id);
 }
 /**
  * Output the settings
  */
 public function output()
 {
     global $woocommerce, $woocommerce_settings, $current_section, $current_tab;
     if (!current_user_can('manage_woocommerce')) {
         wp_die(__('You do not have sufficient permissions to access this page.', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN));
     }
     do_action('woocommerce_mailpoet_settings_start');
     $mailpoet_settings = $this->get_settings();
     // Get current section
     $current_section = empty($_REQUEST['section']) ? 'general' : sanitize_text_field(urldecode($_REQUEST['section']));
     $current = $current_section ? '' : ' class="current"';
     // Creates each settings section.
     $mailpoet_section = apply_filters('woocommerce_mailpoet_settings_sections', array('general' => __('General', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN), 'lists' => __('Lists', MAILPOET_WOOCOMMERCE_TEXT_DOMAIN)));
     foreach ($mailpoet_section as $section => $title) {
         $title = ucwords($title);
         $current = $section == $current_section ? ' class="current"' : '';
         $links[] = '<a href="' . add_query_arg('section', $section, admin_url('admin.php?page=woocommerce_settings&tab=mailpoet')) . '"' . $current . '>' . esc_html($title) . '</a>';
     }
     echo '<ul class="subsubsub"><li>' . implode('| </li><li>', $links) . '</li></ul><br class="clear" />';
     woocommerce_admin_fields($mailpoet_settings);
     if ($current_section == 'lists') {
         include_once MailPoet_WooCommerce_Add_on()->plugin_path() . '/includes/admin/settings/settings-newsletters.php';
         $mailpoet_list = mailpoet_lists();
         do_action('woocommerce_mailpoet_list_newsletters', $mailpoet_list);
     }
 }
 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
     $sticky = get_option('sticky_posts');
     $number = empty($instance['number']) ? 1 : (int) $instance['number'];
     $cat = empty($instance['category']) ? 0 : (int) $instance['category'];
     if (is_single()) {
         array_push($sticky, get_the_ID());
     }
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     } else {
         echo '<br />';
     }
     $featuredPosts = new WP_Query(array('posts_per_page' => $number, 'cat' => $cat, 'post__not_in' => $sticky, 'no_found_rows' => true));
     while ($featuredPosts->have_posts()) {
         $featuredPosts->the_post();
         global $mb_content_area, $more;
         $mb_content_area = 'sidebar';
         get_template_part('content', get_post_format());
     }
     wp_reset_postdata();
     echo $after_widget;
 }
 /**
  * start_el function.
  * 
  * @access public
  * @param mixed &$output
  * @param mixed $item
  * @param int $depth (default: 0)
  * @param array $args (default: array())
  * @param int $id (default: 0)
  * @return void
  */
 function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
 {
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $li_attributes = '';
     $class_names = $value = '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     $classes[] = $args->has_children ? 'dropdown' : '';
     $classes[] = $item->current || $item->current_item_ancestor ? 'active' : '';
     $classes[] = 'menu-item-' . $item->ID;
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item, $args));
     $class_names = ' class="' . esc_attr($class_names) . '"';
     $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args);
     $id = strlen($id) ? ' id="' . esc_attr($id) . '"' : '';
     $output .= $indent . '<li' . $id . $value . $class_names . $li_attributes . '>';
     $attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
     $attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
     $attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
     $attributes .= !empty($item->url) ? ' href="' . esc_attr($item->url) . '"' : '';
     $attributes .= $args->has_children ? ' class="dropdown-toggle" data-toggle="dropdown"' : '';
     $item_output = $args->before;
     $item_output .= '<a' . $attributes . '>';
     $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after;
     $item_output .= $args->has_children ? ' <b class="caret"></b></a>' : '</a>';
     $item_output .= $args->after;
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
Example #20
0
 function options()
 {
     $dslc_options = array(array('label' => __('Show On', 'dslc_string'), 'id' => 'css_show_on', 'std' => 'desktop tablet phone', 'type' => 'checkbox', 'choices' => array(array('label' => __('Desktop', 'dslc_string'), 'value' => 'desktop'), array('label' => __('Tablet', 'dslc_string'), 'value' => 'tablet'), array('label' => __('Phone', 'dslc_string'), 'value' => 'phone'))), array('label' => __('Title Link', 'dslc_string'), 'id' => 'title_link', 'std' => '', 'type' => 'text'), array('label' => __('Title Link - Open in', 'dslc_string'), 'id' => 'title_link_target', 'std' => '_self', 'type' => 'select', 'choices' => array(array('label' => __('Same Tab', 'dslc_string'), 'value' => '_self'), array('label' => __('New Tab', 'dslc_string'), 'value' => '_blank'))), array('label' => __('Primary Button Link', 'dslc_string'), 'id' => 'button_link', 'std' => '#', 'type' => 'text'), array('label' => __('Primary Button - Open in', 'dslc_string'), 'id' => 'button_target', 'std' => '_self', 'type' => 'select', 'choices' => array(array('label' => __('Same Tab', 'dslc_string'), 'value' => '_self'), array('label' => __('New Tab', 'dslc_string'), 'value' => '_blank'))), array('label' => __('Secondary Button Link', 'dslc_string'), 'id' => 'button_2_link', 'std' => '', 'type' => 'text'), array('label' => __('Secondary Button - Open in', 'dslc_string'), 'id' => 'button_2_target', 'std' => '_self', 'type' => 'select', 'choices' => array(array('label' => __('Same Tab', 'dslc_string'), 'value' => '_self'), array('label' => __('New Tab', 'dslc_string'), 'value' => '_blank'))), array('label' => __('Elements', 'dslc_string'), 'id' => 'elements', 'std' => 'icon title content button', 'type' => 'checkbox', 'choices' => array(array('label' => __('Icon', 'dslc_string'), 'value' => 'icon'), array('label' => __('Title', 'dslc_string'), 'value' => 'title'), array('label' => __('Content', 'dslc_string'), 'value' => 'content'), array('label' => __('Button', 'dslc_string'), 'value' => 'button')), 'section' => 'styling'), array('label' => __('Align', 'dslc_string'), 'id' => 'text_align', 'std' => 'center', 'type' => 'text_align', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'text-align', 'section' => 'styling'), array('label' => __('BG Color', 'dslc_string'), 'id' => 'css_bg_color', 'std' => '', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'background-color', 'section' => 'styling'), array('label' => __('BG Image', 'dslc_string'), 'id' => 'css_bg_img', 'std' => '', 'type' => 'image', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'background-image', 'section' => 'styling'), array('label' => __('BG Image Repeat', 'dslc_string'), 'id' => 'css_bg_img_repeat', 'std' => 'repeat', 'type' => 'select', 'choices' => array(array('label' => __('Repeat', 'dslc_string'), 'value' => 'repeat'), array('label' => __('Repeat Horizontal', 'dslc_string'), 'value' => 'repeat-x'), array('label' => __('Repeat Vertical', 'dslc_string'), 'value' => 'repeat-y'), array('label' => __('Do NOT Repeat', 'dslc_string'), 'value' => 'no-repeat')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'background-repeat', 'section' => 'styling'), array('label' => __('BG Image Attachment', 'dslc_string'), 'id' => 'css_bg_img_attch', 'std' => 'scroll', 'type' => 'select', 'choices' => array(array('label' => __('Scroll', 'dslc_string'), 'value' => 'scroll'), array('label' => __('Fixed', 'dslc_string'), 'value' => 'fixed')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'background-attachment', 'section' => 'styling'), array('label' => __('BG Image Position', 'dslc_string'), 'id' => 'css_bg_img_pos', 'std' => 'top left', 'type' => 'select', 'choices' => array(array('label' => __('Top Left', 'dslc_string'), 'value' => 'left top'), array('label' => __('Top Right', 'dslc_string'), 'value' => 'right top'), array('label' => __('Top Center', 'dslc_string'), 'value' => 'Center Top'), array('label' => __('Center Left', 'dslc_string'), 'value' => 'left center'), array('label' => __('Center Right', 'dslc_string'), 'value' => 'right center'), array('label' => __('Center', 'dslc_string'), 'value' => 'center center'), array('label' => __('Bottom Left', 'dslc_string'), 'value' => 'left bottom'), array('label' => __('Bottom Right', 'dslc_string'), 'value' => 'right bottom'), array('label' => __('Bottom Center', 'dslc_string'), 'value' => 'center bottom')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'background-position', 'section' => 'styling'), array('label' => __('Border Color', 'dslc_string'), 'id' => 'css_border_color', 'std' => '#000000', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'border-color', 'section' => 'styling'), array('label' => __('Border Width', 'dslc_string'), 'id' => 'css_border_width', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'border-width', 'section' => 'styling', 'ext' => 'px'), array('label' => __('Borders', 'dslc_string'), 'id' => 'css_border_trbl', 'std' => 'top right bottom left', 'type' => 'checkbox', 'choices' => array(array('label' => __('Top', 'dslc_string'), 'value' => 'top'), array('label' => __('Right', 'dslc_string'), 'value' => 'right'), array('label' => __('Bottom', 'dslc_string'), 'value' => 'bottom'), array('label' => __('Left', 'dslc_string'), 'value' => 'left')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'border-style', 'section' => 'styling'), array('label' => __('Border Radius', 'dslc_string'), 'id' => 'css_border_radius', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'border-radius', 'section' => 'styling', 'ext' => 'px'), array('label' => __('Margin Bottom', 'dslc_string'), 'id' => 'css_margin_bottom', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'styling', 'ext' => 'px'), array('label' => __('Padding Vertical', 'dslc_string'), 'id' => 'css_padding_vertical', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'padding-top,padding-bottom', 'section' => 'styling', 'max' => 500, 'increment' => 1, 'ext' => 'px'), array('label' => __('Padding Horizontal', 'dslc_string'), 'id' => 'css_padding_horizontal', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'padding-left,padding-right', 'section' => 'styling', 'ext' => 'px'), array('label' => __('Width', 'dslc_string'), 'id' => 'css_content_width', 'std' => '100', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-main-wrap', 'affect_on_change_rule' => 'max-width', 'section' => 'styling', 'ext' => '%'), array('label' => __('Align', 'dslc_string'), 'id' => 'css_icon_text_align', 'std' => 'inherit', 'type' => 'text_align', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image', 'affect_on_change_rule' => 'text-align', 'section' => 'styling', 'tab' => __('Image', 'dslc_string')), array('label' => __('BG Color', 'dslc_string'), 'id' => 'css_icon_bg_color', 'std' => '#5890e5', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image-inner', 'affect_on_change_rule' => 'background-color', 'section' => 'styling', 'tab' => __('Image', 'dslc_string')), array('label' => __('BG Image', 'dslc_string'), 'id' => 'css_icon_bg_img', 'std' => '', 'type' => 'image', 'refresh_on_change' => false, 'affect_on_change_el' => '', 'affect_on_change_rule' => '', 'section' => 'styling', 'tab' => __('Image', 'dslc_string')), array('label' => __('BG Image Repeat', 'dslc_string'), 'id' => 'css_icon_bg_img_repeat', 'std' => 'no-repeat', 'type' => 'select', 'choices' => array(array('label' => __('Repeat', 'dslc_string'), 'value' => 'repeat'), array('label' => __('Repeat Horizontal', 'dslc_string'), 'value' => 'repeat-x'), array('label' => __('Repeat Vertical', 'dslc_string'), 'value' => 'repeat-y'), array('label' => __('Do NOT Repeat', 'dslc_string'), 'value' => 'no-repeat')), 'affect_on_change_el' => '.dslc-info-box-image-inner', 'affect_on_change_rule' => 'background-repeat', 'section' => 'styling', 'tab' => __('Image', 'dslc_string')), array('label' => __('BG Image Size', 'dslc_string'), 'id' => 'css_icon_bg_img_size', 'std' => 'auto', 'type' => 'select', 'choices' => array(array('label' => __('Original', 'dslc_string'), 'value' => 'auto'), array('label' => __('Cover', 'dslc_string'), 'value' => 'cover'), array('label' => __('Contain', 'dslc_string'), 'value' => 'contain')), 'affect_on_change_el' => '.dslc-info-box-image-inner', 'affect_on_change_rule' => 'background-size', 'section' => 'styling', 'tab' => __('Image', 'dslc_string')), array('label' => __('Border Color', 'dslc_string'), 'id' => 'css_icon_border_color', 'std' => '', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image-inner', 'affect_on_change_rule' => 'border-color', 'section' => 'styling', 'tab' => __('Image', 'dslc_string')), array('label' => __('Border Width', 'dslc_string'), 'id' => 'css_icon_border_width', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image-inner', 'affect_on_change_rule' => 'border-width', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Image', 'dslc_string')), array('label' => __('Borders', 'dslc_string'), 'id' => 'css_icon_border_trbl', 'std' => 'top right bottom left', 'type' => 'checkbox', 'choices' => array(array('label' => __('Top', 'dslc_string'), 'value' => 'top'), array('label' => __('Right', 'dslc_string'), 'value' => 'right'), array('label' => __('Bottom', 'dslc_string'), 'value' => 'bottom'), array('label' => __('Left', 'dslc_string'), 'value' => 'left')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image-inner', 'affect_on_change_rule' => 'border-style', 'section' => 'styling', 'tab' => __('Image', 'dslc_string')), array('label' => __('Border Radius', 'dslc_string'), 'id' => 'css_icon_border_radius', 'std' => '100', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image-inner', 'affect_on_change_rule' => 'border-radius', 'section' => 'styling', 'tab' => __('Image', 'dslc_string'), 'ext' => 'px'), array('label' => __('Margin Top', 'dslc_string'), 'id' => 'css_icon_margin_top', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image-inner', 'affect_on_change_rule' => 'margin-top', 'section' => 'styling', 'tab' => __('Image', 'dslc_string'), 'ext' => 'px', 'min' => -100, 'max' => 50), array('label' => __('Margin Right', 'dslc_string'), 'id' => 'css_icon_margin_right', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image', 'affect_on_change_rule' => 'margin-right', 'section' => 'styling', 'tab' => __('Image', 'dslc_string'), 'ext' => 'px', 'min' => 0, 'max' => 100), array('label' => __('Margin Bottom', 'dslc_string'), 'id' => 'css_icon_margin_bottom', 'std' => '25', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-image', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'styling', 'tab' => __('Image', 'dslc_string'), 'ext' => 'px', 'min' => 0, 'max' => 100), array('label' => __('Position', 'dslc_string'), 'id' => 'icon_position', 'std' => 'above', 'type' => 'select', 'choices' => array(array('label' => __('Above', 'dslc_string'), 'value' => 'above'), array('label' => __('Aside', 'dslc_string'), 'value' => 'aside')), 'section' => 'styling', 'tab' => __('Image', 'dslc_string')), array('label' => __('Align', 'dslc_string'), 'id' => 'css_title_text_align', 'std' => 'inherit', 'type' => 'text_align', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-title', 'affect_on_change_rule' => 'text-align', 'section' => 'styling', 'tab' => __('Title', 'dslc_string')), array('label' => __('Color', 'dslc_string'), 'id' => 'css_title_color', 'std' => '#3d3d3d', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-title h4', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Title', 'dslc_string')), array('label' => __('Font Size', 'dslc_string'), 'id' => 'css_title_font_size', 'std' => '17', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-title h4', 'affect_on_change_rule' => 'font-size', 'section' => 'styling', 'tab' => __('Title', 'dslc_string'), 'ext' => 'px'), array('label' => __('Font Weight', 'dslc_string'), 'id' => 'css_title_font_weight', 'std' => '800', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-title h4', 'affect_on_change_rule' => 'font-weight', 'section' => 'styling', 'tab' => __('Title', 'dslc_string'), 'ext' => '', 'min' => 100, 'max' => 900, 'increment' => 100), array('label' => __('Font Family', 'dslc_string'), 'id' => 'css_title_font_family', 'std' => 'Lato', 'type' => 'font', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-title h4', 'affect_on_change_rule' => 'font-family', 'section' => 'styling', 'tab' => __('Title', 'dslc_string')), array('label' => __('Line Height', 'dslc_string'), 'id' => 'css_title_line_height', 'std' => '17', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-title h4', 'affect_on_change_rule' => 'line-height', 'section' => 'styling', 'tab' => __('Title', 'dslc_string'), 'ext' => 'px'), array('label' => __('Margin Bottom', 'dslc_string'), 'id' => 'css_title_margin', 'std' => '21', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-title', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'styling', 'tab' => __('Title', 'dslc_string'), 'ext' => 'px'), array('label' => __('Align', 'dslc_string'), 'id' => 'css_content_text_align', 'std' => 'inherit', 'type' => 'text_align', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-content', 'affect_on_change_rule' => 'text-align', 'section' => 'styling', 'tab' => __('Content', 'dslc_string')), array('label' => __('Color', 'dslc_string'), 'id' => 'css_content_color', 'std' => '', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-content, .dslc-info-box-content p', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Content', 'dslc_string')), array('label' => __('Font Size', 'dslc_string'), 'id' => 'css_content_font_size', 'std' => '14', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-content, .dslc-info-box-content p', 'affect_on_change_rule' => 'font-size', 'section' => 'styling', 'tab' => __('Content', 'dslc_string'), 'ext' => 'px'), array('label' => __('Font Weight', 'dslc_string'), 'id' => 'css_content_font_weight', 'std' => '400', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-content, .dslc-info-box-content p', 'affect_on_change_rule' => 'font-weight', 'section' => 'styling', 'tab' => __('Content', 'dslc_string'), 'ext' => '', 'min' => 100, 'max' => 900, 'increment' => 100), array('label' => __('Font Family', 'dslc_string'), 'id' => 'css_content_font_family', 'std' => 'Lato', 'type' => 'font', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-content, .dslc-info-box-content p', 'affect_on_change_rule' => 'font-family', 'section' => 'styling', 'tab' => __('Content', 'dslc_string')), array('label' => __('Line Height', 'dslc_string'), 'id' => 'css_content_line_height', 'std' => '23', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-content, .dslc-info-box-content p', 'affect_on_change_rule' => 'line-height', 'section' => 'styling', 'tab' => __('Content', 'dslc_string'), 'ext' => 'px'), array('label' => __('Margin Bottom', 'dslc_string'), 'id' => 'css_content_margin', 'std' => '28', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-content, .dslc-info-box-content p', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'styling', 'tab' => __('Content', 'dslc_string'), 'ext' => 'px'), array('label' => __('BG Color', 'dslc_string'), 'id' => 'css_button_bg_color', 'std' => '#5890e5', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'background-color', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('BG Color - Hover', 'dslc_string'), 'id' => 'css_button_bg_color_hover', 'std' => '#3e73c2', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a:hover', 'affect_on_change_rule' => 'background-color', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Border Width', 'dslc_string'), 'id' => 'css_button_border_width', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'border-width', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string'), 'ext' => 'px'), array('label' => __('Borders', 'dslc_string'), 'id' => 'css_button_border_trbl', 'std' => 'top right bottom left', 'type' => 'checkbox', 'choices' => array(array('label' => __('Top', 'dslc_string'), 'value' => 'top'), array('label' => __('Right', 'dslc_string'), 'value' => 'right'), array('label' => __('Bottom', 'dslc_string'), 'value' => 'bottom'), array('label' => __('Left', 'dslc_string'), 'value' => 'left')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'border-style', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Border Color', 'dslc_string'), 'id' => 'css_button_border_color', 'std' => '#d8d8d8', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'border-color', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Border Color - Hover', 'dslc_string'), 'id' => 'css_button_border_color_hover', 'std' => '', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a:hover', 'affect_on_change_rule' => 'border-color', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Border Radius', 'dslc_string'), 'id' => 'css_button_border_radius', 'std' => '3', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'border-radius', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string'), 'ext' => 'px'), array('label' => __('Color', 'dslc_string'), 'id' => 'css_button_color', 'std' => '#ffffff', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Color - Hover', 'dslc_string'), 'id' => 'css_button_color_hover', 'std' => '#ffffff', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a:hover', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Font Size', 'dslc_string'), 'id' => 'css_button_font_size', 'std' => '11', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'font-size', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string'), 'ext' => 'px'), array('label' => __('Font Weight', 'dslc_string'), 'id' => 'css_button_font_weight', 'std' => '800', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'font-weight', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string'), 'ext' => '', 'min' => 100, 'max' => 900, 'increment' => 100), array('label' => __('Font Family', 'dslc_string'), 'id' => 'css_button_font_family', 'std' => 'Open Sans', 'type' => 'font', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'font-family', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Margin Top', 'dslc_string'), 'id' => 'css_button_margin_top', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button', 'affect_on_change_rule' => 'margin-top', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Margin Right', 'dslc_string'), 'id' => 'css_button_margin_right', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button', 'affect_on_change_rule' => 'margin-right', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Position', 'dslc_string'), 'id' => 'button_pos', 'std' => 'bellow', 'type' => 'select', 'choices' => array(array('label' => __('Right of content', 'dslc_string'), 'value' => 'aside'), array('label' => __('Bellow content', 'dslc_string'), 'value' => 'bellow')), 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Padding Vertical', 'dslc_string'), 'id' => 'css_button_padding_vertical', 'std' => '13', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'padding-top,padding-bottom', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Padding Horizontal', 'dslc_string'), 'id' => 'css_button_padding_horizontal', 'std' => '16', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a', 'affect_on_change_rule' => 'padding-left,padding-right', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Icon', 'dslc_string'), 'id' => 'button_icon_id', 'std' => 'cog', 'type' => 'icon', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Icon - Color', 'dslc_string'), 'id' => 'css_button_icon_color', 'std' => '#b0c8eb', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a .dslc-icon', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('Icon - Margin Right', 'dslc_string'), 'id' => 'css_button_icon_margin', 'std' => '5', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a .dslc-icon', 'affect_on_change_rule' => 'margin-right', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Primary Button', 'dslc_string')), array('label' => __('BG Color', 'dslc_string'), 'id' => 'css_button_2_bg_color', 'std' => '#5890e5', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'background-color', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('BG Color - Hover', 'dslc_string'), 'id' => 'css_button_2_bg_color_hover', 'std' => '#3e73c2', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary:hover', 'affect_on_change_rule' => 'background-color', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Border Width', 'dslc_string'), 'id' => 'css_button_2_border_width', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'border-width', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string'), 'ext' => 'px'), array('label' => __('Borders', 'dslc_string'), 'id' => 'css_button_2_border_trbl', 'std' => 'top right bottom left', 'type' => 'checkbox', 'choices' => array(array('label' => __('Top', 'dslc_string'), 'value' => 'top'), array('label' => __('Right', 'dslc_string'), 'value' => 'right'), array('label' => __('Bottom', 'dslc_string'), 'value' => 'bottom'), array('label' => __('Left', 'dslc_string'), 'value' => 'left')), 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'border-style', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Border Color', 'dslc_string'), 'id' => 'css_button_2_border_color', 'std' => '#d8d8d8', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'border-color', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Border Color - Hover', 'dslc_string'), 'id' => 'css_button_2_border_color_hover', 'std' => '', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary:hover', 'affect_on_change_rule' => 'border-color', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Border Radius', 'dslc_string'), 'id' => 'css_button_2_border_radius', 'std' => '3', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'border-radius', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string'), 'ext' => 'px'), array('label' => __('Color', 'dslc_string'), 'id' => 'css_button_2_color', 'std' => '#ffffff', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Color - Hover', 'dslc_string'), 'id' => 'css_button_2_color_hover', 'std' => '#ffffff', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary:hover', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Font Size', 'dslc_string'), 'id' => 'css_button_2_font_size', 'std' => '11', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'font-size', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string'), 'ext' => 'px'), array('label' => __('Font Weight', 'dslc_string'), 'id' => 'css_button_2_font_weight', 'std' => '800', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'font-weight', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string'), 'ext' => '', 'min' => 100, 'max' => 900, 'increment' => 100), array('label' => __('Font Family', 'dslc_string'), 'id' => 'css_button_2_font_family', 'std' => 'Open Sans', 'type' => 'font', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'font-family', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Margin Left', 'dslc_string'), 'id' => 'css_button_2_mleft', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'margin-left', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Margin Top', 'dslc_string'), 'id' => 'css_button_2_mtop', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'margin-top', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Padding Vertical', 'dslc_string'), 'id' => 'css_button_2_padding_vertical', 'std' => '13', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'padding-top,padding-bottom', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Padding Horizontal', 'dslc_string'), 'id' => 'css_button_2_padding_horizontal', 'std' => '16', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary', 'affect_on_change_rule' => 'padding-left,padding-right', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Icon', 'dslc_string'), 'id' => 'button_2_icon_id', 'std' => 'cog', 'type' => 'icon', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Icon - Color', 'dslc_string'), 'id' => 'css_button_2_icon_color', 'std' => '#b0c8eb', 'type' => 'color', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary .dslc-icon', 'affect_on_change_rule' => 'color', 'section' => 'styling', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Icon - Margin Right', 'dslc_string'), 'id' => 'css_button_2_icon_margin', 'std' => '5', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box-button a.dslc-secondary .dslc-icon', 'affect_on_change_rule' => 'margin-right', 'section' => 'styling', 'ext' => 'px', 'tab' => __('Secondary Button', 'dslc_string')), array('label' => __('Title', 'dslc_string'), 'id' => 'title', 'std' => 'CLICK TO EDIT', 'type' => 'textarea', 'visibility' => 'hidden', 'section' => 'styling'), array('label' => __('Content', 'dslc_string'), 'id' => 'content', 'std' => 'This is just placeholder text. Click here to edit it.', 'type' => 'textarea', 'visibility' => 'hidden', 'section' => 'styling'), array('label' => __('Button Title', 'dslc_string'), 'id' => 'button_title', 'std' => 'CLICK TO EDIT', 'type' => 'textarea', 'visibility' => 'hidden', 'section' => 'styling'), array('label' => __('Button Title', 'dslc_string'), 'id' => 'button_2_title', 'std' => 'CLICK TO EDIT', 'type' => 'textarea', 'visibility' => 'hidden', 'section' => 'styling'), array('label' => __('Responsive Styling', 'dslc_string'), 'id' => 'css_res_t', 'std' => 'disabled', 'type' => 'select', 'choices' => array(array('label' => __('Disabled', 'dslc_string'), 'value' => 'disabled'), array('label' => __('Enabled', 'dslc_string'), 'value' => 'enabled')), 'section' => 'responsive', 'tab' => __('tablet', 'dslc_string')), array('label' => __('Margin Bottom', 'dslc_string'), 'id' => 'css_res_t_margin_bottom', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'responsive', 'tab' => __('tablet', 'dslc_string'), 'ext' => 'px'), array('label' => __('Padding Vertical', 'dslc_string'), 'id' => 'css_res_t_padding_vertical', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'padding-top,padding-bottom', 'section' => 'responsive', 'tab' => __('tablet', 'dslc_string'), 'max' => 500, 'increment' => 1, 'ext' => 'px'), array('label' => __('Padding Horizontal', 'dslc_string'), 'id' => 'css_res_t_padding_horizontal', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'padding-left,padding-right', 'section' => 'responsive', 'tab' => __('tablet', 'dslc_string'), 'ext' => 'px'), array('label' => __('Responsive Styling', 'dslc_string'), 'id' => 'css_res_p', 'std' => 'disabled', 'type' => 'select', 'choices' => array(array('label' => __('Disabled', 'dslc_string'), 'value' => 'disabled'), array('label' => __('Enabled', 'dslc_string'), 'value' => 'enabled')), 'section' => 'responsive', 'tab' => __('phone', 'dslc_string')), array('label' => __('Margin Bottom', 'dslc_string'), 'id' => 'css_res_p_margin_bottom', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'margin-bottom', 'section' => 'responsive', 'tab' => __('phone', 'dslc_string'), 'ext' => 'px'), array('label' => __('Padding Vertical', 'dslc_string'), 'id' => 'css_res_p_padding_vertical', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'padding-top,padding-bottom', 'section' => 'responsive', 'tab' => __('phone', 'dslc_string'), 'max' => 500, 'increment' => 1, 'ext' => 'px'), array('label' => __('Padding Horizontal', 'dslc_string'), 'id' => 'css_res_p_padding_horizontal', 'std' => '0', 'type' => 'slider', 'refresh_on_change' => false, 'affect_on_change_el' => '.dslc-info-box', 'affect_on_change_rule' => 'padding-left,padding-right', 'section' => 'responsive', 'tab' => __('phone', 'dslc_string'), 'ext' => 'px'));
     $dslc_options = array_merge($dslc_options, $this->shared_options('animation_options'));
     $dslc_options = array_merge($dslc_options, $this->presets_options());
     return apply_filters('dslc_module_options', $dslc_options, $this->module_id);
 }
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Pages') : $instance['title']);
        $sortby = empty($instance['sortby']) ? 'menu_order' : $instance['sortby'];
        $exclude = empty($instance['exclude']) ? '' : $instance['exclude'];
        if ($sortby == 'post_date') {
            $showdate = "created";
        }
        if ($sortby == 'menu_order') {
            $sortby = 'menu_order, post_title, post_date';
        }
        $out = wp_list_pages(apply_filters('widget_pages_args', array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude, 'show_date' => $showdate)));
        if (!empty($out)) {
            echo $before_widget;
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            ?>

		<ul>

			<?php 
            echo $out;
            ?>

		</ul>

		<?php 
            echo $after_widget;
        }
    }
 /**
  * Outputs the content for the current Custom Menu widget instance.
  *
  * @since 3.0.0
  * @access public
  *
  * @param array $args     Display arguments including 'before_title', 'after_title',
  *                        'before_widget', and 'after_widget'.
  * @param array $instance Settings for the current Custom Menu widget instance.
  */
 public function widget($args, $instance)
 {
     // Get menu
     $nav_menu = !empty($instance['nav_menu']) ? wp_get_nav_menu_object($instance['nav_menu']) : false;
     if (!$nav_menu) {
         return;
     }
     /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
     $instance['title'] = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     echo $args['before_widget'];
     if (!empty($instance['title'])) {
         echo $args['before_title'] . $instance['title'] . $args['after_title'];
     }
     $nav_menu_args = array('fallback_cb' => '', 'menu' => $nav_menu);
     /**
      * Filter the arguments for the Custom Menu widget.
      *
      * @since 4.2.0
      * @since 4.4.0 Added the `$instance` parameter.
      *
      * @param array    $nav_menu_args {
      *     An array of arguments passed to wp_nav_menu() to retrieve a custom menu.
      *
      *     @type callable|bool $fallback_cb Callback to fire if the menu doesn't exist. Default empty.
      *     @type mixed         $menu        Menu ID, slug, or name.
      * }
      * @param stdClass $nav_menu      Nav menu object for the current menu.
      * @param array    $args          Display arguments for the current widget.
      * @param array    $instance      Array of settings for the current widget.
      */
     wp_nav_menu(apply_filters('widget_nav_menu_args', $nav_menu_args, $nav_menu, $args, $instance));
     echo $args['after_widget'];
 }
Example #23
0
 /**
  * Front-end display of widget.
  *
  * @see WP_Widget::widget()
  *
  * @param array $args     Widget arguments.
  * @param array $instance Saved values from database.
  */
 public function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     $linked_page_is_set = 0 < strlen($instance['url_to_page']);
     $linked_page_id_is_set = 0 < (int) $instance['sc_id_for_url'];
     $shortcode = '[event-list show_nav=false';
     $shortcode .= ' num_events="' . $instance['num_events'] . '"';
     $shortcode .= ' title_length=' . $instance['title_length'];
     $shortcode .= ' show_starttime=' . $instance['show_starttime'];
     $shortcode .= ' show_location=' . $instance['show_location'];
     $shortcode .= ' location_length=' . $instance['location_length'];
     $shortcode .= ' show_details=' . $instance['show_details'];
     $shortcode .= ' details_length=' . $instance['details_length'];
     if ($linked_page_is_set && $linked_page_id_is_set) {
         $shortcode .= ' link_to_event=' . $instance['link_to_event'];
         $shortcode .= ' url_to_page="' . $instance['url_to_page'] . '"';
         $shortcode .= ' sc_id_for_url=' . $instance['sc_id_for_url'];
     } else {
         $shortcode .= ' link_to_event=false';
     }
     $shortcode .= ' cat_filter="' . $instance['category'] . '"';
     $shortcode .= ']';
     echo do_shortcode($shortcode);
     if ('true' === $instance['link_to_page'] && $linked_page_is_set) {
         echo '<div style="clear:both"><a title="' . $instance['link_to_page_caption'] . '" href="' . $instance['url_to_page'] . '">' . $instance['link_to_page_caption'] . '</a></div>';
     }
     echo $after_widget;
 }
/**
 * Retrieve plugin installer pages from WordPress Plugins API.
 *
 * It is possible for a plugin to override the Plugin API result with three
 * filters. Assume this is for plugins, which can extend on the Plugin Info to
 * offer more choices. This is very powerful and must be used with care, when
 * overriding the filters.
 *
 * The first filter, 'plugins_api_args', is for the args and gives the action as
 * the second parameter. The hook for 'plugins_api_args' must ensure that an
 * object is returned.
 *
 * The second filter, 'plugins_api', is the result that would be returned.
 *
 * @since 2.7.0
 *
 * @param string $action
 * @param array|object $args Optional. Arguments to serialize for the Plugin Info API.
 * @return object plugins_api response object on success, WP_Error on failure.
 */
function plugins_api($action, $args = null)
{
    if (is_array($args)) {
        $args = (object) $args;
    }
    if (!isset($args->per_page)) {
        $args->per_page = 24;
    }
    // Allows a plugin to override the WordPress.org API entirely.
    // Use the filter 'plugins_api_result' to merely add results.
    // Please ensure that a object is returned from the following filters.
    $args = apply_filters('plugins_api_args', $args, $action);
    $res = apply_filters('plugins_api', false, $action, $args);
    if (false === $res) {
        $request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array('timeout' => 15, 'body' => array('action' => $action, 'request' => serialize($args))));
        if (is_wp_error($request)) {
            $res = new WP_Error('plugins_api_failed', __('An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.'), $request->get_error_message());
        } else {
            $res = maybe_unserialize(wp_remote_retrieve_body($request));
            if (!is_object($res) && !is_array($res)) {
                $res = new WP_Error('plugins_api_failed', __('An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.'), wp_remote_retrieve_body($request));
            }
        }
    } elseif (!is_wp_error($res)) {
        $res->external = true;
    }
    return apply_filters('plugins_api_result', $res, $action, $args);
}
 function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
 {
     global $wp_query;
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $class_names = $value = '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item));
     $class_names = ' class="' . esc_attr($class_names) . '"';
     $output .= $indent . '<li id="shopkeeper-menu-item-' . $item->ID . '"' . $value . $class_names . '>';
     $attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
     $attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
     $attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
     $attributes .= !empty($item->url) ? ' href="' . esc_attr($item->url) . '"' : '';
     $prepend = '';
     $append = '';
     //$description  = ! empty( $item->description ) ? '<span>'.esc_attr( $item->description ).'</span>' : '';
     if ($depth != 0) {
         $description = $append = $prepend = "";
     }
     $item_output = $args->before;
     $item_output .= '<a' . $attributes . '>';
     $item_output .= $args->link_before . $prepend . apply_filters('the_title', $item->title, $item->ID) . $append;
     //$item_output .= $description.$args->link_after;
     //$item_output .= ' '.$item->background_url.'</a>';
     $item_output .= '</a>';
     $item_output .= $args->after;
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
     apply_filters('walker_nav_menu_start_lvl', $item_output, $depth, $args->background_url = $item->background_url);
 }
 function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
 {
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     $classes[] = 'menu-item-' . $item->ID;
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item, $args, $depth));
     /**
      * Change WP's default classes to match Foundation's required classes
      */
     $class_names = str_replace(array('menu-item-has-children'), array('has-submenu'), $class_names);
     // ==========================
     $class_names = $class_names ? ' class="' . esc_attr($class_names) . '"' : '';
     $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args, $depth);
     $id = $id ? ' id="' . esc_attr($id) . '"' : '';
     $output .= $indent . '<li' . $id . $class_names . '>';
     $atts = array();
     $atts['title'] = !empty($item->attr_title) ? $item->attr_title : '';
     $atts['target'] = !empty($item->target) ? $item->target : '';
     $atts['rel'] = !empty($item->xfn) ? $item->xfn : '';
     $atts['href'] = !empty($item->url) ? $item->url : '';
     $atts = apply_filters('nav_menu_link_attributes', $atts, $item, $args, $depth);
     $attributes = '';
     foreach ($atts as $attr => $value) {
         if (!empty($value)) {
             $value = 'href' === $attr ? esc_url($value) : esc_attr($value);
             $attributes .= ' ' . $attr . '="' . $value . '"';
         }
     }
     $item_output = $args->before;
     $item_output .= '<a' . $attributes . '>';
     $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after;
     $item_output .= '</a>';
     $item_output .= $args->after;
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
Example #27
0
        function widget($args, $instance)
        {
            // prints the widget
            extract($args, EXTR_SKIP);
            $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
            $ads = empty($instance['ads']) ? '' : apply_filters('widget_ads', $instance['ads']);
            ?>
						
		   <div class="widget advt_widget">
				<?php 
            if ($title != "") {
                ?>
<h3><?php 
                echo $title;
                ?>
 </h3> <?php 
            }
            ?>
				<?php 
            echo $ads;
            ?>
 
			</div>        
		<?php 
        }
/**
 * Get a product attributes orderby setting.
 *
 * @param mixed $name
 * @return string
 */
function wc_attribute_orderby($name)
{
    global $wpdb;
    $name = str_replace('pa_', '', sanitize_title($name));
    $orderby = $wpdb->get_var($wpdb->prepare("SELECT attribute_orderby FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_name = %s;", $name));
    return apply_filters('woocommerce_attribute_orderby', $orderby, $name);
}
 public function scan($no_echo)
 {
     $this->current_type = 'theme';
     $string_settings = apply_filters('wpml_get_setting', false, 'st');
     if (isset($_POST['auto_text_domain']) && $_POST['auto_text_domain']) {
         $string_settings['use_header_text_domains_when_missing'] = 1;
     } else {
         $string_settings['use_header_text_domains_when_missing'] = 0;
     }
     do_action('wpml_set_setting', 'st', $string_settings, true);
     $this->scan_starting('theme ');
     $this->current_path = TEMPLATEPATH;
     $theme_info = wp_get_theme();
     $text_domain = $theme_info->get('TextDomain');
     $this->init_text_domain($text_domain);
     $this->scan_theme_files();
     $theme_localization_domains = array();
     if (isset($string_settings['theme_localization_domains'])) {
         $theme_localization_domains = $string_settings['theme_localization_domains'];
     }
     if (isset($_POST['icl_load_mo']) && $_POST['icl_load_mo']) {
         $this->add_translations($theme_localization_domains, '');
     }
     $this->copy_old_translations($theme_localization_domains, 'theme');
     $this->cleanup_wrong_contexts();
     if (!$no_echo) {
         $this->scan_response();
     }
 }
 /**
  * The shortcodes attributes with the field options
  *
  * @access private
  * @param array $atts
  * @return shortcode output
  */
 public static function fields()
 {
     global $mvb_metro_factory;
     $the_fields = array('main_title' => array('type' => 'text', 'label' => __('Title', 'mvb')), 'separator1' => array('type' => 'separator'), 'presentation_box' => array('type' => 'repeater', 'button' => __('Add box', 'mvb'), 'label' => __('Box', 'mvb'), 'lbl_d' => __('Box Title', 'mvb'), 'fields' => array('image' => array('type' => 'image', 'label' => __('Image', 'mvb'), 'col_span' => 'lbl_half'), 'main_title' => array('type' => 'text', 's_title' => TRUE, 'label' => __('Title', 'mvb'), 'col_span' => 'lbl_half'), 'sub_title' => array('type' => 'text', 'label' => __('Subtitle', 'mvb'), 'col_span' => 'lbl_half'), 'separator' => array('type' => 'separator'), 'color' => array('type' => 'colorpicker', 'label' => __('Background Color', 'mvb'), 'default' => '61727b', 'col_span' => 'lbl_third'), 'icon_color' => array('type' => 'colorpicker', 'label' => __('Icon text color', 'mvb'), 'default' => 'DBDBDB', 'col_span' => 'lbl_third'), 'icon_shadow_color' => array('type' => 'colorpicker', 'label' => __('Icon shadow color', 'mvb'), 'default' => 'DBDBDB', 'col_span' => 'lbl_third'), 'separator' => array('type' => 'separator'), 'icon' => array('type' => 'icon', 'label' => __('Icon', 'mvb'), 'col_span' => 'lbl_third'), 'separator1' => array('type' => 'separator'), 'link_url' => array('type' => 'text', 'label' => __('Link (URL)', 'mvb'), 'col_span' => 'lbl_half'), 'page_id' => array('type' => 'mvb_dropdown', 'label' => __('Link to page', 'mvb'), 'what' => 'pages', 'default' => 0, 'col_span' => 'lbl_half'), 'content' => array('type' => 'textarea', 'label' => __('Content', 'mvb')), 'read_more' => array('type' => 'select', 'label' => __('Display the "read more" link', 'mvb'), 'default' => 1, 'options' => mvb_yes_no(), 'col_span' => 'lbl_half'), 'read_more_text' => array('type' => 'text', 'label' => __('"Read more" link text', 'mvb'), 'default' => __('Read more', 'mvb'), 'col_span' => 'lbl_half'), 'separator-effects' => array('type' => 'separator'), 'effects' => array('type' => 'select', 'label' => __('Appear effects', 'mvb'), 'help' => __('Select one of appear effects for block', 'mvb'), 'default' => '0', 'options' => crum_appear_effects(), 'col_span' => 'lbl_third'), 'css' => array('type' => 'text', 'label' => __('Additional CSS classes', 'mvb'), 'help' => __('Separated by space', 'mvb'), 'col_span' => 'lbl_third'))), 'separator' => array('type' => 'separator'), 'css' => array('type' => 'text', 'label' => __('Additional CSS classes', 'mvb'), 'help' => __('Separated by space', 'mvb'), 'col_span' => 'lbl_third'), 'css_styles' => array('type' => 'text', 'label' => __('Additional CSS styles', 'mvb'), 'help' => __('Separated by <b>;</b>', 'mvb'), 'col_span' => 'lbl_full'));
     $the_fields = apply_filters('mvb_fields_filter', $the_fields);
     return $the_fields;
 }