Last active
November 6, 2017 20:56
-
-
Save obiPlabon/59582e1387677936ddb0fad41c792ba2 to your computer and use it in GitHub Desktop.
Bypass WordPress theme update notification. বাংলা টিউটোরিয়ালঃ http://obiplabon.im/745/bypass-wordpress-theme-update-notification/
This file contains hidden or 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 | |
| /** | |
| * Disable theme update notification | |
| * | |
| * Disabled this notification because there is a theme | |
| * in WP theme directory with same name. | |
| * We'll do this based on author name as author won't be same | |
| * | |
| * @param array $theme Installed themes information | |
| * @return array Modified information | |
| */ | |
| function op_disable_theme_update_notification( $theme ) { | |
| $slug = 'theme-slug'; | |
| if ( isset( $theme[$slug] ) && $theme[$slug]['author'] == 'Theme Author' ) { | |
| $theme[$slug]['hasUpdate'] = false; | |
| } | |
| return $theme; | |
| } | |
| add_filter( 'wp_prepare_themes_for_js', 'op_disable_theme_update_notification' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment