[Plugin: Duplicate Menu] Parse error on activation
-
When I activate the plugin it throws an error:
Parse error: syntax error, unexpected T_FUNCTION in /home/tgc_dev/sptc.the-graphics.net/wp-content/plugins/duplicate-menu/duplicate-menu.php on line 41
I edited the code to make the creation of the page a separate function:
// WordPress actions if( IS_ADMIN ) { add_action( 'admin_menu', 'duplicate_menu_admin_page' ); } function duplicate_menu_admin_page () { add_theme_page( 'Duplicate Menu', 'Duplicate Menu', 'manage_options', 'duplicate-menu', array( 'DuplicateMenu', 'options_screen' ) ); }
With that change the plugin seems to work fine. Thanks for this – I’ve been looking for a way to easily duplicate a menu!
– Chris
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘[Plugin: Duplicate Menu] Parse error on activation’ is closed to new replies.