• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress core a2z

WordPress core a2z

WordPress core only

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / is_uninstallable_plugin() – Whether the plugin can be uninstalled.

You appear to be a bot. Output may be restricted

Description

Whether the plugin can be uninstalled.

Usage

$bool = is_uninstallable_plugin( $plugin );

Parameters

$plugin
( string ) required – Path to the plugin file relative to the plugins directory.

Returns

bool Whether plugin can be uninstalled.

Source

File name: wordpress/wp-admin/includes/plugin.php
Lines:

1 to 10 of 10
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;
}
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 25th November 2019

Primary Sidebar

Information

Function name: is_uninstallable_plugin
Plugin ref: WordPress
Version: 5.6.2
Sourcefile: wp-admin/includes/plugin.php
File ref: wp-admin/includes/plugin.php
Deprecated?: No
API Letters: I,P,U

Footer

WP-a2z
WordPress core a2z
WordPress core only
WordPress 5.6.2
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  core.wp-a2z.org
© Copyright WP-a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites