function disable_editor_for_selected_post_types() { $disabled_post_types = array(‘post’, ‘page’); // Liste der zu deaktivierenden Post-Typen foreach ($disabled_post_types as $post_type) { remove_post_type_support($post_type, ‘editor’); } } add_action(‘init’, ‘disable_editor_for_selected_post_types’);Continue reading
// Entfernt Google Fonts von WordPress und Breakdance function remove_google_fonts() { global $wp_styles; // Durch alle registrierten Styles iterieren und Google Fonts entfernen foreach ($wp_styles->registered as $handle => $style) { if (strpos($style->src, ‘fonts.googleapis.com’) !== false) { wp_dequeue_style($handle); wp_deregister_style($handle); } }…Continue reading
add_filter(“breakdance_register_font”, function ($font) { $isGoogleFont = !!$font[‘dependencies’][‘googleFonts’]; if ($isGoogleFont) { return false; } return $font; });Continue reading
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading
/** * Functionality: * – Checks database for events scheduled 5 minutes from now. * – Parses event times from your database table. * – Triggers FlowMattic workflows 5 minutes before the event time. * – Updates the database to…Continue reading
/** * Plugin Name: Metabolic Syndrome Assessment * Description: Shortcode [metabolic_syndrome] that displays Metabolic Syndrome factors and a Refresh button. * Version: 1.0 */ // 1) AJAX Handler (only for logged-in users) add_action(‘wp_ajax_get_mets_data’, ‘handle_get_mets_data’); function handle_get_mets_data() { if (!is_user_logged_in()) {…Continue reading
add_filter(‘wwlc_allowed_user_roles’, function($allowed_roles) { $allowed_roles[] = ‘editor’; // Add your custom role here return $allowed_roles; });Continue reading
/** * Plugin Name: CVD Risk Assessment * Description: Shortcode [cvd_risk_assessment] with a gauge, “Calculating” status, integer display for HDL/TC/eGFR, and delegated Refresh. * Version: 1.0 */ // 1) AJAX Handler (requires login) add_action(‘wp_ajax_get_cvd_data’,’handle_get_cvd_data’); function handle_get_cvd_data(){ if(!is_user_logged_in()){ wp_send_json_error([‘message’=>’Not logged in’]);…Continue reading
add_action(‘admin_init’, ‘restrict_product_creation’); function restrict_product_creation() { $product_count = wp_count_posts(‘product’)->publish; if ($product_count >= 10) { add_action(‘admin_footer’, function() { echo ‘ ‘; }); add_filter(‘wp_insert_post_data’, function($data, $postarr) { if ($data[‘post_type’] === ‘product’ && $data[‘post_status’] !== ‘trash’) { wp_die(‘You have reached the maximum limit of…Continue reading