Last active
December 21, 2018 15:39
-
-
Save deckerweb/21c14a12ac05f81caef2f3d9b8c6454f to your computer and use it in GitHub Desktop.
Toolbar Extras plugin v1.3.9+: Set a custom capability for unloading translations
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 */ | |
if ( function_exists( 'tbex_capability_unloading_translations' ) ) : | |
add_filter( 'tbex_filter_capability_unloading_translations', 'tbex_capability_unloading_translations' ); | |
/** | |
* Set a custom capability for the Smart Tweak feature for unloading certain translations. | |
* This filter is available since Toolbar Extras version 1.3.9 | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb/21c14a12ac05f81caef2f3d9b8c6454f | |
* | |
* @param string $capability String ID for capability. | |
* @return string Modified string ID for capability. | |
*/ | |
function tbex_capability_unloading_translations( $capability ) { | |
return 'edit_posts'; | |
} // end function | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment