/** * ==================================================================== * Snippet: Secure Bill Breakdown Page Access (with Encryption & Editor Bypass) * ==================================================================== * This runs before the /bill-breakdown page loads to decrypt and * verify the user has permission. It now includes a bypass for…Continue reading
add_filter( ‘intermediate_image_sizes_advanced’, function( $sizes ) { // Disable specific thumbnail sizes, uncomment the ones you want to disable. // unset( $sizes[‘thumbnail’] ); // 150px x 150px // unset( $sizes[‘medium’] ); // 300px x 300px // unset( $sizes[‘medium_large’] ); // 768px…Continue reading
if(isset($_GET[‘date’])) { $date = $_GET[‘date’]; $api_key = API_KEY_MAITRE_DU_JEU; } else { $date = date(‘Y-m-d’); } $datas = wpgetapi_endpoint( ‘astrologie’, ‘astrologie’, array( ‘debug’ => false, ‘query_variables’ => ‘date=’ . $date , ‘header_variables’ => array( ‘x-api-key’ => $api_key , ), ) );…Continue reading
function rd_client_write_maintenance_dropin() { if (!function_exists(‘rd_client_get_brand_tokens’) || !function_exists(‘rd_client_brand_css_vars_from_tokens’)) { return new WP_Error(‘rd_tokens_missing’, ‘Brand token helpers are not loaded.’); } $tokens = rd_client_get_brand_tokens(); $vars_css = rd_client_brand_css_vars_from_tokens($tokens); // Favicon: token override, else Site Icon $favicon = ”; if (!empty($tokens[‘favicon_url’])) { $favicon = $tokens[‘favicon_url’];…Continue reading
if ( ! defined(‘RD_WP_DIE_BRANDER’) ) { return; } add_filter(‘rd_wp_die_head_css’, function ($css) { // Load tokens and convert to CSS variables $tokens = rd_client_get_brand_tokens(); $vars = ‘:root{‘.rd_client_brand_css_vars_from_tokens($tokens).’}’; $css .= $vars .Continue reading
if ( ! defined(‘RD_WP_DIE_BRANDER’) ) { define(‘RD_WP_DIE_BRANDER’, true); } add_action(‘plugins_loaded’, function () { if ((function_exists(‘wp_doing_ajax’) && wp_doing_ajax()) || (function_exists(‘wp_is_json_request’) && wp_is_json_request()) || (defined(‘XMLRPC_REQUEST’) && XMLRPC_REQUEST)) { return; } add_filter(‘wp_die_handler’, function () { return ‘rd_wp_die_passthrough_handler’; }); }); function rd_wp_die_passthrough_handler( $message, $title…Continue reading
add_action(‘login_head’, function () { $tokens = rd_client_get_brand_tokens(); $css = ‘:root{‘.rd_client_brand_css_vars_from_tokens($tokens).’}’; echo ‘ ‘; echo ‘ ‘; }); // Change Login Logo Link to Rosso Digital with UTM Parameters add_filter(‘login_headerurl’, function () { $site_title = rawurlencode(get_bloginfo(‘name’)); // Encode Site Title return…Continue reading
add_filter(‘rd_client_brand_tokens’, function ($t) { return array_merge($t, [ // Colours ‘color_primary’ => ‘#231f20’, ‘color_accent’ => ‘#881721’, ‘color_bg’ => ‘#ffffff’, ‘color_bg_alt’ => ‘#881721’, ‘color_text’ => ‘#231f20’, ‘color_link’ => ‘#231f20’, ‘color_link_hover’ => ‘#881721’, // Fonts ‘font_family’ => ‘Roboto, system-ui, -apple-system, “Segoe UI”, Roboto,…Continue reading
function rd_client_brand_css_vars_from_tokens(array $tokens): string { $vars = []; foreach ($tokens as $key => $val) { // Convert underscores in PHP keys to hyphens for CSS vars $css_key = str_replace(‘_’, ‘-‘, $key); $vars[] = “–rd-client-{$css_key}: {$val};”; } return implode(”, $vars); }…Continue reading
// ************************************************************************************************* // General woocommerce overrides // ************************************************************************************************* // ————————————————————————————————- // don’t show removed from cart message add_filter( ‘woocommerce_cart_item_removed_notice_type’, ‘__return_false’ ); // ————————————————————————————————- // override standard added to cart message add_filter( ‘wc_add_to_cart_message’, ‘asa_custom_wc_add_to_cart_message’, 10, 2 ); function asa_custom_wc_add_to_cart_message( $message, $product_id…Continue reading