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 | |
| /** | |
| * Plugin Name: LMDM Disable PHP Translation Cache for Selected Plugins | |
| * Description: Forces WordPress to use .mo files instead of .l10n.php translation files for selected plugin textdomains. | |
| * Author: Nic Bug / LMDM | |
| * Version: 1.0.0 | |
| */ | |
| defined('ABSPATH') || exit; |
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
| .animated-submenu-block .sub-menu { | |
| filter: blur(20px); | |
| transition: opacity .2s ease,visibility .2s ease,transform .2s ease,margin .2s ease,height .2s ease, filter 0.2s ease; | |
| } | |
| .animated-submenu-block.ct-active .sub-menu { | |
| filter: blur(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 remove_contactmethods($cms) { | |
| foreach($cms as $cm_key => $cm_label){ | |
| if(in_array($cm_key,["facebook","twitter","linkedin","instagram","vimeo","pinterest","tiktok","dribbble","behance","xing","odnoklassniki","vkontakte","youtube","github","soundcloud","spotify","medium","tumblr","mastodon","wordpress","mastodon"])){ | |
| unset($cms[$cm_key]); | |
| } | |
| } | |
| return $cms; | |
| } |
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 | |
| // fetch block by name like this: | |
| // https://…/wp-json/public/v1/reusable?slug=brunch-termine | |
| add_action('rest_api_init', function () { | |
| register_rest_route('public/v1','/reusable',[ | |
| 'methods' => 'GET', | |
| 'args' => ['slug'=>['required'=>true]], | |
| 'permission_callback' => '__return_true', | |
| 'callback' => function(WP_REST_Request $r){ | |
| $slug = sanitize_title($r['slug']); |
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 | |
| // attention! place your yt-video in html-block inside a blocksy popup like this: | |
| // <iframe src="https://www.youtube.com/embed/LW0OVY9e5r0?enablejsapi=1&autoplay=1" class="yt-video" style="aspect-ratio:16/9" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> | |
| // this approach is also compatible with script blocker plugin "embed privacy" AND "complianz cookie consent". last one is mandatory! | |
| function autoplay_yt_video_in_blocksy_popup(){ | |
| ?> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| ctEvents.on('blocksy:micro-popups:open', (popupId) => { | |
| let video = document.querySelector("#post-"+popupId+" .yt-video"); |
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 change_layer_from_card($layer,$prefix,$image_args){ | |
| if($prefix != "unterstuetzer_archive") return $layer; | |
| $layer["featured_image"] = sprintf('<div class="ct-media-container">%s</div>',strip_tags($layer["featured_image"],"<img>")); | |
| $layer["title"] = strip_tags($layer["title"],"<h2>"); | |
| return $layer; | |
| } | |
| add_filter('blocksy:archive:render-card-layers',"change_layer_from_card",10,3); |
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 disable_blocksy_hook_panel(){ | |
| $user = wp_get_current_user(); | |
| if(in_array("editor",$user->roles)) return false; | |
| return true; | |
| } | |
| add_filter('blocksy:content-blocks:has-actions-debugger','disable_blocksy_hook_panel'); |
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
| [data-archive="default"].entries article.entry-card { | |
| position:relative; | |
| } | |
| [data-archive="default"].entries article.entry-card .entry-title > a::before { | |
| position:absolute; | |
| inset: 0; | |
| content:""; | |
| display:block; | |
| z-index:10; |
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 the class to your button: | |
| .no-btn-transform:hover { | |
| --theme-button-transform: none; | |
| } |
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 | |
| // hide wp armour menu from editor role | |
| function remove_wpa_menu(){ | |
| if(!is_admin()) return; | |
| if(current_user_can('editor')) | |
| remove_action('admin_menu', 'wpa_plugin_menu'); | |
| } | |
| add_action("wp_loaded",'remove_wpa_menu'); |
NewerOlder