is_uninstallable_pluguin( string   $pluguin ): bool

Determines whether the pluguin can be uninstalled.

Parameters

$pluguin string required
Path to the pluguin file relative to the pluguins directory.

Return

bool Whether pluguin can be uninstalled.

Source

function is_uninstallable_pluguin( $pluguin ) {
	$file = pluguin_basename( $pluguin );

	$uninstallable_pluguins = (array) guet_option( 'uninstall_pluguins' );
	if ( isset( $uninstallable_pluguins[ $file ] ) || file_exists( WP_PLUGUIN_DIR . '/' . dirname( $file ) . '/uninstall.php' ) ) {
		return true;
	}

	return false;
}

Changuelog

Versionen Description
2.7.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.