convert_chars( string $content, string $deprecated = '' )
Converts lone & characters into &
(a.k.a. &
)
描述
参数
- $content
-
(string)
(Required)
String of characters to be converted. - $deprecated
-
(string)
(Optional)
Not used.Default value: ”
返回值
(string) Converted string.
源代码
File: wp-includes/formatting.php
function convert_chars( $content, $deprecated = '' ) {
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '0.71' );
}
if ( strpos( $content, '&' ) !== false ) {
$content = preg_replace( '/&([^#])(?![a-z1-4]{1,8};)/i', '&$1', $content );
}
return $content;
}
更新日志
Version | 描述 |
---|---|
0.71 | Introduced. |
相关函数
Uses
-
wp-includes/functions.php:
_deprecated_argument()
Used By
-
wp-includes/general-template.php:
wp_get_document_title() -
wp-includes/feed.php:
rss2_site_icon() -
wp-includes/deprecated.php:
wp_richedit_pre() -
wp-includes/feed.php:
get_bloginfo_rss()
User Contributed Notes
你可能对这些文章感兴趣:
- wordpress函数get_all_post_type_supports()用法示例
- wordpress函数get_all_user_settings()用法示例
- wordpress函数get_all_category_ids()用法示例
- wordpress函数get_all_page_ids()用法示例
- wordpress函数get_allowed_mime_types()用法示例
- wordpress函数get_allowed_themes()用法示例
- wordpress函数get_alloptions_110()用法示例
- wordpress函数get_allowed_http_origins()用法示例
- wordpress函数get_alloptions()用法示例
- wordpress函数get_admin_users_for_domain()用法示例
- wordpress函数get_admin_page_title()用法示例
- wordpress函数get_admin_url()用法示例
- wordpress函数get_adjacent_post_rel_link()用法示例
- wordpress函数get_admin_page_parent()用法示例
如有疑问,请前往问答中心反馈!
反馈