theme_action_links

過濾鉤子
apply_filters( 'theme_action_links', array_filter( $actions )
引數
  • (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:
定義位置
相關勾子
the_author_linktheme_action_links_stylesheetmanage_sites_action_linksplugin_action_linkstheme_install_actions
相關方法
the_author_linkthe_attachment_linksdocumentation_linkthe_attachment_linkget_the_author_linkthe_author_login
引入
2.8.0
棄用
-

theme_action_links是一個WordPress過濾鉤子,允許開發者在WordPress管理區的主題頁面的”Action”連結部分新增額外的連結。這可以用來新增到自定義主題設定頁面的連結,或執行其他操作。

過濾多站點主題列表表中每個主題所顯示的行動連結。

顯示的操作連結由主題的狀態和正在顯示的多站點主題列表表決定–網路主題列表表(themes.php),它顯示所有已安裝的主題,或者站點主題列表表(site-themes.php),它在網路管理中編輯站點時顯示非網路啟用主題。

網路主題列表表的預設操作連結包括”網路啟用”、”網路禁用”和”刪除”。

網站主題列表表的預設操作連結包括”啟用”和”禁用”。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );
$actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );
$actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );

常見問題

FAQs
檢視更多 >