add_action(‘init’, function() { // Wenn der Nutzer eingeloggt ist, darf er zugreifen if (is_user_logged_in()) { return; } // Prüft, ob “graphql” in der aufgerufenen URL vorkommt if (isset($_SERVER[‘REQUEST_URI’]) && strpos(strtolower($_SERVER[‘REQUEST_URI’]), ‘graphql’) !== false) { status_header(403); header(‘Content-Type: application/json’); echo json_encode([‘error’ =>…Continue reading
// 1. WordPress Generator-Tag entfernen remove_action(‘wp_head’, ‘wp_generator’); // 2. Elementor-Versionen im HTML-Code unkenntlich machen (Sicher für Schriften) add_action(‘wp_loaded’, function() { ob_start(function($buffer) { // Löscht das Meta-Generator-Tag von Elementor im Quelltext $buffer = preg_replace(‘/Continue reading
/** * Collect a checkbox field in the donation form. * * This snippet only works in Charitable 1.5 or above. * * Related examples: * * @see Register a text field (detailed example) – https://github.com/Charitable/library/blob/master/donation-form/register-new-donation-field-1.5.php * @see Register multiple…Continue reading
/** * Collect a checkbox field in the donation form. * * This snippet only works in Charitable 1.5 or above. * * Related examples: * * @see Register a text field (detailed example) – https://github.com/Charitable/library/blob/master/donation-form/register-new-donation-field-1.5.php * @see Register multiple…Continue reading
function rd_aw_custom_function_wpf_push_user_meta( $workflow ) { if ( ! function_exists( ‘wp_fusion’ ) || ! is_object( $workflow ) ) { return; } $user_id = 0; if ( method_exists( $workflow, ‘data_layer’ ) && is_object( $workflow->data_layer() ) ) { $data_layer = $workflow->data_layer(); if (…Continue reading
/** * Add Purchase Order Number field to Wholesale Payments at classic checkout. */ // 1. Render the field — visible only when Wholesale Payments is selected. add_action( ‘woocommerce_review_order_before_submit’, function () { ?>Continue reading
/** * Hide the “In Stock Amount” column in Wholesale Order Form for non-wholesale customers. * * Uses the wwof_order_form_body_meta filter to strip the in-stock-amount column * when the current user does not have a wholesale role. */ add_filter( ‘wwof_order_form_body_meta’,…Continue reading
add_filter(‘wp_mail_from’, function() { return ‘[email protected]’; }); add_filter(‘wp_mail_from_name’, function() { return ‘Proper NYE/NYD’; });Continue reading
function enqueue_isotope() { wp_enqueue_script(‘isotope’, ‘https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.6/isotope.pkgd.min.js’, array(‘jquery’), ‘3.0.6’, true); } add_action(‘wp_enqueue_scripts’, ‘enqueue_isotope’);Continue reading