theme_action_links_(stylesheet)
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; }
- $actions(string[])
- An array of action links.
- $theme(WP_Theme)
- The current WP_Theme object.
- $context(строка)
- Status of the theme, one of 'all', 'enabled', or 'disabled'.
Список изменений
С версии 3.1.0 | Введена. |
Где вызывается хук
theme_action_links_(stylesheet)
theme_action_links_(stylesheet)
wp-admin/includes/class-wp-ms-themes-list-table.php 688
$actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );
wp-admin/includes/class-wp-themes-list-table.php 243
$actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, 'all' );