' . esc_html__( 'Feed Builder', 'tonys-sportspress-enhancements' ) . ''; echo '

' . esc_html__( 'Build a shareable CSV feed URL with format, filters, and custom columns. This does not save settings.', 'tonys-sportspress-enhancements' ) . '

'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; foreach ( $columns as $format_key => $format_columns ) { $default_columns = function_exists( 'tse_sp_event_export_get_default_columns' ) ? tse_sp_event_export_get_default_columns( $format_key ) : array(); $label = isset( $formats[ $format_key ]['label'] ) ? $formats[ $format_key ]['label'] : ucfirst( $format_key ); echo '
'; echo '' . esc_html( sprintf( __( '%s Columns', 'tonys-sportspress-enhancements' ), $label ) ) . ''; echo '
'; foreach ( $format_columns as $column_key => $column_label ) { $input_id = 'tse-url-builder-' . sanitize_html_class( $format_key . '-' . $column_key ); echo ''; } echo '
'; echo '
'; } echo '
'; echo '

' . esc_html__( 'Generated URL', 'tonys-sportspress-enhancements' ) . '

'; echo '
'; echo ''; echo ''; echo '
'; echo '

' . esc_html__( 'Open Feed URL', 'tonys-sportspress-enhancements' ) . '

'; echo '

' . esc_html__( 'The builder always generates the standalone CSV feed endpoint using the selected filters and columns.', 'tonys-sportspress-enhancements' ) . '

'; echo '
'; tse_sp_url_builder_render_script(); } add_action( 'tse_tonys_settings_render_tab_url-builder', 'tse_sp_url_builder_render_tab' ); /** * Render builder script. * * @return void */ function tse_sp_url_builder_render_script() { $base_url = home_url( '/' ); ?>