Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BBP_Converter::converter_response( string $output = '' )
Wrap the converter output in HTML, so styling can be applied
Description Description
Parameters Parameters
- $output
-
(Optional)
Default value: ''
Source Source
File: includes/admin/classes/class-bbp-converter.php
private function converter_response( $output = '' ) {
// Sanitize output
$output = wp_kses_data( $output );
// Maybe prepend the step
if ( ! empty( $this->step ) ) {
// Include percentage
if ( ! empty( $this->rows_in_step ) ) {
$progress = sprintf( '<span class="step">%s.</span><span class="output">%s</span><span class="mini-step">%s</span>', $this->step, $output, $this->step_percentage . '%' );
// Don't include percentage
} else {
$progress = sprintf( '<span class="step">%s.</span><span class="output">%s</span>', $this->step, $output );
}
// Raw text
} else {
$progress = $output;
}
// Output
wp_send_json_success( array(
'query' => get_option( '_bbp_converter_query', '' ),
'current_step' => $this->step,
'final_step' => $this->max_steps,
'rows_in_step' => $this->rows_in_step,
'step_percent' => $this->step_percentage,
'total_percent' => $this->total_percentage,
'progress' => $progress
) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |