wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



is_uninstallable_plugin › WordPress Function

Od2.7.0
Przestarzałyn/a
is_uninstallable_plugin ( $plugin )
Parametry:
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Wymagane: Tak
Powrót:
  • (bool) Whether plugin can be uninstalled.
Zdefiniowane na:
Codex:

Determines whether the plugin can be uninstalled.



Źródło

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;
}