=") ) { /** * Register function that is called when plugin is installed * * @TODO: make activatigon multi site aware, as in https://github.com/scribu/wp-proper-network-activation */ // register_activation_hook( trailingslashit(WP_PLUGIN_DIR) . trailingslashit( plugin_basename(__DIR__) ) . "index.php" , array("SimpleHistory", "on_plugin_activate" ) ); if ( ! defined( 'SIMPLE_HISTORY_VERSION' ) ) { define( 'SIMPLE_HISTORY_VERSION', '2.14' ); } if ( ! defined( 'SIMPLE_HISTORY_PATH' ) ) { define( 'SIMPLE_HISTORY_PATH', plugin_dir_path( __FILE__ ) ); } if ( ! defined( 'SIMPLE_HISTORY_BASENAME' ) ) { define( 'SIMPLE_HISTORY_BASENAME', plugin_basename( __FILE__ ) ); } if ( ! defined( 'SIMPLE_HISTORY_DIR_URL' ) ) { define( 'SIMPLE_HISTORY_DIR_URL', plugin_dir_url( __FILE__ ) ); } if ( ! defined( 'SIMPLE_HISTORY_FILE' ) ) { define( 'SIMPLE_HISTORY_FILE', __FILE__ ); } /** Load required files */ require_once(__DIR__ . "/inc/SimpleHistory.php"); require_once(__DIR__ . "/inc/SimpleHistoryLogQuery.php"); // Prev behavior: /* define( 'SIMPLE_HISTORY_FILE', __FILE__ ); define( 'SIMPLE_HISTORY_PATH', plugin_dir_path( SIMPLE_HISTORY_FILE ) ); define( 'SIMPLE_HISTORY_BASENAME', plugin_basename( SIMPLE_HISTORY_FILE ) ); */ // Constants will be like: /* SIMPLE_HISTORY_FILE: Var is string with length 57: /Users/username/GIT/Simple-History/index.php SIMPLE_HISTORY_PATH: Var is string with length 48: /Users/username/GIT/Simple-History/ SIMPLE_HISTORY_BASENAME: Var is string with length 24: simple-history/index.php */ /** Boot up */ SimpleHistory::get_instance(); } else { // user is running to old version of php, add admin notice about that add_action( 'admin_notices', 'simple_history_old_version_admin_notice' ); function simple_history_old_version_admin_notice() { ?>