wp-includes/global-styles-and-settings.php

WP檔案 5
APIs to interact with global settings & styles.
函式/鉤子名 描述
wp_get_block_name_from_theme_json_path (函式) 從給定的 theme.json 路徑中獲取區塊名稱。
wp_get_theme_directory_pattern_slugs (函式) 從樣板目錄返回當前主題需要註冊的樣板(slugs)。
wp_get_theme_data_custom_templates (函式) 通過theme.json返回主題定義的自定義模板的後設資料。
wp_get_theme_data_template_parts (函式) 返回主題定義的模板部件的後設資料。
wp_get_block_css_selector (函式) 確定所提供區塊型別和屬性的 CSS 選擇器,如果可用,則返回該選擇器。
wp_theme_has_theme_json (函式) wp_theme_has_theme_json: 這是一個WordPress的函式,用來檢查活動主題是否有一個theme.json檔案。這個檔案用於定義主題的各種設定和配置,例如塊樣式和塊支援。
wp_get_global_stylesheet (函式) wp_get_global_stylesheet: 這個函式返回wp-admin.css檔案的內容,該檔案用於設計WordPress管理介面的樣式。
wp_get_global_styles_svg_filters (函式) wp_get_global_styles_svg_filters: 這個函式返回svg-filters.css檔案的內容,該檔案用於WordPress管理介面中SVG過濾器的樣式。
wp_get_global_styles (函式) wp_get_global_styles: 這個函式返回global.css檔案的內容,該檔案用於WordPress管理介面的樣式。
wp_get_global_settings (函式) wp_get_global_settings: 這個函式返回一個在整個WordPress中使用的全域性設定的陣列。這些設定在wp-admin/includes/default-constants.ph
wp_get_global_styles_custom_css (函式) wp_get_global_styles_custom_css(): 這個函式檢索WordPress中全域性樣式的自定義CSS。
wp_clean_theme_json_cache (函式) wp_clean_theme_json_cache(): 這個函式可以清除WordPress中的theme.json快取。
wp_add_global_styles_for_blocks (函式) wp_add_global_styles_for_blocks: 該函式用於為塊元素新增全域性樣式。它不需要任何引數。

常見問題

FAQs
檢視更多 >