Bulk_Upgrader_Skin::feedback()
最后更新于:2021-11-25 19:22:53
Bulk_Upgrader_Skin::feedback( string$string, mixed$args)参数
- $string
-
(string) (Required)
- $args
-
(mixed) (Optional) text replacements.
源文件
文件: gc-admin/includes/class-bulk-upgrader-skin.php
public function feedback( $string, ...$args ) {
if ( isset( $this->upgrader->strings[ $string ] ) ) {
$string = $this->upgrader->strings[ $string ];
}
if ( strpos( $string, '%' ) !== false ) {
if ( $args ) {
$args = array_map( 'strip_tags', $args );
$args = array_map( 'esc_html', $args );
$string = vsprintf( $string, $args );
}
}
if ( empty( $string ) ) {
return;
}
if ( $this->in_loop ) {
echo "$string<br />n";
} else {
echo "<p>$string</p>n";
}
}