File containing variables and functions
-
I need to store variables and functions that are used in the main plugin’s file and plugin’s options file in one file for easier future editing. The problem is, that PHP does not allow it (redeclaration error). What should I do to fix it? Thanks.
Main plugin’s file:
include("sb-common-declarations.php"); //load multiple used declarations //some code //... function spammer_blocker_options(){ //load options page include("sb-common-declarations.php"); //load multiple used declarations include("sb-options.php"); } add_action('admin_menu', 'spammer_blocker');
- The topic ‘File containing variables and functions’ is closed to new replies.