'reviews_url' => true, // Explicitly request the reviews URL to be linked from the customizer.
),
);
$args =
array_merge( $wporg_args,
$args );
if ( '' ===
$args['search'
] && '' ===
$args['tag'
] ) { $args['browse'
] = 'new'; // Sort by latest themes by default.
} // Load themes from the .org API.
$themes =
themes_api( 'query_themes',
$args );
if ( is_wp_error( $themes ) ) { wp_send_json_error();
} // This list matches the allowed tags in wp-admin/includes/theme-install.php.
$themes_allowedtags =
array_fill_keys( array
( 'a', 'abbr', 'acronym', 'code', 'pre', 'em', 'strong', 'div', 'p', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img'
),
array
() );
$themes_allowedtags['a'
] =
array_fill_keys( array
( 'href', 'title', 'target'
), true
);
$themes_allowedtags['acronym'
]['title'
] = true;