theme_action_links WordPress Action Hook

The theme_action_links hook allows you to add custom links to the WordPress admin area for your theme. This is useful for adding links to your theme options page or documentation.

apply_filters( 'theme_action_links', string[] $actions, WP_Theme $theme, string $context ) #

Filters the action links displayed for each theme in the Multisite themes list table.


Description

The action links displayed are determined by the theme’s status, and which Multisite themes list table is being displayed – the Network themes list table (themes.php), which displays all installed themes, or the Site themes list table (site-themes.php), which displays the non-network enabled themes when editing a site in the Network admin.

The default action links for the Network themes list table include ‘Network Enable’, ‘Network Disable’, and ‘Delete’.

The default action links for the Site themes list table include ‘Enable’, and ‘Disable’.


Top ↑

Parameters

$actions

(string[])An array of action links.

$theme

(WP_Theme)The current WP_Theme object.

$context

(string)Status of the theme, one of 'all', 'enabled', or 'disabled'.


Top ↑

Source

File: wp-admin/includes/class-wp-ms-themes-list-table.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.