Last active
September 26, 2023 10:58
-
-
Save MakarandMane/448d63f9da4cdfae5cda63f33c74002d to your computer and use it in GitHub Desktop.
This is my private to hide betheme license purchase error notice on admin panel.
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 | |
//This is variable is also used in parent theme i.e. BeTheme | |
//Set it false to show other betheme options. | |
define( 'WHITE_LABEL', true ); | |
add_action( 'admin_menu','while_label_theme', 13 ); | |
function while_label_theme(){ | |
if( WHITE_LABEL ){ | |
define( 'ENVATO_HOSTED_KEY', true ); | |
global $mfn_dashboard; | |
remove_action( 'admin_notices', array( $mfn_dashboard, 'admin_notices' ), 1 ); | |
// Move theme options page under | |
global $MFN_Options; | |
remove_action( 'admin_print_styles-'.$MFN_Options->page, array( &$MFN_Options, '_enqueue' ) ); | |
remove_submenu_page( 'betheme', $MFN_Options->args['page_slug'] ); | |
remove_menu_page( 'betheme' ); | |
$MFN_Options->page = add_submenu_page( | |
'themes.php', | |
$MFN_Options->args['page_title'], | |
$MFN_Options->args['page_title'], | |
$MFN_Options->args['page_cap'], | |
$MFN_Options->args['page_slug'], | |
array( &$MFN_Options, '_options_page_html' ) | |
); | |
add_action( 'admin_print_styles-'.$MFN_Options->page, array( &$MFN_Options, '_enqueue' ) ); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have received syntax error.
If you are not developer, then you might have code from
<?php
inside php.So Just copy between
<?php
and?>
.If still not works, try to copy it inside child theme