' .'

'. __('Please check your user lists if you have upgraded from a version < 4.0','amr-users') .'

' .__('If you are using "user registration date" in a user list, you may need to adjust the format.','amr-users') .'

'. '

' .''); } function amr_check_for_upgrades () { // NB must be in order of the oldest changes first // called from ausers_get_option // should already have values then - and will not be new ? global $amain, $aopt; if (empty($amain)) $amain = ausers_get_option('amr-users-main'); //if (WP_DEBUG) echo '
Debug mode: check doing upgrade check
'; // must be in admin and be admin if (!is_admin() or !(current_user_can('manage_options')) ) return; // handle a series of updates in order if (!isset($amain['version'])) $amain['version'] = '0'; // really old? if (version_compare($amain['version'],AUSERS_VERSION,'=')) return; // if same version, don't repeat check $prev = $amain['version']; echo PHP_EOL.'

'; // closing div at end printf(__('Previous version was %s. ', 'amr-users'),$prev ); _e('New version activated. ', 'amr-users'); _e('We may need to process some updates.... checking now... ', 'amr-users'); // do old changes first - user may not have updated for a while.... if ((!isset($amain['version'])) or (version_compare($amain['version'],'3.1','<'))) { // convert old options from before 3.1 echo '
'; printf(__('Prev version less than %s', 'amr-users'),'3.1.'); if (!isset($amain['csv_text'])) $amain['csv_text'] = (''.__('Csv','amr-users') .''); if (!isset($amain['refresh_text'])) $amain['refresh_text'] = (''.__('Refresh user list cache', 'amr-users').''); ausers_update_option('amr-users-main',$amain ); echo '
'.__('Image links updated.', 'amr-users'); echo '

'; } // if ((!isset($amain['version'])) or (version_compare($amain['version'],'3.3.1','<'))) { // check for before 3.3.1 echo '
'; printf(__('Prev version less than %s', 'amr-users'),'3.3.1.'); $c = new adb_cache(); $c->deactivate(); if ((!ameta_cache_enable()) or (!ameta_cachelogging_enable())) echo '

'.__('Problem creating amr user DB tables', 'amr-users').'

'; echo '
'; _e('Cacheing tables recreated.', 'amr-users'); } // if ((!isset($amain['version'])) or (version_compare($amain['version'],'3.3.6','<'))) { // check for before 3.3.6, echo '
'; printf(__('Prev version less than %s', 'amr-users'),'3.3.6. '); echo '

'.__('Minor sub option name change for avatar size', 'amr-users').'

'; if (!empty($amain['avatar-size'])) $amain['avatar_size'] = $amain['avatar-size']; //minor name fix for consistency else $amain['avatar_size'] = '16'; unset($amain['avatar-size']); ausers_update_option('amr-users-main',$amain ); } // 3.4.4 July 2012 if ((!isset($amain['version'])) or (version_compare($amain['version'],'3.4.4','<'))) { // check for before 3.3., echo '
'; printf(__('Prev version less than %s', 'amr-users'),'3.4.4 '); echo '

'.__('New Pagination option default to yes for all lists.', 'amr-users').'

'; if (!isset($amain['show_pagination'])) { foreach ($amain['names'] as $i => $n) { $amain['show_pagination'][$i] = true; } } } //user_registration_date // 20170115 if ((!isset($amain['version'])) or (version_compare($amain['version'],'4.0','<'))) { // check for before 4.0, echo '
'; printf(__('Prev version less than %s', 'amr-users'),'4.0 '); echo '

'.__('Change dummy user registration date to real user registered with new format options.', 'amr-users').'

'; // first get the 'ago' format in for the existing 'registered days ago' option $aopt = ausers_get_option('amr-users' ); // then convert any user_registered_date fields across to the user_registered $aopt = str_replace('user_registration_date', 'user_registered', $aopt); ausers_update_option('amr-users',$aopt ); $nice_names = (ausers_get_option ('amr-users-nicenames')); if (!empty ($nice_names['user_registration_date'])) { unset ($nice_names['user_registration_date']); ausers_update_option ('amr-users-nicenames',$nice_names); } } $amain['version'] = AUSERS_VERSION; ausers_update_option('amr-users-main',$amain ); // was 'amr-users-no-lists' echo '

'.__('Finished Update Checks', 'amr-users').' '; echo ' ' .__('Please read the changelog','amr-users' ).''; echo '

'.PHP_EOL; echo '
'.__('As a precaution we will now rebuild the nice names.', 'amr-users'); echo '
'.__('Relax .... you won\'t lose anything.', 'amr-users'); ameta_rebuildnicenames (); echo '
'.PHP_EOL; } add_action('admin_notices', 'amru_please_check_user_reg_settings');