pre_wp_load_alloptions

过滤钩子
apply_filters( 'pre_wp_load_alloptions', null, $force_cache )
参数
  • (array|null) $alloptions An array of alloptions. Default null.
    Required:
  • (bool) $force_cache Whether to force an update of the local cache from the persistent cache. Default false.
    Required:
定义位置
相关勾子
pre_cache_alloptionspre_update_optionprofile_personal_optionswp_feed_optionsalloptions
相关方法
wp_load_alloptionsget_alloptionswp_load_core_site_optionsremove_allowed_optionsadd_allowed_optionswp_load_translations_early
引入
6.2.0
弃用
-

在填充 alloptions 数组之前对其进行过滤。

从过滤器返回数组将有效地缩短 wp_load_alloptions() 函数的执行时间,并返回该值。

$alloptions = apply_filters( 'pre_wp_load_alloptions', null, $force_cache );

常见问题

FAQs
查看更多 >