你的printf
语句等待其他字符串参数,该参数将被替换为%s
:
printf(
// Filters text content and strips out disallowed HTML
wp_kses(
__(\'Read more <span class="u-screen-reader-text">about %s</span>\', \'Sema\'),
[
\'span\' => [
\'class\' => []
]
]
), "some subject"
);
此示例将产生以下输出:
Read more <span class="u-screen-reader-text">about some subject</span>