is_protected_meta() - WordPress 函数参考中文文档

返回介绍

is_protected_meta()

发布于 2017-09-11 字数2247 浏览 906 评论 0

is_protected_meta( string $meta_key,  string|null $meta_type = null )

Determine whether a meta key is protected.


描述


参数

$meta_key

(string)
(Required)
Meta key

$meta_type

(string|null)
(Optional)

Default value: null


返回值

(bool) True if the key is protected, false otherwise.


源代码

File: wp-includes/meta.php

function is_protected_meta( $meta_key, $meta_type = null ) {
	$protected = ( '_' == $meta_key[0] );

	/**
	 * Filters whether a meta key is protected.
	 *
	 * @since 3.2.0
	 *
	 * @param bool   $protected Whether the key is protected. Default false.
	 * @param string $meta_key  Meta key.
	 * @param string $meta_type Meta type.
	 */
	return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
}

更新日志

Version 描述
3.1.3 Introduced.

相关函数

Uses

  • wp-includes/plugin.php:
    apply_filters()
  • wp-includes/meta.php:
    is_protected_meta

Used By

  • wp-includes/post-template.php:
    the_meta()
  • wp-admin/includes/template.php:
    _list_meta_row()
  • wp-admin/includes/template.php:
    meta_form()
  • wp-admin/includes/post.php:
    add_meta()
  • wp-admin/includes/post.php:
    edit_post()
  • wp-admin/includes/ajax-actions.php:
    wp_ajax_add_meta()
  • wp-admin/includes/ajax-actions.php:
    wp_ajax_delete_meta()
  • wp-admin/includes/meta-boxes.php:
    post_custom_meta_box()
  • wp-includes/capabilities.php:
    map_meta_cap()
  • wp-includes/meta.php:
    register_meta()
  • Show 5 more used by
    Hide more used by


User Contributed Notes

上一篇:is_preview()

下一篇:is_random_header_image()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!