theme_action_links

theme_action_links

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('theme_action_links') is found 2 times:

  • /wp-admin/includes/class-wp-ms-themes-list-table.php line 672
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    * @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'.
     */
    $actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );
     
    /**
     * 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
  • /wp-admin/includes/class-wp-themes-list-table.php line 240
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
        );
    }
     
    /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
    $actions = apply_filters( 'theme_action_links', $actions, $theme, 'all' );
     
    /** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
    $actions       = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, 'all' );
    $delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : '';
    unset( $actions['delete'] );

See this hook used in plugins: