theme_action_links_(stylesheet) хук-фильтрWP 3.1.0

Filters the action links of a specific theme in the Multisite themes list table.

The dynamic portion of the hook name, $stylesheet, refers to the directory name of the theme, which in most cases is synonymous with the template name.


add_filter( 'theme_action_links_(stylesheet)', 'wp_kama_theme_action_links_stylesheet_filter', 10, 3 );

 * Function for `theme_action_links_(stylesheet)` filter-hook.
 * @param string[] $actions An array of action links.
 * @param WP_Theme $theme   The current WP_Theme object.
 * @param string   $context Status of the theme, one of 'all', 'enabled', or 'disabled'.
 * @return string[]
function wp_kama_theme_action_links_stylesheet_filter( $actions, $theme, $context ){

	// filter...
	return $actions;
An array of action links.
The current WP_Theme object.
Status of the theme, one of 'all', 'enabled', or 'disabled'.

Список изменений

С версии 3.1.0 Введена.

Где вызывается хук

wp-admin/includes/class-wp-ms-themes-list-table.php 674
$actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );
wp-admin/includes/class-wp-themes-list-table.php 241
$actions       = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, 'all' );

Где используется хук в WordPress

Использование не найдено.