/** * Primary admin function * * @since 2.1 * * @uses do_action wpmem_admin_do_tab */ function wpmem_admin() { $did_update = isset($_POST['wpmem_admin_a']) ? wpmem_admin_action($_POST['wpmem_admin_a']) : false; $wpmem_settings = get_option('wpmembers_settings'); if ($wpmem_settings[6]) { add_filter('wpmem_admin_tabs', 'wpmem_add_captcha_tab'); add_action('wpmem_admin_do_tab', 'wpmem_a_captcha_tab', 1, 1); } ?> <div class="wrap"> <?php screen_icon('options-general'); ?> <!--<h2>WP-Members <?php _e('Settings', 'wp-members'); ?> </h2>--> <?php $tab = isset($_GET['tab']) ? $_GET['tab'] : 'options'; wpmem_admin_tabs($tab); wpmem_a_do_warnings($did_update, $wpmem_settings); do_action('wpmem_admin_do_tab', $tab, $wpmem_settings); ?> </div><!-- .wrap --><?php return; }
/** * Primary admin function. * * @since 2.1.0 * * @global object $wpmem The WP_Members object. */ function wpmem_admin() { $did_update = isset($_POST['wpmem_admin_a']) ? wpmem_admin_action($_POST['wpmem_admin_a']) : false; global $wpmem; if ($wpmem->captcha) { add_filter('wpmem_admin_tabs', 'wpmem_add_captcha_tab'); add_action('wpmem_admin_do_tab', 'wpmem_a_captcha_tab', 1, 1); } ?> <div class="wrap"> <?php screen_icon('options-general'); ?> <!--<h2>WP-Members <?php _e('Settings', 'wp-members'); ?> </h2>--> <?php $tab = isset($_GET['tab']) ? $_GET['tab'] : 'options'; // Render the tab being displayed. wpmem_admin_tabs($tab); // Render any warning messages. wpmem_a_do_warnings($did_update); /** * Fires at the end of creating an admin panel tab. * * This action is part of the plugin's admin panel API for adding * additional admin tabs. This action is for adding content for * a custom tab. * * @since 2.8.0 * * @param string $tab The tab being generated. */ do_action('wpmem_admin_do_tab', $tab); ?> </div><!-- .wrap --><?php return; }