theme_action_links_{$stylesheet}

過濾鉤子
apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context )
引數
  • (string[]) $actions An array of action links.
    Required:
  • (WP_Theme) $theme The current WP_Theme object.
    Required:
  • (string) $context Status of the theme, one of 'all', 'enabled', or 'disabled'.
    Required:
定義位置
相關勾子
theme_action_linksafter_theme_row_stylesheetwp_sitemaps_stylesheet_urlwp_sitemaps_stylesheet_csscustomize_controls_print_styles
相關方法
wpmu_activate_stylesheetget_stylesheetget_editor_stylesheetswp_maybe_inline_styleswp_get_global_stylesheetget_locale_stylesheet_uri
引入
3.1.0
棄用
-

theme_action_links_{$stylesheet}是theme_action_links鉤子的一個變種,專門針對某一特定主題。它允許開發者在主題頁面的”行動”連結部分為特定主題新增額外的連結。

過濾多站點主題列表表中特定主題的動作連結。

鉤子名的動態部分$stylesheet是指主題的目錄名,在大多數情況下,它與模板名同義。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );
$actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );
$actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );

常見問題

FAQs
檢視更多 >