wpseek.com
WordPress开发者和主题制作者的搜索引擎



pre_prepare_themes_for_js › WordPress过滤钩子

Since4.2.0
已弃用n/a
apply_filters( 'pre_prepare_themes_for_js', array()
参数: (3)
  • (array) $prepared_themes An associative array of theme data. Default empty array.
    Required: Yes
  • (WP_Theme[]|null) $themes An array of theme objects to prepare, if any.
    Required: Yes
  • (string) $current_theme The active theme slug.
    Required: Yes
定义在:
文档:

Filters theme data before it is prepared for JavaScript.

Passing a non-empty array will result in wp_prepare_themes_for_js() returning early with that value instead.





源码

$prepared_themes = (array) apply_filters( 'pre_prepare_themes_for_js', array(), $themes, $current_theme );