function wpbc_ajx_booking__ui_click__export_csv() { ... } . /** * Class WPBC_Listing_Actions__Export_CSV */ class WPBC_Listing_Actions__Export_CSV{ const ACTION = 'export_csv'; /** * Get Action Button * * @return false|string */ public static function get_option() { if ( ! class_exists( 'wpdev_bk_personal' ) ) { return false; } if ( ! wpbc_is_user_can( self::ACTION, wpbc_get_current_user_id() ) ) { return false; } $css_class = 'ul_dropdown_menu_li_action '; $css_class .= 'ul_dropdown_menu_li_action_' . self::ACTION; // Option Title. $html = "" . esc_js( __( 'Export to CSV', 'booking' ) ) . ' ' . ' '. // "{{{data['parsed_fields']['currency_symbol']}}} {{data['parsed_fields']['cost']}}" . ''; return $html; // onclick=\"wpbc_ajx_booking_send_search_request_with_params({ '" . esc_attr( self::ID ) . "': '{$option_value}' }); \" //. } /** * Get Template for Modal Window * * @return false|void */ public static function template_for_modal() { if ( ! class_exists( 'wpdev_bk_personal' ) ) { return false; } // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing $user_id = ( isset( $_REQUEST['wpbc_ajx_user_id'] ) ) ? intval( $_REQUEST['wpbc_ajx_user_id'] ) : wpbc_get_current_user_id(); $booking_csv_export_params = get_user_option( 'booking_csv_export_params', (int) $user_id ); $booking_csv_export_params = ( ! empty( $booking_csv_export_params ) ) ? $booking_csv_export_params : array(); $defaults = array( 'export_type' => 'csv_all', 'selected_id' => '', 'csv_export_separator' => 'semicolon', 'csv_export_skip_fields' => '', ); $export_params_arr = wp_parse_args( $booking_csv_export_params, $defaults ); ?>