Order dates in lookup

add_filter( ‘frm_order_lookup_options’, ‘order_lookup_date_options’ ); function order_lookup_date_options( $options ) { usort( $options, ‘date_sort’ ); return $options; } function date_sort($a, $b) { return strtotime($a) – strtotime($b); }Continue reading

Hide meta for a specific user ID

add_filter( ‘frmreg_show_meta_on_profile’, ‘hide_meta_for_specific_user’, 10, 2 ); function hide_meta_for_specific_user( $show, $user_profile ) { $target_user_id = 43; // Replace 43 with the ID of the User ID field. if ( $user_profile instanceof WP_User && $target_user_id === $user_profile->ID ) { $show = false;…Continue reading

Change login limit message

add_filter(‘frm_reg_login_limit_exceeded_error_message’, ‘change_login_limit_message’); function change_login_limit_message( $message ) { if ( $message ) { $message = ‘You have been locked out for having too many failed login attempts’; } return $message; }Continue reading

Create a Leaderboard

add_filter( ‘frm_view_order’, ‘frm_order_by_sum’, 10, 2 ); function frm_order_by_sum( $query, $args ) { global $wpdb; if ( $args[‘display’]->ID != 1478 ) { // Change 1478 to the id of your View. return $query; } $total_field_id = 4235; // Change 4235 to…Continue reading

Custom global login message

add_filter( ‘frm_global_login_msg’, ‘custom_global_login_message’ ); function custom_global_login_message( $message ) { $frm_settings = FrmAppHelper::get_settings(); $frm_login_msg = $frm_settings->login_msg; if ( substr_count( $frm_login_msg, ‘*’ ) == 2 ) { $frm_login_msg_array = explode( “*”, $frm_login_msg ); $current_url = home_url( add_query_arg( [], $GLOBALS[‘wp’]->request ) ); //…Continue reading