public static function add_menu() { /* Register our plugin page */ self::$pagehook = add_submenu_page('themes.php', __('Easy FancyBox Settings', 'easy-fancybox'), __('FancyBox', 'easy-fancybox'), 'manage_options', 'easy-fancybox', array(__CLASS__, 'admin')); /* Using registered $page handle to hook script load */ add_action('load-' . self::$pagehook, array(__CLASS__, 'admin_scripts')); }
/* For Installation instructions, usage, revision history and other info: see readme.txt included in this package */ /************** * CONSTANTS **************/ define('EASY_FANCYBOX_VERSION', '1.5.6'); define('FANCYBOX_VERSION', '1.3.6'); //define( 'FANCYBOX2_VERSION', '2.0.6' ); define('MOUSEWHEEL_VERSION', '3.1.3'); define('EASING_VERSION', '1.3'); define('METADATA_VERSION', '2.1'); define('EASY_FANCYBOX_PLUGINBASENAME', plugin_basename(__FILE__)); define('EASY_FANCYBOX_PLUGINFILE', basename(__FILE__)); // Check if easy-fancybox.php is moved one dir up like in WPMU's /mu-plugins/ // or if plugins_url() returns the main plugins dir location as it does on // a Debian repository install. // NOTE: WP_PLUGIN_URL causes problems when installed in /mu-plugins/ if (!stristr(plugins_url('', __FILE__), '/easy-fancybox')) { define('EASY_FANCYBOX_SUBDIR', 'easy-fancybox/'); } else { define('EASY_FANCYBOX_SUBDIR', ''); } define('EASY_FANCYBOX_PLUGINDIR', dirname(__FILE__) . '/' . EASY_FANCYBOX_SUBDIR); define('EASY_FANCYBOX_PLUGINURL', plugins_url('/' . EASY_FANCYBOX_SUBDIR, __FILE__)); /************** * CLASS **************/ require_once EASY_FANCYBOX_PLUGINDIR . 'easy-fancybox-class.php'; easyFancyBox::run();