apply_filters_deprecated( string $tag, array $args, string $version, string $replacement = false, string $message = null )
Fires functions attached to a deprecated filter hook.
描述
When a filter hook is deprecated, the apply_filters() call is replaced with apply_filters_deprecated(), which triggers a deprecation notice and then fires the original filter hook.
参数
- $tag
-
(string)
(Required)
The name of the filter hook. - $args
-
(array)
(Required)
Array of additional function arguments to be passed to apply_filters(). - $version
-
(string)
(Required)
The version of WordPress that deprecated the hook. - $replacement
-
(string)
(Optional)
The hook that should have been used.Default value: false
- $message
-
(string)
(Optional)
A message regarding the change.Default value: null
源代码
File: wp-includes/plugin.php
function apply_filters_deprecated( $tag, $args, $version, $replacement = false, $message = null ) {
if ( ! has_filter( $tag ) ) {
return $args[0];
}
_deprecated_hook( $tag, $version, $replacement, $message );
return apply_filters_ref_array( $tag, $args );
}
更新日志
Version | 描述 |
---|---|
4.6.0 | Introduced. |
相关函数
Uses
-
wp-includes/functions.php:
_deprecated_hook() -
wp-includes/plugin.php:
has_filter() -
wp-includes/plugin.php:
apply_filters_ref_array()
Used By
-
wp-includes/class-wp-site.php:
WP_Site::get_details() -
wp-includes/rest-api/class-wp-rest-server.php:
WP_REST_Server::serve_request() -
wp-includes/ms-blogs.php:
get_blog_details()
User Contributed Notes
你可能对这些文章感兴趣:
- wordpress函数get_author_template()用法示例
- wordpress函数get_author_name()用法示例
- wordpress函数get_author_posts_url()用法示例
- wordpress函数get_author_rss_link()用法示例
- wordpress函数get_author_feed_link()用法示例
- wordpress函数get_author_link()用法示例
- wordpress函数get_attachment_taxonomies()用法示例
- wordpress函数get_attachment_template()用法示例
- wordpress函数get_attachment_innerHTML()用法示例
- wordpress函数get_attachment_link()用法示例
- wordpress函数get_attachment_icon_src()用法示例
- wordpress函数get_attachment_icon()用法示例
- wordpress函数get_attached_media()用法示例
- wordpress函数get_attachment_fields_to_edit()用法示例
如有疑问,请前往问答中心反馈!
反馈