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() 函式的執行時間,並返回該值。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$alloptions = apply_filters( 'pre_wp_load_alloptions', null, $force_cache );
$alloptions = apply_filters( 'pre_wp_load_alloptions', null, $force_cache );
$alloptions = apply_filters( 'pre_wp_load_alloptions', null, $force_cache );

常見問題

FAQs
檢視更多 >