/** * Handles the various update actions for the default tabs. * * @since 2.8.0 * * @param string $action The action that is being done. * @return string $did_update The update message result. */ function wpmem_admin_action($action) { $did_update = ''; // makes sure $did_update is defined switch ($action) { case 'update_settings': case 'update_cpts': /** * Load Options tab functions. */ include_once WPMEM_PATH . 'admin/tab-options.php'; $did_update = 'update_cpts' == $action ? wpmem_update_cpts() : wpmem_update_options(); break; case 'update_fields': case 'add_field': case 'edit_field': /** * Load Fields tab functions. */ include_once WPMEM_PATH . 'admin/tab-fields.php'; $did_update = wpmem_update_fields($action); break; case 'update_dialogs': /** * Load Dialogs tab functions. */ include_once WPMEM_PATH . 'admin/tab-dialogs.php'; $did_update = wpmem_update_dialogs(); break; case 'update_emails': /** * Load Emails tab functions. */ include_once WPMEM_PATH . 'admin/tab-emails.php'; $did_update = wpmem_update_emails(); break; case 'update_captcha': /** * Load Captcha tab functions. */ include_once WPMEM_PATH . 'admin/tab-captcha.php'; $did_update = wpmem_update_captcha(); break; } return $did_update; }
/** * Handles the various update actions for the default tabs. * * @since 2.8.0 * * @param string $action The action that is being done. * @return string $did_update The update message result. */ function wpmem_admin_action($action) { $did_update = ''; // makes sure $did_update is defined switch ($action) { case 'update_settings': case 'update_cpts': $did_update = 'update_cpts' == $action ? wpmem_update_cpts() : wpmem_update_options(); break; case 'update_fields': case 'add_field': case 'edit_field': $did_update = wpmem_update_fields($action); break; case 'update_dialogs': $did_update = wpmem_update_dialogs(); break; case 'update_emails': $did_update = wpmem_update_emails(); break; case 'update_captcha': $did_update = wpmem_update_captcha(); break; } return $did_update; }