public static function get_instance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; }
/** * Register */ function tmm_cc_register() { TMM_Content_Composer::get_instance(); if (!function_exists('tmm_enqueue_script')) { function tmm_enqueue_script($key) { wp_enqueue_script('tmm_' . $key); } } if (!function_exists('tmm_enqueue_style')) { function tmm_enqueue_style($key) { wp_enqueue_style('tmm_' . $key); } } if (!function_exists('tmm_get_fonts_array')) { function tmm_get_fonts_array() { return array('' => __('Default', TMM_CC_TEXTDOMAIN), 'Arial' => 'Arial', 'Tahoma' => 'Tahoma', 'Verdana' => 'Verdana', 'Calibri' => 'Calibri'); } } }
<?php TMM_Content_Composer::html_option(array('title' => __('Text Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'list_item_color[' . $key . ']', 'type' => 'color', 'description' => '', 'default_value' => isset($list_item_color[$key * 4]) && !empty($list_item_color[$key * 4]) ? TMM_Content_Composer::set_default_value('list_item_color', $list_item_color[$key * 4]) : '#fff', 'id' => '', 'css_classes' => 'list_item_color', 'display' => $value_type == 1 ? 1 : 0)); ?> <?php TMM_Content_Composer::html_option(array('title' => __('Background Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'list_item_color[' . $key . ']', 'type' => 'color', 'description' => '', 'default_value' => isset($list_item_color[$key * 4 + 1]) ? TMM_Content_Composer::set_default_value('list_item_bgcolor', $list_item_color[$key * 4 + 1]) : '#f85c37', 'id' => '', 'css_classes' => 'list_item_color', 'display' => $value_type == 1 ? 1 : 0)); ?> <?php TMM_Content_Composer::html_option(array('title' => __('Text Hover Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'list_item_color[' . $key . ']', 'type' => 'color', 'description' => '', 'default_value' => isset($list_item_color[$key * 4 + 2]) ? TMM_Content_Composer::set_default_value('list_item_hover_textcolor', $list_item_color[$key * 4 + 2]) : '#fff', 'id' => '', 'css_classes' => 'list_item_color', 'display' => $value_type == 1 ? 1 : 0)); ?> <?php TMM_Content_Composer::html_option(array('title' => __('Background Hover Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'list_item_hover_bgcolor[' . $key . ']', 'type' => 'color', 'description' => '', 'default_value' => isset($list_item_color[$key * 4 + 3]) ? TMM_Content_Composer::set_default_value('list_item_hover_bgcolor', $list_item_color[$key * 4 + 3]) : '#262626', 'id' => '', 'css_classes' => 'list_item_color', 'display' => $value_type == 1 ? 1 : 0)); ?> </td> <td style="width: 50%;"> <h5 class="label"><?php _e('Title', TMM_CC_TEXTDOMAIN); ?> </h5> <input type="text" value="<?php echo isset($titles_edit_data[$key]) ? $titles_edit_data[$key] : ''; ?> " class="list_item_title js_shortcode_template_changer data-input" style="width: 100%;" /><br /> <h5 class="label"><?php
?> </h4> <ul id="google_table_headers"> <li> <ul class="google_table_cols"> <?php foreach ($heads_values as $key => $head_value) { ?> <li style="width: <?php echo (int) 100 / $cols; ?> %;"> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => '', 'shortcode_field' => '', 'id' => '', 'options' => $head_types_array, 'default_value' => $heads_types[$key], 'description' => '', 'css_classes' => 'google_table_type')); ?> <br /> <input type="text" class="google_table_col" value="<?php echo $head_value; ?> " /> </li> <?php } ?> </ul> </li> </ul>
<?php $k = 1; for ($s = 0; $s < $slides_count; $s++) { ?> <div class="item"> <ul> <?php for ($i = $items_per_slide * ($k - 1); $i < $items_per_slide * $k; $i++) { if (isset($images[$i])) { ?> <li> <a href="<?php echo !empty($links[$i]) ? $links[$i] : '#'; ?> "><img alt="" src="<?php echo esc_url(TMM_Content_Composer::resize_image($images[$i], '')); ?> "></a> </li> <?php } } ?> </ul> </div> <?php $k++; } ?> </div>
if (!defined('ABSPATH')) { die('No direct access allowed'); } ?> <div id="tmm_shortcode_template" class="tmm_shortcode_template clearfix"> <div class="fullwidth"> <?php TMM_Content_Composer::html_option(array('type' => 'textarea', 'title' => __('Enter Text', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'content', 'id' => '', 'default_value' => TMM_Content_Composer::set_default_value('content', ''), 'description' => '')); ?> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Select Type', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'type', 'id' => 'type', 'options' => array('error' => __('Error', TMM_CC_TEXTDOMAIN), 'success' => __('Success', TMM_CC_TEXTDOMAIN), 'info' => __('Info', TMM_CC_TEXTDOMAIN), 'notice' => __('Notice', TMM_CC_TEXTDOMAIN), 'transparent' => __('Transparent', TMM_CC_TEXTDOMAIN)), 'default_value' => TMM_Content_Composer::set_default_value('type', 'notice'), 'description' => '')); ?> </div><!--/ .fullwidth--> </div><!--/ .tmm_shortcode_template-> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() {
<?php if (!defined('ABSPATH')) { die('No direct access allowed'); } ?> <div id="tmm_shortcode_template" class="tmm_shortcode_template clearfix"> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Type', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'type', 'id' => 'type', 'options' => array('' => __('Accordion', TMM_CC_TEXTDOMAIN), 'toggle' => __('Toggle', TMM_CC_TEXTDOMAIN)), 'default_value' => TMM_Content_Composer::set_default_value('type', ''), 'description' => '')); ?> </div> <br /> <br /> <div class="fullwidth"> <a class="button button-secondary js_add_accordion_item" href="#"><?php _e('Add item', TMM_CC_TEXTDOMAIN); ?> </a><br /> <ul id="list_items" class="list-items"> <?php $titles_edit_data = array(''); $content_edit_data = array('');
?> </td> <td style="width:15%"> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Fade in effect', TMM_CC_TEXTDOMAIN), 'shortcode_field' => '', 'options' => array('swing' => 'Swing', 'wobble' => 'Wobble', 'pulse' => 'Pulse', 'fadeIn' => 'FadeIn', 'fadeInUp' => 'FadeInUp', 'fadeInDown' => 'FadeInDown', 'fadeInLeft' => 'FadeInLeft', 'fadeInRight' => 'FadeInRight', 'fadeInUpBig' => 'FadeInUpBig', 'fadeInDownBig' => 'FadeInDownBig', 'fadeOutUp' => 'FadeOutUp', 'fadeOutDown' => 'FadeOutDown', 'fadeOutLeft' => 'FadeOutLeft', 'fadeOutRight' => 'FadeOutRight', 'rotateIn' => 'RotateIn', 'rotateInDownLeft' => 'RotateInDownLeft', 'rotateOut' => 'RotateOut'), 'id' => '', 'default_value' => isset($h2_fade_in[$key]) ? $h2_fade_in[$key] : 'fadeIn', 'description' => '', 'css_classes' => 'h2_fade_in')); ?> </td> <td style="width:15%"> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Fade out effect', TMM_CC_TEXTDOMAIN), 'shortcode_field' => '', 'options' => array('bounce' => 'Bounce', 'swing' => 'Swing', 'wobble' => 'Wobble', 'pulse' => 'Pulse', 'fadeIn' => 'FadeIn', 'fadeInUp' => 'FadeInUp', 'fadeInDown' => 'FadeInDown', 'fadeInLeft' => 'FadeInLeft', 'fadeInRight' => 'FadeInRight', 'fadeInUpBig' => 'FadeInUpBig', 'fadeInDownBig' => 'FadeInDownBig', 'fadeOutUp' => 'FadeOutUp', 'fadeOutDown' => 'FadeOutDown', 'fadeOutLeft' => 'FadeOutLeft', 'fadeOutRight' => 'FadeOutRight', 'rotateIn' => 'RotateIn', 'rotateInDownLeft' => 'RotateInDownLeft', 'rotateOut' => 'RotateOut'), 'id' => '', 'default_value' => isset($h2_fade_out[$key]) ? $h2_fade_out[$key] : 'fadeIn', 'description' => '', 'css_classes' => 'h2_fade_out')); ?> </td> <td style="width:16%"> <?php TMM_Content_Composer::html_option(array('type' => 'color', 'title' => __('Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => '', 'display' => 1, 'id' => '', 'default_value' => isset($h2_color[$key]) ? $h2_color[$key] : '', 'description' => '', 'css_classes' => 'h2_color')); ?> </td> </tr> </table> </li> <?php } ?> </ul> <a class="button button-secondary js_add_text_slider_item" href="#"><?php _e('Add item', TMM_CC_TEXTDOMAIN); ?> </a><br />
<ul id="list_items" class="list-items"> <?php foreach ($social_types as $key => $type) { ?> <li class="list_item tmm-mover"> <table class="list-table"> <tr> <td width="30%"> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => '', 'shortcode_field' => 'social_types', 'id' => '', 'options' => $social_types_array, 'default_value' => $type, 'description' => '', 'css_classes' => 'list_item_style save_as_one')); ?> </td> <td width="70%"> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => '', 'shortcode_field' => 'links', 'id' => '', 'css_classes' => 'list_item_style save_as_one', 'default_value' => isset($links[$key]) ? $links[$key] : '', 'description' => '', 'placeholder' => __('http://', TMM_CC_TEXTDOMAIN))); ?> </td> <td> <a class="button button-secondary js_delete_list_item" href="#"><?php _e('Remove', TMM_CC_TEXTDOMAIN); ?> </a> </td> <td></td> </tr> </table> </li> <?php } ?>
<div class="bg_custom_type_video" style="display: none;"> <?php TMM_Content_Composer::html_option(array('type' => 'upload_video', 'title' => __('Background Video', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'row_bg_video', 'id' => 'row_bg_video', 'default_value' => $tmm_row_options['bg_video'], 'description' => 'Examples: https://www.youtube.com/watch?v=_EBYf3lYSEg http://vimeo.com/22439234 or upload self hosted video')); ?> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Show / Hide video control panel', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'row_background_video_panel', 'id' => 'row_bg_video_panel', 'default_value' => $tmm_row_options['bg_video_panel'], 'is_checked' => true, 'description' => __('Show / Hide video control panel', TMM_CC_TEXTDOMAIN))); ?> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Mute audio on video', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'row_background_video_mute', 'id' => 'row_bg_video_mute', 'default_value' => $tmm_row_options['bg_video_mute'], 'is_checked' => false, 'description' => __('Mute audio on video', TMM_CC_TEXTDOMAIN))); ?> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Repeat videos automatically', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'row_background_video_loop', 'id' => 'row_bg_video_loop', 'default_value' => $tmm_row_options['bg_video_loop'], 'is_checked' => true, 'description' => __('Repeat videos automatically', TMM_CC_TEXTDOMAIN))); ?> </div> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Row Background Fullscreen', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'row_background_fullscreen', 'id' => 'row_bg_fullscreen', 'default_value' => $tmm_row_options['bg_fullscreen'], 'is_checked' => false, 'description' => __('Set The Row Background Image Fullscreen', TMM_CC_TEXTDOMAIN))); ?> </div> </div> </div> </div>
</div> <div class="one-half"> <?php $row_count_array = array(); for ($i = 1; $i <= 20; $i++) { $row_count_array[$i] = $i; } TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Row Count', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'row_count', 'id' => 'row_count', 'options' => $row_count_array, 'default_value' => TMM_Content_Composer::set_default_value('row_count', 4), 'description' => '')); ?> </div><!--/ .one-half--> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('title' => __('Effect for Appearing Table', TMM_CC_TEXTDOMAIN), 'type' => 'select', 'shortcode_field' => 'effect_type', 'id' => 'effect_type', 'default_value' => TMM_Content_Composer::set_default_value('effect_type', 'elementFade'), 'options' => array('elementFade' => __('Element Fade', TMM_CC_TEXTDOMAIN), 'opacity' => __('Opacity', TMM_CC_TEXTDOMAIN), 'opacity2xRun' => __('Opacity 2x Run', TMM_CC_TEXTDOMAIN), 'scale' => __('Scale', TMM_CC_TEXTDOMAIN), 'slideRight' => __('Slide Right', TMM_CC_TEXTDOMAIN), 'slideLeft' => __('Slide Left', TMM_CC_TEXTDOMAIN), 'slideDown' => __('Slide Down', TMM_CC_TEXTDOMAIN), 'slideUp' => __('Slide Up', TMM_CC_TEXTDOMAIN), 'slideUp2x' => __('Slide Up 2x', TMM_CC_TEXTDOMAIN), 'extraRadius' => __('Extra Radius', TMM_CC_TEXTDOMAIN)), 'description' => __('Effect for Appearing Post.', TMM_CC_TEXTDOMAIN))); ?> </div> <ul id="price_tables_list"> <?php $shortcodes_texts_array = array(0 => '[price_table title="' . __('Starter Package', TMM_CC_TEXTDOMAIN) . '" price="' . __('$19.95', TMM_CC_TEXTDOMAIN) . '" period="' . __('per month', TMM_CC_TEXTDOMAIN) . '" button_text="' . __('Get Started', TMM_CC_TEXTDOMAIN) . '" button_link="#" featured="0"]^^^[/price_table]'); //*** if (isset($_REQUEST["shortcode_mode_edit"])) { $shortcodes_texts_array = array(); $edit_data_array = array(); //*** //parcing data $content_edit_data = $_REQUEST["shortcode_mode_edit"]['content']; $content_edit_data = str_replace('__PRICE_TABLE__', '[price_table', $content_edit_data);
$section_style_attr .= 'margin-bottom:' . $margin_bottom . 'px;'; } /* background */ if (!empty($tmm_layout_constructor_row[$row]['bg_type']) && $tmm_layout_constructor_row[$row]['bg_type'] !== 'none') { if ($tmm_layout_constructor_row[$row]['bg_custom_type'] == 'image' && !empty($tmm_layout_constructor_row[$row]['bg_image'])) { $section_class .= ' parallax'; $section_style_attr .= 'background-image: url(' . $tmm_layout_constructor_row[$row]["bg_image"] . ');'; if (!empty($tmm_layout_constructor_row[$row]['bg_attachment'])) { $section_class .= ' bg-scroll'; } } if ($tmm_layout_constructor_row[$row]['bg_custom_type'] == 'image' && !empty($tmm_layout_constructor_row[$row]['overlay'])) { $display_overlay = true; $overlay_style_attr = ''; if (!empty($tmm_layout_constructor_row[$row]['bg_overlay_color'])) { $overlay_style_attr .= TMM_Content_Composer::hex2RGB($tmm_layout_constructor_row[$row]['bg_overlay_color'], true); } else { $overlay_style_attr .= '0,0,0'; } if (isset($tmm_layout_constructor_row[$row]['bg_overlay_opacity'])) { $overlay_style_attr .= ',' . intval($tmm_layout_constructor_row[$row]['bg_overlay_opacity']) / 100; } else { $overlay_style_attr .= ',1'; } if (!empty($overlay_style_attr)) { $overlay_style_attr = ' style="background-color:rgba(' . $overlay_style_attr . ')"'; } } if ($tmm_layout_constructor_row[$row]['bg_custom_type'] == 'video' && !empty($tmm_layout_constructor_row[$row]['bg_video'])) { $video_type = TMM_Layout_Constructor::get_video_type($tmm_layout_constructor_row[$row]['bg_video']); $top = $post->post_type == 'page' && empty($post->post_content) && $first_row['bg_custom_type'] == 'video' ? '0' : '100px';
$content_edit_data = array('#'); if (isset($_REQUEST["shortcode_mode_edit"])) { $titles_edit_data = explode('^', $_REQUEST["shortcode_mode_edit"]['titles']); $content_edit_data = explode('^', $_REQUEST["shortcode_mode_edit"]['content']); } ?> <?php foreach ($content_edit_data as $key => $content_edit_text) { ?> <li class="list_item"> <table class="list-table"> <tr> <td valign="top" style="width: 100%;"> <?php TMM_Content_Composer::html_option(array('type' => 'upload', 'title' => '', 'shortcode_field' => '', 'id' => '', 'default_value' => $titles_edit_data[$key], 'description' => '', 'css_classes' => 'accordion_item_title')); ?> </td> <td><a class="button button-secondary js_delete_accordion_item js_shortcode_template_changer" href="#"><?php _e('Remove', TMM_CC_TEXTDOMAIN); ?> </a></td> </tr> <tr> <td valign="top" style="width: 100%;" colspan="2"> <input type="text" value="<?php echo $content_edit_text; ?> " class="accordion_item_content js_shortcode_template_changer" style="width: 100%;" /> </td> </tr>
public static function display_rowbg_video($video_options) { if (TMM_Layout_Constructor::check_user_agent('mobile')) { if (isset($video_options['bg_cover']) && !empty($video_options['bg_cover'])) { ?> <div style="<?php echo !empty($video_options['bg_cover']) ? 'background-image: url(' . $video_options['bg_cover'] . ');' : ''; ?> " class="full-bg-image full-bg-image-scroll"></div> <?php } } else { if (isset($video_options['video_url']) and !empty($video_options['video_url'])) { $mute = $video_options['mute'] ? 1 : 0; $loop = $video_options['loop'] ? 1 : 0; switch ($video_options['video_type']) { case 'youtube': $source_code = explode("?v=", $video_options['video_url']); $source_code = explode("&", $source_code[1]); if (is_array($source_code)) { $source_code = $source_code[0]; } ?> <div class="mb-wrapper"> <div id="ytplayer" class="fitwidth"></div> </div> <script> var tag = document.createElement('script'); tag.src = "https://www.youtube.com/player_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player, playerVars, loop = <?php echo $loop; ?> ; if (loop){ playerVars = {'autoplay': 1, 'controls': 0, 'wmode':'transparent', 'loop': true, 'playlist': '<?php echo $source_code; ?> ', 'showinfo': 0 } } else { playerVars = {'autoplay': 1, 'controls': 0, 'wmode':'transparent', 'showinfo': 0 } } function onYouTubePlayerAPIReady() { player = new YT.Player('ytplayer', { playerVars: playerVars, videoId: '<?php echo $source_code; ?> ', height: '100%', width: '100%', events: { 'onReady': onPlayerReady } }); } function onPlayerReady(event) { var mute = <?php echo $mute; ?> ; if (mute == 1){ event.target.mute(); jQuery('.bt_mute').attr({'data-click': 'unMute'}); jQuery('.icon-volume-off').parent('span').hide(); jQuery('.icon-volume-up').parent('span').show(); }else{ jQuery('.icon-volume-off').parent('span').show(); jQuery('.icon-volume-up').parent('span').hide(); } jQuery('.video_control_panel').show(); jQuery('.icon-play').parent('span').hide(); jQuery('.icon-pause-2').parent('span').show(); jQuery('.bt_play').on('click', function(){ var $this = jQuery(this), attrclick = $this.attr('data-click'); if (attrclick == 'play'){ $this.attr({'data-click': 'pause'}); player.playVideo(); jQuery('.icon-play').parent('span').hide(); jQuery('.icon-pause-2').parent('span').show(); }else{ $this.attr({'data-click': 'play'}); player.pauseVideo(); jQuery('.icon-play').parent('span').show(); jQuery('.icon-pause-2').parent('span').hide(); } return false; }); jQuery('.bt_mute').on('click', function(){ var $this = jQuery(this), attrclick = $this.attr('data-click'); if (attrclick == 'mute'){ $this.attr({'data-click': 'unMute'}); player.mute(); jQuery('.icon-volume-off').parent('span').hide(); jQuery('.icon-volume-up').parent('span').show(); }else{ $this.attr({'data-click': 'mute'}); player.unMute(); jQuery('.icon-volume-off').parent('span').show(); jQuery('.icon-volume-up').parent('span').hide(); } return false; }); } </script> <?php break; case 'vimeo': $source_code = explode("/", $video_options['video_url']); if (is_array($source_code)) { $source_code = $source_code[count($source_code) - 1]; } ?> <div class="mb-wrapper"> <script src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script> <iframe id="vimeo_player" src="http://player.vimeo.com/video/<?php echo $source_code; ?> ?api=1&loop=<?php echo $loop; ?> &player_id=vimeo_player&autoplay=1" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> </div><!--/ .mb-wrapper--> <script> (function($) { $(function() { var iframe = $('#vimeo_player')[0]; var player = $f(iframe); var status = $('.status'); var mute = <?php echo $mute; ?> ; // When the player is ready, add listeners for pause, finish, and playProgress player.addEvent('ready', function() { if (mute == 1){ player.api('setVolume', '0'); $('.bt_mute').attr({'data-click': 'unMute'}); jQuery('.icon-volume-off').parent('span').hide(); jQuery('.icon-volume-up').parent('span').show(); }else{ jQuery('.icon-volume-off').parent('span').show(); jQuery('.icon-volume-up').parent('span').hide(); } }); jQuery('.icon-play').parent('span').hide(); jQuery('.icon-pause-2').parent('span').show(); jQuery('.video_control_panel').show(); $('.bt_play').on('click', function() { var $this = $(this), attrclick = $(this).attr('data-click'); if (attrclick == 'play'){ $this.attr({'data-click': 'pause'}); player.api('play'); jQuery('.icon-play').parent('span').hide(); jQuery('.icon-pause-2').parent('span').show(); }else{ $this.attr({'data-click': 'play'}); player.api('pause'); jQuery('.icon-play').parent('span').show(); jQuery('.icon-pause-2').parent('span').hide(); } return false; }); $('.bt_mute').on('click', function() { var $this = $(this), attrclick = $(this).attr('data-click'); if (attrclick == 'mute'){ $this.attr({'data-click': 'unMute'}); player.api('setVolume', '0'); jQuery('.icon-volume-off').parent('span').hide(); jQuery('.icon-volume-up').parent('span').show(); }else{ $this.attr({'data-click': 'mute'}); player.api('setVolume', '1'); jQuery('.icon-volume-off').parent('span').show(); jQuery('.icon-volume-up').parent('span').hide(); } return false; }); }); })(jQuery); </script> <?php break; case 'mp4': ?> <div class="mb-wrapper" data-mute="<?php echo $mute; ?> " data-loop="<?php echo $loop; ?> "> <video id="example_video" class="" width="100%" height="100%" > <source src="<?php echo $video_options['video_url']; ?> " type='video/mp4' /> </video> </div> <?php wp_enqueue_script('mediaelement'); break; case 'ogv': ?> <div class="mb-wrapper" data-mute="<?php echo $mute; ?> " data-loop="<?php echo $loop; ?> "> <video id="example_video" class="" width="100%" height="100%" > <source src="<?php echo $video_options['video_url']; ?> " type='video/ogg' /> </video> </div> <?php wp_enqueue_script('mediaelement'); break; case 'webm': ?> <div class="mb-wrapper" data-mute="<?php echo $mute; ?> " data-loop="<?php echo $loop; ?> "> <video id="example_video" class="" width="100%" height="100%" > <source src="<?php echo $video_options['video_url']; ?> " type='video/webm' /> </video> </div> <?php wp_enqueue_script('mediaelement'); break; default: $cover = $video_options['bg_cover']; $image_size = "2000*1345"; if (!empty($cover)) { ?> <div class="full-bg-image full-bg-image-scroll" style="background-image: url('<?php echo TMM_Content_Composer::resize_image_cover($cover, $image_size); ?> ');"></div> <?php } else { _e('Unsupported video format', TMM_CC_TEXTDOMAIN); } break; } if (isset($video_options['panel']) && $video_options['panel']) { TMM_Layout_Constructor::get_video_control_panel(); } } } }
<div class="one-half"> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Products Per Page', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'products_per_page', 'id' => 'products_per_page', 'default_value' => TMM_Content_Composer::set_default_value('products_per_page', 12), 'description' => '')); ?> </div><!--/ .one-half--> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Columns', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'columns', 'id' => 'columns', 'options' => array(2 => 2, 3 => 3, 4 => 4), 'default_value' => TMM_Content_Composer::set_default_value('columns', 3), 'description' => '')); ?> </div><!--/ .one-half--> <div class="one-half"> <?php $product_type = array('featured_products' => __('Featured', TMM_CC_TEXTDOMAIN), 'best_selling_products' => __('Best Selling', TMM_CC_TEXTDOMAIN), 'sale_products' => __('Sale Products', TMM_CC_TEXTDOMAIN)); TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Select Products Type', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'type', 'id' => 'type', 'options' => $product_type, 'default_value' => TMM_Content_Composer::set_default_value('type', 'featured_products'), 'description' => __('Select products type', TMM_CC_TEXTDOMAIN))); ?> </div><!--/ .one-half--> </div><!--/ .tmm_shortcode_template-> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() { tmm_ext_shortcodes.changer(shortcode_name); jQuery("#tmm_shortcode_template .js_shortcode_template_changer").on('keyup change', function() { tmm_ext_shortcodes.changer(shortcode_name);
</div> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Transparent Border Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'border_color_transparent', 'id' => 'border_color_transparent', 'is_checked' => TMM_Content_Composer::set_default_value('border_color_transparent', false), 'default_value' => TMM_Content_Composer::set_default_value('border_color_transparent', false), 'description' => '')); ?> </div><!--/ .one-half--> <div class="one-half"> <div class="align-left"> <?php TMM_Content_Composer::html_option(array('type' => 'color', 'title' => __('Mouseover Border Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'mouseover_border_color', 'id' => '', 'default_value' => TMM_Content_Composer::set_default_value('mouseover_border_color', ''), 'description' => '', 'display' => 1)); ?> </div> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Transparent Mouseover Border Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'mouseover_border_color_transparent', 'id' => 'mouseover_border_color_transparent', 'is_checked' => TMM_Content_Composer::set_default_value('mouseover_border_color_transparent', false), 'default_value' => TMM_Content_Composer::set_default_value('mouseover_border_color_transparent', false), 'description' => '')); ?> </div><!--/ .one-half--> </div> </div><!--/ .tmm_shortcode_template-> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?>
<li class="list_item tmm-mover"> <table class="list-table"> <tr> <td width="20%"> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => '', 'shortcode_field' => 'title', 'id' => '', 'css_classes' => 'list_item_style save_as_one js_shortcode_template_changer', 'default_value' => $titles[$key], 'description' => '', 'placeholder' => __('Title', TMM_CC_TEXTDOMAIN))); ?> </td> <td width="50%"> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => '', 'shortcode_field' => 'percentage', 'id' => '', 'css_classes' => 'list_item_style save_as_one js_shortcode_template_changer', 'default_value' => $percentages[$key], 'description' => '', 'placeholder' => __('Percentage %', TMM_CC_TEXTDOMAIN))); ?> </td> <td width="50%"> <?php TMM_Content_Composer::html_option(array('type' => 'color', 'title' => '', 'shortcode_field' => 'color', 'id' => 'color_' . uniqid(), 'css_classes' => 'list_item_style save_as_one js_shortcode_template_changer', 'default_value' => $color, 'description' => '', 'display' => 1)); ?> </td> <td> <a class="button button-secondary js_delete_list_item" href="#"><?php _e('Remove', TMM_CC_TEXTDOMAIN); ?> </a> </td> <td></td> </tr> </table> </li> <?php }
<?php if (!defined('ABSPATH')) { die('No direct access allowed'); } ?> <div id="tmm_shortcode_template" class="tmm_shortcode_template clearfix"> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Select Type', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'content', 'id' => '', 'options' => array('separator' => __('Line', TMM_CC_TEXTDOMAIN), 'divider' => __('Dashed', TMM_CC_TEXTDOMAIN), 'double-divider' => __('Double Divider', 'tmm_shortcodes')), 'default_value' => TMM_Content_Composer::set_default_value('content', 'separator'), 'description' => '')); ?> </div><!--/ .one-half--> </div> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() { tmm_ext_shortcodes.changer(shortcode_name); jQuery("#tmm_shortcode_template .js_shortcode_template_changer").on('keyup change', function() { tmm_ext_shortcodes.changer(shortcode_name); }); });
<div class="one-half option-default"> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Lazy Loading', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'infinity_pagination', 'id' => 'infinity_pagination', 'is_checked' => TMM_Content_Composer::set_default_value('infinity_pagination', 0), 'description' => __('Lazy Loading', TMM_CC_TEXTDOMAIN))); ?> </div><!--/ .ona-half--> <div class="one-half option-carousel"> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Use as Post Carousel', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'post_carousel', 'id' => 'post_carousel', 'is_checked' => TMM_Content_Composer::set_default_value('post_carousel', 0), 'description' => __('Use as Post Carousel', TMM_CC_TEXTDOMAIN))); ?> </div> <div class="one-half option-masonry"> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Load Posts By Scrolling', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'load_by_scrolling', 'id' => 'load_by_scrolling', 'is_checked' => TMM_Content_Composer::set_default_value('load_by_scrolling', true), 'default_value' => TMM_Content_Composer::set_default_value('load_by_scrolling', true), 'description' => '')); ?> </div><!--/ .one-half--> </div> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() { tmm_ext_shortcodes.changer(shortcode_name);
if (!empty($margin_bottom)) { $styles .= 'margin-bottom: ' . (int) $margin_bottom . 'px; '; } // Styles if (!empty($styles)) { $styles = 'style="' . $styles . '"'; } if ($parallax && $action == "none") { $html .= '<section class="section padding-off parallax parallax-bg-2 bg-black-color">'; $html .= '<div class="full-bg-image" style="background-image:url(' . esc_url($image_url) . ')"></div>'; $html .= '<div id="fullscreen" class="full-screen"></div>'; } if ($action != "none" || $action == "none" && !$parallax) { // Link Start if ($action == "link") { $html .= '<a title="' . esc_attr($link_title) . '" class="link-icon slide-image active-link ' . esc_attr($align) . '" href="' . esc_url($image_action_link) . '" target="' . esc_attr($target) . '">'; } if ($action == 'lightbox') { $html .= '<a title="' . esc_attr($image_alt) . '" class="slide-image image-link active-link plus-icon ' . esc_attr($align) . '" href="' . esc_url($image_url) . '">'; } $src = TMM_Content_Composer::resize_image($image_url, $image_size_alias); $html .= '<img class="' . esc_attr($classAbs) . esc_attr($classAnim) . esc_attr($effect) . esc_attr($align) . '" alt="' . esc_attr($image_alt) . '" ' . $styles . ' src="' . esc_url($src) . '" />'; // Link End if ($action == "link" || $action == "lightbox") { $html .= '</a>'; } } if ($parallax && $action == "none") { $html .= '</section>'; } echo $html;
<?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Columns', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'columns', 'id' => 'columns', 'options' => array(2 => 2, 3 => 3, 4 => 4), 'default_value' => TMM_Content_Composer::set_default_value('columns', 3), 'description' => '')); ?> </div><!--/ .one-half--> <div class="one-half"> <?php $args = array('pad_counts' => 1, 'show_counts' => 1, 'hierarchical' => 1, 'hide_empty' => 1, 'show_uncategorized' => 1, 'orderby' => 'name', 'menu_order' => false); $terms = get_terms('product_cat', $args); $product_categories = array('0' => __('None', TMM_CC_TEXTDOMAIN)); if ($terms) { foreach ($terms as $term) { $product_categories[$term->slug] = $term->name; } } TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Select Category', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'category', 'id' => 'category', 'options' => $product_categories, 'default_value' => TMM_Content_Composer::set_default_value('category', ''), 'description' => __('Display products by selected category', TMM_CC_TEXTDOMAIN))); ?> </div><!--/ .one-half--> </div><!--/ .tmm_shortcode_template-> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() { tmm_ext_shortcodes.changer(shortcode_name); jQuery("#tmm_shortcode_template .js_shortcode_template_changer").on('keyup change', function() { tmm_ext_shortcodes.changer(shortcode_name);
<table class="list-table"> <tr> <td> <i class="<?php echo !empty($styles_edit_data) ? $type_array[$styles_edit_data[$key]] : ''; ?> "></i> </td> <td style="width: 15%"> <?php TMM_Content_Composer::html_option(array('type' => 'select', 'title' => '', 'shortcode_field' => 'action', 'id' => '', 'options' => $type_array, 'default_value' => empty($styles_edit_data) ? '' : $styles_edit_data[$key], 'description' => '', 'css_classes' => 'list_item_style', 'display' => empty($styles_edit_data) ? 0 : 1)); ?> </td> <td style="width: 30%"> <?php TMM_Content_Composer::html_option(array('title' => '', 'shortcode_field' => 'colors', 'type' => 'color', 'description' => '', 'default_value' => empty($color_data) ? '' : $color_data[$key], 'id' => '', 'css_classes' => 'list_item_color', 'display' => 1)); ?> </td> <td style="width: 50%; vertical-align: top;"> <input type="text" value="<?php echo $content_edit_text; ?> " class="list_item_content js_shortcode_template_changer data-area" /> </td> <td> <a class="button button-secondary js_delete_list_item js_shortcode_template_changer" href="#"><?php _e('Remove', TMM_CC_TEXTDOMAIN); ?> </a> </td> <td></td>
<div class="fullwidth"> <?php TMM_Content_Composer::html_option(array('type' => 'textarea', 'title' => __('Enter text', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'content', 'id' => '', 'default_value' => TMM_Content_Composer::set_default_value('content', ''), 'description' => '')); ?> </div><!--/ .fullwidth--> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('title' => __('Text Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'type', 'type' => 'select', 'default_value' => '', 'description' => '', 'options' => array('type-1' => 'type-1', 'type-bg-color' => 'type-bg-color'), 'default_value' => TMM_Content_Composer::set_default_value('type', 'type-1'), 'id' => '', 'display' => 1)); ?> </div> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('title' => __('Author', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'author', 'type' => 'text', 'description' => '', 'default_value' => TMM_Content_Composer::set_default_value('author', ''), 'id' => '', 'display' => 1)); ?> </div> </div><!--/ .tmm_shortcode_template-> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() { tmm_ext_shortcodes.changer(shortcode_name);
?> <br /> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Link Title', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'link_title', 'id' => 'link_title', 'default_value' => TMM_Content_Composer::set_default_value('link_title', ''), 'description' => '')); ?> </div> <div id="image_without_link" style="display: <?php echo $action == 'none' ? 'block' : 'none'; ?> ;"> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Parallax Image (On / Off)', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'parallax', 'id' => 'parallax', 'is_checked' => TMM_Content_Composer::set_default_value('parallax', 0), 'description' => '')); ?> </div> </div><!--/ .one-half--> </div> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> ";
<?php if (!defined('ABSPATH')) { die('No direct access allowed'); } ?> <div id="tmm_shortcode_template" class="tmm_shortcode_template clearfix"> <div class="full-width"> <?php TMM_Content_Composer::html_option(array('type' => 'upload', 'title' => __('Link to Audio', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'content', 'id' => '', 'default_value' => TMM_Content_Composer::set_default_value('content', ''), 'description' => '')); ?> </div><!--/ .one-half--> <div class="clear"></div> </div> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() { tmm_ext_shortcodes.changer(shortcode_name);
?> "> <source type="video/webm" src="<?php echo esc_url($source_code); ?> " /> </video> <?php wp_enqueue_style('tmm_mediaelement'); wp_enqueue_script('mediaelement'); break; default: $cover = isset($cover_id) && has_post_thumbnail($cover_id) ? TMM_Content_Composer::get_post_featured_image($cover_id, '') : ''; if (!empty($cover)) { ?> <img src="<?php echo TMM_Content_Composer::resize_image_cover($cover, $image_size); ?> " alt="<?php _e('Unsupported video format', TMM_CC_TEXTDOMAIN); ?> " /> <?php } else { _e('Unsupported video format', TMM_CC_TEXTDOMAIN); } break; } ?> </div>
} ?> <div id="tmm_shortcode_template" class="tmm_shortcode_template clearfix"> <div class="fullwidth"> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Enter Address', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'content', 'id' => '', 'default_value' => TMM_Content_Composer::set_default_value('content', ''), 'description' => '')); ?> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Enter Phone', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'phone', 'id' => 'phone', 'default_value' => TMM_Content_Composer::set_default_value('phone', ''), 'description' => '')); ?> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Enter Email', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'email', 'id' => 'email', 'default_value' => TMM_Content_Composer::set_default_value('email', ''), 'description' => '')); ?> </div><!--/ .fullwidth--> </div><!--/ .tmm_shortcode_template-> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> ";
<?php $args = array('post_type' => 'product', 'posts_per_page' => -1, 'no_found_rows' => 1, 'post_status' => 'publish', 'meta_query' => array(array('key' => '_visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN'))); $products_query = new WP_Query($args); $products = array(); if ($products_query) { foreach ($products_query->posts as $product) { $products[$product->ID] = $product->post_title; } } TMM_Content_Composer::html_option(array('type' => 'select', 'title' => __('Select Product', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'product_id', 'id' => 'product_id', 'options' => $products, 'default_value' => TMM_Content_Composer::set_default_value('product_id', ''), 'description' => __('Select single product by title', TMM_CC_TEXTDOMAIN))); ?> </div><!--/ .one-half--> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Product SKU', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'sku', 'id' => 'sku', 'default_value' => TMM_Content_Composer::set_default_value('sku', ''), 'description' => __('Display single product by SKU.', TMM_CC_TEXTDOMAIN))); ?> </div><!--/ .one-half--> </div><!--/ .tmm_shortcode_template-> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() { tmm_ext_shortcodes.changer(shortcode_name); jQuery("#tmm_shortcode_template .js_shortcode_template_changer").on('keyup change', function() { tmm_ext_shortcodes.changer(shortcode_name);
?> </div> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('type' => 'checkbox', 'title' => __('Split Title in Rows and Animate Each Row', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'word_animate', 'id' => 'word_animate', 'is_checked' => TMM_Content_Composer::set_default_value('word_animate', 0), 'description' => '')); ?> <div class="separate_row" style="<?php echo TMM_Content_Composer::set_default_value('word_animate', 0) ? 'display:block' : 'display:none'; ?> "> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Split Title with the help "^" symbol', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'separate_row', 'id' => 'separate_row', 'description' => '', 'default_value' => TMM_Content_Composer::set_default_value('separate_row', ''))); ?> </div> </div> </div> <!--/ .tab-content--> </div> <!--/ .tabs-container--> </div> </div>
</div><!--/ .one-half--> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Chart Data', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'content', 'id' => '', 'default_value' => TMM_Content_Composer::set_default_value('content', ''), 'description' => __('Example:', TMM_CC_TEXTDOMAIN) . '<br />Pie => sleep:2,eat:2,work:2<br /> Bar, Column => 2004:1000:400,2005:980:570,2006:800:300<br /> Line, Area => 2004:1000:400,2005:1170:460,2006:660:1120,2007:1030:540<br /> Combo => 2004/05:165:938:522:998:450:614.6,2005/06:135:1120:599:1268:288:682,2006/07:157:1167:587:807:397:623,2007/08:139:1110:615:968:215:609.4,2008/09:136:691:629:1026:366:569.6<br /> Geochart => Germany:200,France:300,United States:400<br />')); ?> </div><!--/ .one-half--> <div class="one-half"> <?php TMM_Content_Composer::html_option(array('type' => 'text', 'title' => __('Background Color', TMM_CC_TEXTDOMAIN), 'shortcode_field' => 'bgcolor', 'id' => 'bgcolor', 'default_value' => TMM_Content_Composer::set_default_value('bgcolor', ''), 'description' => '')); ?> </div><!--/ .one-half--> </div> <!-- -------------------------- PROCESSOR --------------------------- --> <script type="text/javascript"> var shortcode_name = "<?php echo basename(__FILE__, '.php'); ?> "; jQuery(function() {