Skip to content

Instantly share code, notes, and snippets.

@deckerweb deckerweb/cpi-snippets.php
Last active Aug 29, 2015

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

deckerweb commented Oct 7, 2014

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
You can’t perform that action at this time.