Plugin Constants

<?php

//Set Constants
function my_plugin_set_constants(){
define('MYPLUGIN_INCLUDES',str_replace('my-plugin.php','',__FILE__) . 'includes/');
define('MYPLUGIN_WP_ADMIN',get_bloginfo('wpurl') . '/wp-admin/');
define('MYPLUGIN_URL',WP_PLUGIN_URL . '/my-plugin/');
}

?>

0 Comments

You must be logged in to post a comment.