WP HOOKS
filtrod 2.8.0

theme_action_links

Args 3Plik wp-admin/includes/class-wp-ms-themes-list-table.phpDokumentacja WP ↗

Opis — z kodu źródłowego

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

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'.

Parametry

ParametrTypOpis
$actionsstring[]An array of action links.
$theme\WP_ThemeThe current WP_Theme object.
$contextstringStatus of the theme, one of 'all', 'enabled', or 'disabled'.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'theme_action_links', 'twoja_funkcja', 10, 3 );

function twoja_funkcja($param_1, $param_2, $param_3) {
	// Twój kod
}

Popularne w tej kategorii