过滤器中的__return_false是什么


Answers:


33

WordPress包含用于快速返回值的内置函数。

它们旨在用作快速内置函数,该函数将公共值返回到过滤器挂钩,例如true,false或空数组。

  • __return_false —返回的布尔值false
  • __return_true —返回的布尔值true
  • __return_empty_array —返回一个空的PHP array
  • __return_zero —返回整数0
  • __return_null —返回NULL
  • __return_empty_string—返回''
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.