Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
delete_{$meta_type}_metadata - 删除特定类型的meta数据时短路其结果 - WordPress钩子 - WordPress动力
当前浏览:首页 / WordPress钩子 / delete_{$meta_type}_metadata

apply_filters( "delete_{$meta_type}_metadata", null|bool $delete, int $object_id, string $meta_key, mixed $meta_value, bool $delete_all )

删除特定类型的meta数据时短路其结果


Warning: Undefined array key -1 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 185

Warning: Undefined array key 4 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 186

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "687bd892cd80ff4ebec47400d42d3818" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "3b2a0af8bfdc89a0255e782695685f52" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "cf56aca0d759bae8c37cbb9d06b846ae" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "f73a5857ea2ddccc9aee632dec0927d2" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

deletemore...

metamore...

metadatamore...

typemore...


描述

挂钩名称的动态部分$meta_type指的是meta对象类型(post、comment、term、user或具有相关meta表的任何其他类型)。
返回非空值将有效地短路该函数。

可能的钩子名称包括:

  • delete_post_metadata
  • delete_comment_metadata
  • delete_term_metadata
  • delete_user_metadata

参数

$deletenull|bool
是否允许删除给定类型的meta数据。
$object_idint
meta数据关联的对象ID。
$meta_keystring
meta数据键。
$meta_valuemixed
meta数据值。如果非标量,则必须是可序列化的。
$delete_allbool
是否删除所有对象的匹配meta数据条目,忽略指定的$object_id.
默认 false


源码

查看源码 官方文档


更新日志

版本描述
3.1.0开始引入

Warning: Undefined variable $o in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference.php on line 194