MemberPress: Assigning BuddyPress Member Type on Membership Signup
add_action(‘mepr-event-member-signup-completed’, function($event) { $user = $event->get_data(); bp_set_member_type($user->ID, ‘member_type’); });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_action(‘mepr-event-member-signup-completed’, function($event) { $user = $event->get_data(); bp_set_member_type($user->ID, ‘member_type’); });Continue reading
function wp_auto_remove_admin_notices() { $notice_texts = [ // Elementor version update ‘The version was updated successfully!’, // Elementor data update ‘The database update process is now complete. Thank you for updating to the latest version!’, // WP Rocket enable/disable plugin ‘One…Continue reading
function wp_auto_remove_admin_notices() { $notice_texts = [ // Elementor version update ‘The version was updated successfully!’, // Elementor data update ‘The database update process is now complete. Thank you for updating to the latest version!’, // WP Rocket enable/disable plugin ‘One…Continue reading
/** * SHORTCODE: [cdx_medication_form] * * – Only yes/no for each medication: antihypertensive, statins, antidiabetes * – Spinner on submit * – Shows icon * – LocalStorage storing on success, optionally auto-populate on load * – Partial update merges with…Continue reading
function tasty_recipes_remove_no_reviews_label( $content ) { global $post; if ( ! $post ) { return $content; } $post_id = $post->ID; $has_recipe = \Tasty_Recipes::has_recipe( $post_id ); if ( ! $has_recipe ) { return $content; } $recipe_id = \Tasty_Recipes::get_recipe_ids_for_post( $post_id )[0]; $recipe =…Continue reading
/** * SHORTCODE: [cdx_profile_form] * * Enhancements: * – Last update: “Y-m-d H:i” for date + time * – Centered modal (modal-dialog-centered), button color => .btn-danger * – Remainder: localStorage restoration, spinner on submit, Age check w/ modal */ add_shortcode(‘cdx_profile_form’,…Continue reading
/** * Shortcode: [cdx_profile_form] * * Enhanced debugging: * – Logs form data in console before submission * – Logs server response in console * – Shows a Bootstrap modal if DOB => Age out of range (19–79) * –…Continue reading
//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
//map domains $domain_map = [ // CHS ‘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’ => ‘CHS’, ‘callwildlifecontrol.org’ => ‘CHS’, //callhvac.org ‘callhvac.org’ =>…Continue reading