Last active
August 29, 2015 14:07
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/