This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
setTimeout(function(){ | |
$(window).trigger('resize'); | |
}, 500); | |
function dtResize() { | |
var elements = []; | |
elements['accord']= jQuery(".wpb_accordion_header"), | |
elements['ult_tab'] = $(".ult_tabs > ul >li"), | |
elements['theme_tab'] = $(".wpb_tour_tabs_wrapper > ul >li"), | |
elements['togg'] = $(".wpb_toggle"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span style="padding-right:5px;"><input type="email" name="EMAIL" placeholder="Your Email Address" required /></span> | |
<input type="submit" value="Notify Me!" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Remove All Meta Generators | |
function remove_meta_generators($html) { | |
$pattern = '/<meta name(.*)=(.*)"generator"(.*)>/i'; | |
$html = preg_replace($pattern, '', $html); | |
return $html; | |
} | |
function clean_meta_generators($html) { | |
ob_start('remove_meta_generators'); | |
} | |
add_action('get_header', 'clean_meta_generators', 100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dt_add_CPT_to_microsite_metabox() { | |
global $DT_META_BOXES; | |
if ( $DT_META_BOXES ) { | |
foreach($DT_META_BOXES as $id => $metabox) { | |
if ( isset( $metabox['id'] ) && ( $metabox['id'] == 'dt_page_box-microsite' ) || ( $metabox['id'] == 'dt_page_box-microsite_logo' ) ) { | |
$DT_META_BOXES[$id]['pages'][] = 'my_custom_postytype'; | |
break; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'the7_archive_page_template_id', function( $page_id ) { | |
if ( ! $page_id ) { | |
if (is_post_type_archive('tribe_events')) //"tribe_events" - it is cuttom post type | |
$page_id = 9999; //replace to template page id | |
} | |
return $page_id; | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function modalAutoPlayVideo(modalWrapper){ | |
"use strict"; | |
var $youtubeframe = modalWrapper.find(".ult_modal-body iframe"); | |
if ($youtubeframe.length){ | |
var videosrc = $youtubeframe.attr('videosrc'); | |
if (videosrc == null) | |
{ | |
var videosrc = $youtubeframe.attr('src'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'dt_of_get_option', 'dt_get_options_rewrite', 10, 2 ); | |
function dt_get_options_rewrite($saved_options, $name) { | |
if ($name !== 'general-post_type_portfolio_slug') return $saved_options; | |
if (!function_exists('pll_current_language')) return $saved_options; | |
$lang = pll_current_language('slug'); | |
switch ($lang){ | |
case "en": | |
$saved_options[$name] = 'englishslug'; | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'the7-popup-share-buttons-title', function( $texts ) { | |
$texts['download'] = __( 'Download image', 'the7mk2' ); | |
return $texts; | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'presscore_before_post_content', function() { | |
global $post; | |
if ( get_post_type() !== 'dt_team' ) { | |
return; | |
} | |
echo '<div class="post-thumbnail">'; | |
$img_args = array( | |
'img_id' => get_post_thumbnail_id(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dt_add_CPT_to_microsite_metabox() { | |
global $DT_META_BOXES; | |
if ( $DT_META_BOXES ) { | |
foreach($DT_META_BOXES as $id => $metabox) { | |
if ( isset( $metabox['id'] ) && ( $metabox['id'] == 'dt_page_box-microsite' ) ) { | |
$DT_META_BOXES[$id]['only_on']['template'][] = 'template-microsite2.php'; | |
//template-microsite2.php is the copy of the microsite template |