public static function init() { CMA_AnswerThread::init(); CMA_BuddyPress::init(); if (get_option('cma_afterActivation', 0) == 1) { add_action('admin_notices', array(get_class(), 'showProMessages')); } add_action('init', array('CMA_BaseController', 'bootstrap')); add_action('widgets_init', array('CMA_AnswerController', 'registerSidebars')); add_filter('bp_blogs_record_comment_post_types', array(get_class(), 'bp_record_my_custom_post_type_comments')); }
public static function init() { $licensingApi = new CMA_free_Cminds_Licensing_API('CM Answers', CMA_AnswerThread::ADMIN_MENU, 'CM Answers', CMA_PLUGIN_FILE, array('release-notes' => 'http://answers.cminds.com/release-notes/'), '', array('CM Answers')); CMA_AnswerThread::init(); CMA_BuddyPress::init(); if (get_option('cma_afterActivation', 0) == 1) { add_action('admin_notices', array(get_class(), 'showProMessages')); } add_action('init', array('CMA_BaseController', 'bootstrap')); add_filter('bp_blogs_record_comment_post_types', array(get_class(), 'bp_record_my_custom_post_type_comments')); }
protected static function _addAdminPages() { add_action('CMA_custom_post_type_nav', array(get_class(), 'addCustomPostTypeNav'), 1, 1); add_action('CMA_custom_taxonomy_nav', array(get_class(), 'addCustomTaxonomyNav'), 1, 1); if (current_user_can('manage_options')) { add_action('admin_menu', array(get_class(), 'registerAdminPages')); } if (isset($_GET['page'])) { if ($_GET['page'] == self::ADMIN_BP_NOTIFY) { CMA_BuddyPress::notifyAllUsers(); } } }
protected static function _addAdminPages() { if (is_admin() and isset($_GET['page']) and $_GET['page'] == self::ADMIN_SETTINGS) { add_action('init', array(__CLASS__, 'processClearDatabase'), 998); add_action('init', array(__CLASS__, 'processSettings'), 999); } if (isset($_GET['page'])) { if ($_GET['page'] == self::ADMIN_LOGS and !empty($_GET['action']) and CMA_LogsController::isActionBeforeRender($_GET['action'])) { CMA_LogsController::init(); } else { if ($_GET['page'] == self::ADMIN_SETTINGS_SEARCH_USERS) { self::settingsSearchUsers(); } else { if ($_GET['page'] == self::ADMIN_SETTINGS_USER_GET_ITEM) { self::settingsSearchUsersGetItem(); } else { if ($_GET['page'] == self::ADMIN_IMPORT and self::_isPost() and !empty($_POST['step'])) { self::processCustomImport(); } else { if ($_GET['page'] == self::ADMIN_UNMARK_SPAM) { self::processUnmarkSpam(); } else { if ($_GET['page'] == self::ADMIN_PRIVATE_ANSWER) { self::processPrivateAnswer(); } else { if ($_GET['page'] == self::ADMIN_BP_NOTIFY) { CMA_BuddyPress::notifyAllUsers(); } } } } } } } } add_action('CMA_custom_post_type_nav', array(get_class(), 'addCustomPostTypeNav'), 1, 1); add_action('CMA_custom_taxonomy_nav', array(get_class(), 'addCustomTaxonomyNav'), 1, 1); if (current_user_can('manage_options')) { add_action('admin_menu', array(get_class(), 'registerAdminPages'), 15); } }