コード例 #1
0
 function themesama_admin_scripts()
 {
     //for wp.media modal window
     wp_enqueue_media();
     //for shortcode manager & color picker
     wp_enqueue_style('wp-color-picker');
     wp_enqueue_style(TS_PLUGIN . 'shortcodesadmin', TS_PLUGIN_URL . 'css/admin.css');
     //Enqueue Font Awasome Icons
     if (!defined('IS_SLUPY')) {
         wp_enqueue_style('font-awasome', TS_PLUGIN_URL . 'css/font-awesome.min.css', array(), '4.1.0', 'all');
     }
     wp_enqueue_style('css-tipsy', TS_PLUGIN_URL . 'css/tipsy.css', array(), '1.0', 'all');
     wp_enqueue_script(TS_PLUGIN . 'shortcodesjs', TS_PLUGIN_URL . 'js/shortcodes.js', array('jquery'), '1.0.0', true);
     wp_enqueue_script('jquery-form-dependencies', TS_PLUGIN_URL . 'js/jquery.form-dependencies.js', array('jquery'), '2.0', true);
     wp_enqueue_script('zeroclipboard', TS_PLUGIN_URL . 'js/ZeroClipboard.min.js', array(), '1.0.0', true);
     wp_enqueue_script('jquery-tipsy', TS_PLUGIN_URL . 'js/jquery.tipsy.js', array('jquery'), '1.0.0a', true);
     wp_enqueue_script('jquery-ui-core');
     wp_enqueue_script('jquery-ui-tabs');
     wp_enqueue_script('jquery-ui-slider');
     wp_enqueue_script('jquery-ui-sortable');
     wp_enqueue_script('wp-color-picker');
     //Visual Composer
     if (class_exists('WPBakeryVisualComposerAbstract')) {
         if (defined('IS_SLUPY')) {
             $default_color = ts_get_option('slupy_skins') == "custom" ? ts_get_option('slupy_accentcolor') : ts_get_option('slupy_skins');
         } else {
             $default_color = '#31353e';
         }
         $all_colors = array('default' => $default_color, 'darkblue' => '#31353e', 'blue' => '#1ca2f1', 'green' => '#82bf06', 'orange' => '#fc5513', 'yellow' => '#ffbe05', 'white' => '#f0f0f0');
         wp_enqueue_script(TS_PLUGIN . 'custom-views', TS_PLUGIN_URL . 'js/themesama-custom-views.js', array('wpb_js_composer_js_custom_views'), '1.0.0', true);
         wp_localize_script(TS_PLUGIN . 'custom-views', 'ts_colors', $all_colors);
     }
 }
コード例 #2
0
 function get_slupy_cportfolio_output($atts = array())
 {
     extract(shortcode_atts(array('limit' => ts_get_option('portfolio_latest_works_limit') ? ts_get_option('portfolio_latest_works_limit') : '8', 'page' => '1', 'image_size' => ts_get_option('portfolio_cimage_size') ? ts_get_option('portfolio_cimage_size') : 'medium', 'ids' => '', 'model' => '2', 'exclude' => '', 'autoplay' => 'on', 'stop_hover' => 'on', 'pagination' => 'on', 'touch_drag' => 'on', 'duration_time' => '5', 'show_max_item' => '4', 'show_max_desktop' => '3', 'show_max_tablet' => '2', 'show_max_mobile' => '1'), $atts));
     wp_enqueue_style('OwlCarousel');
     wp_enqueue_script('OwlCarousel');
     $class = 'portfolio-carousel portfolio-model-' . $model;
     $attrs = ' class="' . esc_attr($class) . '"';
     $attrs .= ' data-autoplay="' . esc_attr($autoplay) . '"';
     $attrs .= ' data-stophover="' . esc_attr($stop_hover) . '"';
     $attrs .= ' data-touch="' . esc_attr($touch_drag) . '"';
     $attrs .= ' data-time="' . esc_attr($duration_time) . '"';
     $attrs .= ' data-pagination="' . esc_attr($pagination) . '"';
     $attrs .= ' data-maxitem="' . esc_attr($show_max_item) . '"';
     $attrs .= ' data-maxdesktop="' . esc_attr($show_max_desktop) . '"';
     $attrs .= ' data-maxtablet="' . esc_attr($show_max_tablet) . '"';
     $attrs .= ' data-maxmobile="' . esc_attr($show_max_mobile) . '"';
     $output = '<div' . $attrs . '>';
     $output .= get_slupy_portfolio($limit, $page, $ids, $exclude, $image_size);
     $output .= '</div>';
     return $output;
 }