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; |
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 | |
| // 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 | |
| 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 | |
| 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 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 set_image_link_to_loop_image($html, $args){ | |
| if(get_bloginfo("version") < 6.2) return $html; | |
| if(!isset($args["attrs"]["isLink"])) return $html; | |
| $p = new \WP_HTML_Tag_Processor( $html ); | |
| if ( $p->next_tag("a") ) { | |
| $p->set_attribute( 'href', get_the_post_thumbnail_url() ); | |
| $html = $p->get_updated_html(); |
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 maybe_output_content_hook($content,$id){ | |
| if(get_post_type() != "set") return $content; | |
| $is_unknown = (get_post_meta(get_the_ID(),"sync_status",1) == "unknown_item")??false; | |
| if($is_unknown && get_the_title($id) == "Set-View") | |
| $content = ""; | |
| if(!$is_unknown && get_the_title($id) == "Set-View: Syncing") |
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 | |
| /* usage: | |
| ** [blocksy_search] | |
| ** [blocksy_search placeholder="Try the Search"] | |
| ** [blocksy_search post_type="locations" height="60px"] | |
| ** [blocksy_search no_liveresults="true" fontsize="22px" padding="20px"] | |
| */ | |
| function blocksy_search($args, $content){ | |
| if(!function_exists("blocksy_isolated_get_search_form")) return ""; | |
| $args = wp_parse_args($args); |
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 set_media_folder($pid = ""){ | |
| if(empty($pid)) return; | |
| if(get_post_type($pid) == "attachment"){ | |
| if(($path = get_attached_file($pid)) && str_contains($path,"nsl_avatars")) { | |
| if ( $term_avatars = get_term_by( 'slug', 'avatare', 'happyfiles_category' ) ) | |
| wp_set_object_terms( $pid, $term_avatars->term_id, 'happyfiles_category' ); | |
| wp_update_post([ | |
| 'ID' => $pid, |
OlderNewer