Theme_Upgrader::hide_activate_preview_actions()publicWP 3.4.0

Don't display the activate and preview actions to the user.

Hooked to the install_theme_complete_actions filter by Theme_Upgrader::check_parent_theme_filter() when installing a child theme and installing the parent theme fails.

Method of the class: Theme_Upgrader{}

No Hooks.

Return

Array.

Usage

$Theme_Upgrader = new Theme_Upgrader();
$Theme_Upgrader->hide_activate_preview_actions( $actions );
$actions(array) (required)
Preview actions.

Changelog

Since 3.4.0 Introduced.

Theme_Upgrader::hide_activate_preview_actions() code WP 6.5.2

public function hide_activate_preview_actions( $actions ) {
	unset( $actions['activate'], $actions['preview'] );
	return $actions;
}