wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



is_uninstallable_plugin › WordPress Function

Depuis2.7.0
Dépréciéen/a
is_uninstallable_plugin ( $plugin )
Paramètres:
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Requis: Oui
Retourne:
  • (bool) Whether plugin can be uninstalled.
Défini(e) dans:
Codex:

Determines whether the plugin can be uninstalled.



Source

function is_uninstallable_plugin( $plugin ) {
	$file = plugin_basename( $plugin );

	$uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
	if ( isset( $uninstallable_plugins[ $file ] ) || file_exists( WP_PLUGIN_DIR . '/' . dirname( $file ) . '/uninstall.php' ) ) {
		return true;
	}

	return false;
}