/** * Returns the registered tabs based on the supplied admin page hook. * * Filters: * cn_register_admin_tabs => Allow new tabs to be registered. * cn_filter_admin_tabs => Allow tabs to be filtered. * * The array construct for registering a tab: * array( * 'id' => 'string', // ID used to identify this tab and with which to register the settings sections * 'position' => int, // Set the position of the section. The lower the int the further left the tab will be place in the bank. * 'title' => 'string', // Title of the tab to be displayed on the admin page * 'page_hook' => 'string' // Admin page on which to add this section of options * } * * @author Steven A. Zahm * @since 0.7.3.0 * @return array */ public static function registerTabs() { $tabs = array(); $out = array(); $tabs = apply_filters('cn_register_settings_tabs', $tabs); $tabs = apply_filters('cn_filter_settings_tabs', $tabs); //var_dump($tabs); if (empty($tabs)) { return array(); } foreach ($tabs as $key => $tab) { $out[$tab['page_hook']][] = $tab; } self::$tabs = $out; }