You appear to be a bot. Output may be restricted
Description
Convert named entities, strip all HTML except anchor tags, and interpolate with vsprintf. This is a helper function for all the internationalized UI strings in this class which have to include URLs.
Note that $url_array should be indexed by integers like so: array(
- 1 => 'example.com',
- 2 => 'example.org',
); Then '%1$s' in the format string will substitute 'example.com' and '%2$s' will substitute 'example.org'.
Usage
$string = Jetpack_Sitemap_Stylist::sanitize_with_links( $format, $url_array );
Parameters
- $format
- ( string ) required – A vsprintf-style format string to be sanitized.
- $url_array
- ( array ) required – The string substitution array to be passed to vsprintf.
Returns
string The sanitized string.
Source
File name: jetpack/modules/sitemaps/sitemap-stylist.php
Lines:
1 to 14 of 14
private static function sanitize_with_links( $format, $url_array ) { return vsprintf( wp_kses( ent2ncr( $format ), array( 'a' => array( 'href' => true, 'title' => true, ), ) ), $url_array ); }