'count' => count( $results ), 'queue' => $results, ) ); } function ebp_quote_bridge_request_ids( WP_REST_Request $request ) { $form_id = absint( $request->get_param( 'form_id' ) ); $submission_id = absint( $request->get_param( 'submission_id' ) ); if ( ! ebp_quote_bridge_is_supported_form( $form_id ) ) { return new WP_Error( 'unsupported_form', 'Unsupported form ID.', array( 'status' => 400 ) ); } if ( ! $submission_id ) { return new WP_Error( 'invalid_submission', 'Invalid submission ID.', array( 'status' => 400 ) ); } return array( $form_id, $submission_id ); } function ebp_quote_bridge_claim( WP_REST_Request $request ) { $ids = ebp_quote_bridge_request_ids( $request ); if ( is_wp_error( $ids ) ) { return $ids; } list( $form_id, $submission_id ) = $ids; if ( ebp_quote_bridge_get_export_record( $form_id, $submission_id ) ) { return new WP_Error( 'already_exported', 'Submission is already exported.', array( 'status' => 409 ) ); } $claim_name = ebp_quote_bridge_claim_option_name( $form_id, $submission_id ); $existing = ebp_quote_bridge_get_active_claim( $form_id, $submission_id ); if ( is_array( $existing ) ) { return new WP_Error( 'already_claimed', 'Submission is already claimed by another bridge session.', array( 'status' => 409 ) ); } $token = wp_generate_password( 40, false, false ); $user = wp_get_current_user(); $record = array( 'token' => $token, 'created' => time(), 'user_id' => get_current_user_id(), 'user' => $user ? $user->user_login : '', ); if ( ! add_option( $claim_name, $record, '', false ) ) { return new WP_Error( 'claim_conflict', 'Unable to claim submission because another request claimed it first.', array( 'status' => 409 ) ); } return rest_ensure_response( array( 'ok' => true, 'token' => $token, 'message' => 'Submission claimed.', ) ); } function ebp_quote_bridge_complete( WP_REST_Request $request ) { $ids = ebp_quote_bridge_request_ids( $request ); if ( is_wp_error( $ids ) ) { return $ids; } list( $form_id, $submission_id ) = $ids; $token = (string) $request->get_param( 'token' ); $evo_quote = absint( $request->get_param( 'evo_quote' ) ); $evo_customer = sanitize_text_field( (string) $request->get_param( 'evo_customer' ) ); if ( $token === '' || ! $evo_quote || $evo_customer === '' ) { return new WP_Error( 'invalid_complete', 'Token, EVO quote number, and EVO customer are required.', array( 'status' => 400 ) ); } $claim_name = ebp_quote_bridge_claim_option_name( $form_id, $submission_id ); $claim = ebp_quote_bridge_get_active_claim( $form_id, $submission_id ); if ( ! is_array( $claim ) || ! isset( $claim['token'] ) || ! hash_equals( (string) $claim['token'], $token ) ) { return new WP_Error( 'claim_mismatch', 'The claim token is missing, expired, or does not match.', array( 'status' => 409 ) ); } $user = wp_get_current_user(); $record = array( 'evo_quote' => $evo_quote, 'evo_customer' => $evo_customer, 'exported_at' => current_time( 'mysql' ), 'exported_by' => $user ? $user->user_login : '', ); update_option( ebp_quote_bridge_export_option_name( $form_id, $submission_id ), $record, false ); delete_option( $claim_name ); return rest_ensure_response( array( 'ok' => true, 'message' => 'Submission marked exported.', ) ); } function ebp_quote_bridge_release( WP_REST_Request $request ) { $ids = ebp_quote_bridge_request_ids( $request ); if ( is_wp_error( $ids ) ) { return $ids; } list( $form_id, $submission_id ) = $ids; $token = (string) $request->get_param( 'token' ); $claim_name = ebp_quote_bridge_claim_option_name( $form_id, $submission_id ); $claim = ebp_quote_bridge_get_active_claim( $form_id, $submission_id ); if ( ! is_array( $claim ) ) { return rest_ensure_response( array( 'ok' => true, 'message' => 'No active claim remained.' ) ); } if ( ! isset( $claim['token'] ) || ! hash_equals( (string) $claim['token'], $token ) ) { return new WP_Error( 'claim_mismatch', 'The claim token does not match.', array( 'status' => 409 ) ); } delete_option( $claim_name ); return rest_ensure_response( array( 'ok' => true, 'message' => 'Claim released.' ) ); } FX| Ed Brown Products https://www.edbrown.com Custom Manufacturer of the World's Finest 1911 Handguns Fri, 25 Sep 2026 16:30:45 +0000 en hourly 1 https://wordpress.org/?v=7.1.2 https://www.edbrown.com/wp-content/uploads/2017/11/cropped-metal-logo8mod7-hemi-eb-2-32x32.png FX| Ed Brown Products https://www.edbrown.com 32 32 FX2, Gen4 https://www.edbrown.com/product/fx2-g4/ Fri, 28 Aug 2020 14:34:16 +0000 https://www.edbrown.com/?post_type=product&p=36632 45 ACP

The post FX2, Gen4 first appeared on Ed Brown Products.]]>
For additional photos and details, see the FX2.

• 4.25″ Commander slide, single stack Bobtail® frame.
• Snakeskin on forestrap.
• American flag serrations on both sides of slide.
• Trijicon RMRcc sight 3.25 MOA with Ed Brown co-witness rear sight and Ameri-glo orange front sight (Glock type).
• Custom options included: FX slide cuts, recessed slide stop with serrated pin, flush barrel with recessed crown.

The post FX2, Gen4 first appeared on Ed Brown Products.]]>
FX2, Stainless https://www.edbrown.com/product/fx2/ Thu, 27 Aug 2020 20:10:04 +0000 https://www.edbrown.com/?post_type=product&p=36593 45 ACP

The post FX2, Stainless first appeared on Ed Brown Products.]]>
For additional photos and details, see the FX2.

• 4.25″ Commander slide, single stack Bobtail® frame.
• Snakeskin on forestrap.
• American flag serrations on both sides of slide.
• Trijicon RMRcc sight 3.25 MOA with Ed Brown co-witness rear sight and Ameri-glo orange front sight (Glock type)
• Custom options included: FX slide cuts, recessed slide stop with serrated pin, flush barrel with recessed crown.
• Includes: Ed Brown pistol bag, (2) Ed Brown Performance Magazines with base pad kits, lubricant, Owner’s manual, bushing wrench, grip screw wrench and cable lock.

The post FX2, Stainless first appeared on Ed Brown Products.]]>