public static function setupAdmin() { global $wp_version, $post; // determine current admin page CRED_Helper::getAdminPage(array('post_type' => CRED_FORMS_CUSTOM_POST_NAME, 'base' => 'admin.php', 'pages' => array('view-archives-editor', 'views-editor', 'CRED_Forms', 'CRED_Fields', 'CRED_Settings', 'CRED_Help'))); CRED_Helper::getAdminPage(array('post_type' => CRED_USER_FORMS_CUSTOM_POST_NAME, 'base' => 'admin.php', 'pages' => array('view-archives-editor', 'views-editor', 'CRED_User_Forms', 'CRED_Fields', 'CRED_Settings', 'CRED_Help'))); // add plugin menus add_action('admin_menu', array(__CLASS__, 'addMenuItems')); CRED_Helper::setJSAndCSS(); if (version_compare($wp_version, '3.2', '>=')) { if (isset($post) && ($post->post_type == CRED_FORMS_CUSTOM_POST_NAME || $post->post_type == CRED_USER_FORMS_CUSTOM_POST_NAME)) { remove_action('pre_post_update', 'wp_save_post_revision'); } } /** * add debug information */ add_filter('icl_get_extra_debug_info', array(__CLASS__, 'getExtraDebugInfo')); }