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
<?php | |
function search_replacement($term){ | |
return ltrim(str_replace( array('0x'), array('0 x '), urldecode(strtolower($term)) )); | |
} | |
// ajax search: | |
function replace_search( $query_object ) | |
{ | |
if( $query_object->is_search() ) { | |
$raw_search = $query_object->query['s']; |
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
<?php | |
function acf_get_field_shortcode($args = array()){ | |
if(!function_exists("get_field")) return ""; | |
$field = (isset($args["field"]) && !empty($args["field"]))?get_field($args["field"]):false; | |
if($field) return $field; | |
return ""; | |
} | |
add_shortcode("acf_get_field","acf_get_field_shortcode"); |
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
<?php | |
function editor_font_sizes($unitOnly = false, $lineHeightOnly = false){ | |
if($rootFont = get_theme_mod("rootTypography")){ | |
$rootFontSize = "16px"; | |
$rootLineHeight = 1.3; | |
if(isset($rootFont["size"]["desktop"])) | |
$rootFontSize = $rootFont["size"]["desktop"]; | |
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
<?php | |
function add_blocksy_bodyclasses($classes){ | |
if($blocksy = get_post_meta(get_the_ID(),"blocksy_post_meta_options",true)){ | |
if(isset($blocksy["disable_header"]) && $blocksy["disable_header"] == "yes") | |
$classes[] = "blocksy-header-disabled"; | |
if(isset($blocksy["disable_footer"]) && $blocksy["disable_footer"] == "yes") | |
$classes[] = "blocksy-footer-disabled"; | |
} | |
return $classes; | |
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
<?php | |
// conditionally load sal.js assets | |
function lmdm_animation_scripts(){ | |
if(is_singular()) { | |
$blocks = parse_blocks(do_shortcode(get_post(get_the_ID())->post_content)); | |
if(is_array($blocks)){ | |
foreach($blocks as $block){ | |
if(isset($block["attrs"]["effect"]) && !empty($block["attrs"]["effect"])){ | |
wp_enqueue_style('saljs-style', get_stylesheet_directory() . '_js/saljs/sal.css'); | |
wp_enqueue_script('lmdm-saljs', get_stylesheet_directory() . '_js/saljs/sal.js', null, "1.0"); |
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
<?php | |
echo do_shortcode("[borlabs-cookie id='youtube' type='content-blocker'][youtubeplayer id=".$inhalt["ytid"]."][/borlabs-cookie]"); | |
?> |
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
<?php | |
function blocksy_layout_update($editor_settings, $block_editor_context){ | |
// default values: | |
$editor_settings["__experimentalFeatures"]["layout"]["contentSize"] = "var(--has-wide, var(--block-max-width))"; | |
$editor_settings["__experimentalFeatures"]["layout"]["wideSize"] = "calc(var(--block-max-width) + 260px)"; | |
// maybe add offset values: | |
if($mods = get_theme_mods()) | |
if(isset($mods["wideOffset"])) | |
$editor_settings["__experimentalFeatures"]["layout"]["wideSize"] = "calc(var(--block-max-width) + ".($mods["wideOffset"]*2)."px)"; | |
return $editor_settings; |