/** ==================================================================== * Snippet 2: Session and Script Management (UPDATED & SECURE) * * This version removes the insecure credential passing and adds a * secure nonce for logged-in user actions. * ==================================================================== */ if ( ! function_exists( ‘gb_start_session_if_needed’ )…Continue reading
/** ==================================================================== * Snippet 1: SOAP Logic and Data Handling (WITH CACHING) * ==================================================================== */ require_once( ABSPATH . ‘youraccount/OnlineSoapClient.php’ ); // — Constants for Rate Limiting — define(‘GB_LOGIN_ATTEMPTS_LIMIT’, 5); define(‘GB_LOGIN_LOCKOUT_PERIOD’, 5 * MINUTE_IN_SECONDS); // — Helper function to get the…Continue reading
/** * ==================================================================== * Snippet: Handle Email Verification Endpoint * ==================================================================== * This snippet creates a virtual page at /verify-email/ to handle * email verification without needing to create a page in the WP admin. */ // 1. Register a…Continue reading
/** * ==================================================================== * 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