Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/8e3bc0a1d62a096695db to your computer and use it in GitHub Desktop.
Save deckerweb/8e3bc0a1d62a096695db to your computer and use it in GitHub Desktop.
Cleaner Plugin Installer plugin v1.0.0 or higher -- helper functions, plus actions, filters for customizing etc.
<?php
/** Do NOT include the opening php tag */
/**
* Plugin: Cleaner Plugin Installer - activate Slim Mode.
*/
if ( ! defined( 'CPI_SLIM_MODE' ) ) {
define( 'CPI_SLIM_MODE', TRUE );
}
add_filter( 'install_plugins_tabs', 'custom_cpi_plugin_installer_tabs_tweaks', 15, 1 );
/**
* Plugin: Cleaner Plugin Installer
* Remove "Collections" and/ or "Topics" tab.
*
* @link https://gist.github.com/deckerweb/8e3bc0a1d62a096695db
*
* @param array $tabs
*
* @return array $tabs Array of (tweaked) plugin installer tabs.
*/
function custom_cpi_plugin_installer_tabs_tweaks( $tabs ) {
unset( $tabs[ 'collections' ] );
//unset( $tabs[ 'topics' ] );
return $tabs;
} // end function
@deckerweb
Copy link
Author

Note: The above codes work with plugin version 1.0.0 or higher!

Extended explanation can be found at the plugin's page "FAQ" section at the bottom:
https://wordpress.org/plugins/cleaner-plugin-installer/faq/

Download "Cleaner Plugin Installer" plugin at wordpress.org:
https://wordpress.org/plugins/cleaner-plugin-installer/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment