In the root file of my plugin (
the-plugin/the-plugin.php), I've set up some defines that I will be using throughout my plugin:
# Plugin's latest version define( 'THEPLUIGN_VERSION', '2.0.0' ); # Minimum WordPress version required define( 'THEPLUIGN_MIN_WP', '3.7' ); # Minimum PHP version required define( 'THEPLUIGN_MIN_PHP', '5.3' ); # Plugin base define( 'THEPLUIGN_BASE', plugin_basename( __FILE__ ) );
As you can see, I've prefix the defines with
THEPLUGIN_, I assume this is necessary to add in order to keep each of the values unique and to prevent conflict with other plugins. Is this true? Or is there a better way to define these values, globally, to be used throughout my plugin?
I've implemented both namespaces and class structure in my plugin.