Secure Bill Breakdown Page Access

/** * ==================================================================== * 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

Disable Thumbnail Image Sizes (copy)

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

astrologie

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

Generate Branded WP Maintenance Page

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

Style Custom WP Error Page

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

Assign WP Error Page HTML Class and Change Title

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

[DO NOT PUSH] Branding Tokens for WP Pages Customisation

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

Enable Brand Colours Engine for WP Pages Customisations

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

SHOP – WOO overrides

// ************************************************************************************************* // 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