Filter hook 'install_theme_overwrite_actions'

in WP Core File wp-admin/includes/class-theme-installer-skin.php at line 378

View Source

install_theme_overwrite_actions

Filter Hook
Description
Filters the list of action links available following a single theme installation failure when overwriting is allowed.

Hook Information

File Location wp-admin/includes/class-theme-installer-skin.php View on GitHub
Hook Type Filter
Line Number 378

Hook Parameters

Type Name Description
string[] $install_actions Array of theme action links.
object $api Object containing WordPress.org API theme data.
array $new_theme_data Array with uploaded theme data.

Usage Examples

Basic Usage
<?php
// Hook into install_theme_overwrite_actions
add_filter('install_theme_overwrite_actions', 'my_custom_filter', 10, 3);

function my_custom_filter($install_actions, $api, $new_theme_data) {
    // Your custom filtering logic here
    return $install_actions;
}

Source Code Context

wp-admin/includes/class-theme-installer-skin.php:378 - How this hook is used in WordPress core
<?php
 373  		 *
 374  		 * @param string[] $install_actions Array of theme action links.
 375  		 * @param object   $api             Object containing WordPress.org API theme data.
 376  		 * @param array    $new_theme_data  Array with uploaded theme data.
 377  		 */
 378  		$install_actions = apply_filters( 'install_theme_overwrite_actions', $install_actions, $this->api, $new_theme_data );
 379  
 380  		if ( ! empty( $install_actions ) ) {
 381  			printf(
 382  				'<p class="update-from-upload-expired hidden">%s</p>',
 383  				__( 'The uploaded file has expired. Please go back and upload it again.' )

PHP Documentation

<?php
/**
		 * Filters the list of action links available following a single theme installation failure
		 * when overwriting is allowed.
		 *
		 * @since 5.5.0
		 *
		 * @param string[] $install_actions Array of theme action links.
		 * @param object   $api             Object containing WordPress.org API theme data.
		 * @param array    $new_theme_data  Array with uploaded theme data.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-admin/includes/class-theme-installer-skin.php
Related Hooks

Related hooks will be displayed here in future updates.