W3cubDocs

/WordPress

Theme_Upgrader::hide_activate_preview_actions( array $actions )

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

Description

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.

Parameters

$actions

(array) (Required) Preview actions.

Return

(array)

Source

File: wp-admin/includes/class-theme-upgrader.php

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

Changelog

Version Description
3.4.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/theme_upgrader/hide_activate_preview_actions