(cloud) Dynamic Keyword Insertion

//leo is amazing function format_keyword_parameter($atts = []) { $defaults = [‘default’ => ”]; $atts = shortcode_atts($defaults, $atts); if (is_admin()) { return ‘[display_keyword’ . ($atts[‘default’] ? ‘ default=”‘ . esc_attr($atts[‘default’]) . ‘”‘ : ”) . ‘]’; } if (isset($_GET[‘kw’])) { $keyword…Continue reading

(cloud) RB JSTag – RingPools

// Domain to service mapping $domain_map = [ // CHS (Call Home Services) domains ‘callhomeservices.org’ => ‘CHS’, ‘calldentist.org’ => ‘CHS’, ‘callelectrician.org’ => ‘CHS’, ‘callremodel.org’ => ‘CHS’, ‘callpestcontrol.org’ => ‘CHS’, ‘callroofing.org’ => ‘CHS’, ‘callappliancerepair.org’ => ‘CHS’, ‘biohazardremoval.org’ => ‘CHS’, ‘callkeymaster.com’ =>…Continue reading

MemberPress: Restrict Email Patterns for Specific Memberships

function mepr_restrict_email_patterns_for_specific_plans($errors) { // Define the patterns to search for in email addresses $blocked_email_patterns = array( ‘xxx@gmail’, ‘xyz@’, ‘test@test’ ); // Define specific subscription plan IDs that require email restriction $restricted_plan_ids = array( 123, 456 ); // Replace with actual…Continue reading

(cloud) Cache URL Parameters v3

//leo is amazing function cache_url_params() { if (!session_id()) { session_start(); } // Skip on admin or login pages if (is_admin() || in_array($GLOBALS[‘pagenow’], [‘wp-login.php’])) { return; } $bot_agents = [‘Googlebot’, ‘bingbot’, ‘Baiduspider’, ‘YandexBot’, ‘DuckDuckBot’, ‘Slurp’, ‘facebot’, ‘ia_archiver’]; $user_agent = isset($_SERVER[‘HTTP_USER_AGENT’]) ?…Continue reading

MemberPress: Restrict Email Patterns for All Memberships

function mepr_restrict_email_patterns_for_all_plans($errors) { // Define the patterns to search for in email addresses $blocked_email_patterns = array( ‘xxx@gmail’, ‘xyz@’, ‘test@test’ ); // Retrieve the email address from the form submission $email_address = isset( $_POST[ ‘user_email’ ] ) ? sanitize_email( trim( $_POST[…Continue reading