Gravatar

/** * Name: getProfilePicture * Desc: If the profile picture exists in the entry, user it. Otherwise use the Gravatar (which may be the default) * **/ add_shortcode(‘fw-get-profile-image’, ‘fw_getProfileImage’); function fw_getProfileImage($atts) { $entry_id = $atts[“entry_id”]; $entry = FrmEntry::getOne($entry_id, true); $primary…Continue reading

Debug (Testing only)

add_filter( ‘frm_setup_edit_fields_vars’, ‘fw_checkPhoneValue’, 20, 3 ); function fw_checkPhoneValue( $values, $field, $entry_id ) { //echo “fieldid: ” . $field->id . ““; if ( $field->id == MEMBER_REGISTRATION_PHONE_PRIMARY_FIELD_ID ) { print_r($values); $phone2 = FrmEntryMeta::get_entry_meta_by_field( $entry_id, MEMBER_REGISTRATION_PHONE_PRIMARY_FIELD_ID); echo “Phone2: $phone2“; } return $values; }Continue reading

Suppress required field validation on forms in admin interface

add_filter(‘frm_validate_entry’, ‘remove_errors_in_admin_area’, 20, 2); function remove_errors_in_admin_area($errors, $values){ if ( $values[‘form_id’] == 23 && is_admin() ) { //Change 99 to the ID of your form return array(); } return $errors; } /* add_filter(‘frm_validate_entry’, ‘remove_errors_in_admin_area’, 20, 2); function remove_errors_in_admin_area($errors, $values){ if (…Continue reading

Customize email for Forgot Username or Password v2

add_filter(‘retrieve_password_message’, ‘custom_password_reset_email’, 10, 4); add_filter(‘wp_mail_content_type’, ‘set_html_content_type’); function custom_password_reset_email($message, $key, $user_login, $user_data) { $site_name = wp_specialchars_decode(get_option(‘blogname’), ENT_QUOTES); $user_nickname = get_user_meta($user_data->ID, ‘nickname’, true); $user_display_name = $user_data->display_name; // Changed to use direct property $user_name = !empty($user_nickname) ? $user_nickname : $user_login; // $reset_url =…Continue reading

DIR SYNC 4

/** * Main LifterLMS Course Sync Engine * * PURPOSE: * – Syncs LifterLMS courses to llms_content_sync CPT * – Handles both automatic and manual synchronization * – Fires completion action for detail population extensions * – Cloudflare-safe with proper…Continue reading

DIR LIFTER SYNC 3

/** * LifterLMS Course Sync – Detail Population Module * * PURPOSE: * – Hooks into main sync completion * – Populates comprehensive course data (lessons, sections, quizzes, etc.) * – Populates ACF fields on llms_content_sync CPT * – Uses…Continue reading

Gravitar Fix

add_filter(‘get_avatar’, function($avatar_html, $id_or_email, $size) { // Force width/height attributes to match the requested avatar size $size = intval($size) ?: 26; // Remove existing width/height to avoid duplicates $avatar_html = preg_replace(‘/\s(width|height)=”\d+”/i’, ”, $avatar_html); // Add explicit width/height $avatar_html = preg_replace( ‘/]+)>/’,…Continue reading

Site Wide Header

add_filter(‘get_custom_logo’, function($html) { // Only touch the header logo return preg_replace( ‘/]+)>/’, ‘‘, // set to your display size $html, 1 ); });Continue reading

Site Wide Header

add_filter(‘get_custom_logo’, function($html) { // Only touch the header logo return preg_replace( ‘/]+)>/’, ‘‘, // set to your display size $html, 1 ); });Continue reading