Type: php
Gravity Forms Convention Registration Add Roles
add_action( ‘gform_user_updated’, ‘add_additional_roles’, 10, 4 ); function add_additional_roles( $user_id, $feed, $entry, $user_pass ) { if ( rgar( $entry, ‘form_id’ ) != 1 ) { return; } $user = new WP_User( $user_id ); $selected_role_array = explode( ‘|’, rgar( $entry, ’46’ )…Continue reading
MemberPress: Display Current User’s Memberships Statuses And Renewal Dates (copy)
function mp_custom_membership_info() { if (!is_user_logged_in()) { return ‘You need to be logged in to view this information.’; } global $wpdb; $user_id = get_current_user_id(); // Query to get all active MemberPress transactions for the current user $transactions = $wpdb->get_results($wpdb->prepare( “SELECT txn.*,…Continue reading
ADMIN – Edit users permissions
// Sets permissions for site admins to edit users function artprize_admin_users_caps( $caps, $cap, $user_id, $args ) { foreach ( $caps as $key => $capability ) { if ( $capability != ‘do_not_allow’ ) { continue; } switch ( $cap ) {…Continue reading
Diagnostic_Universal – KIC Universal Diagnostic Tool – PASSIVE VERSION
/** * KIC Universal Diagnostic Tool – PASSIVE VERSION * * A comprehensive diagnostic tool for debugging KIC Enterprise systems * SAFE TO KEEP ACTIVE PERMANENTLY – Does NOTHING until you access it! * * HOW IT WORKS: * –…Continue reading
DIR_SYNC_WPCODE – WPCode Snippets Sync Engine
/** * WPCode Snippet: WPCode Snippets Sync Engine * Description: Synchronizes WPCode snippets FROM wpcode CPT TO wpcode_snippets_sync CPT * Location: Run Everywhere * Priority: 20 * * INSTALL ORDER: #3 – Install after ACF fields are registered * *…Continue reading
DIR_CPT_WPCODE – WPCode Snippets Sync CPT Registration
/** * WPCode Snippet: WPCode Snippets Sync CPT Registration * Description: Registers shadow CPT for syncing WPCode snippets to REST API * Location: Run Everywhere * Priority: 5 * * INSTALL ORDER: #1 – Install this first * * IMPORTANT:…Continue reading
DIR_ACF_WPCODE – ACF Fields for WPCode Snippets Sync
/** * WPCode Snippet: ACF Fields for WPCode Snippets Sync * Description: Registers ACF fields to store WPCode snippet data in sync CPT * Location: Run Everywhere * Priority: 10 * * INSTALL ORDER: #2 – Install after CPT registration,…Continue reading
DIR_RAPI_WPCODE – REST API Enhancements for WPCode Snippets Sync
/** * WPCode Snippet: REST API Enhancements for WPCode Snippets Sync * Description: Exposes wpcode_snippets_sync CPT fields via REST API for WhaleSync * Location: Run Everywhere * Priority: 15 * * INSTALL ORDER: #4 – Install last, after sync system…Continue reading