block_editor_settings_all

過濾鉤子
apply_filters( 'block_editor_settings_all', $editor_settings, $block_editor_context )
引數
  • (array) $editor_settings Default editor settings.
    Required:
  • (WP_Block_Editor_Context) $block_editor_context The current block editor context.
    Required:
定義位置
相關勾子
wp_editor_settingswp_code_editor_settingsblock_categories_allenqueue_block_editor_assetswp_editor_set_quality
相關方法
get_block_editor_settingsget_default_block_editor_settingsblock_editor_rest_api_preloadget_block_editor_server_block_settingsget_legacy_widget_block_editor_settingswp_get_code_editor_settings
引入
5.8.0
棄用
-

block_editor_settings_all: 這是WordPress中的一個過濾器鉤子,允許開發者修改區塊編輯器的設定。block_editor_settings_all鉤子將預設設定作為一個引數傳遞,鉤子函式可以返回一個修改後的設定陣列來代替使用。這對於調整區塊編輯器的行為或外觀很有用。

過濾傳遞給所有編輯型別的塊編輯器的設定。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$editor_settings = apply_filters( 'block_editor_settings_all', $editor_settings, $block_editor_context );
$editor_settings = apply_filters( 'block_editor_settings_all', $editor_settings, $block_editor_context );
$editor_settings = apply_filters( 'block_editor_settings_all', $editor_settings, $block_editor_context );

常見問題

FAQs
檢視更多 >