function amr_request_cache_with_feedback($list = null) { global $ausersadminurl; $result = amr_request_cache($list); if (!empty($result)) { amr_users_message($result); ?> <ul><li><?php _e('Report Cache has been scheduled.', 'amr-users'); ?> </li><li><?php _e('If you have a lot of records, it may take a while.', 'amr-users'); ?> </li><li><?php _e('Please check the cache log - refresh for updates and do not reschedule until all the reports have completed. ', 'amr-users'); ?> </li><li><?php _e('If you think it is taking too long, problems may be occuring in the background job, such as running out of memory. Check server logs and/or Increase wordpress\\s php memory limit', 'amr-users'); ?> </li><li><?php _e('The cache status or the TPC Memory Usage plugin may be useful to assess this.', 'amr-users'); ?> </li><li><?php echo au_cachelog_link(); ?> </li><li><?php echo au_cachestatus_link(); ?> </a></li> </ul> <?php } else { echo '<h2>Error requesting cache:' . $result . '</h2>'; /**** */ } return $result; // time()+3600 = one hour from now. }
function amrmeta_admin_header() { global $ausersadminurl; amr_meta_main_admin_header('User Lists'); echo '<ul class="subsubsub">'; $t = __('General', 'amr-users'); echo PHP_EOL . '<li><a href="' . $ausersadminurl . '" title="' . $t . '" >' . $t . '</a>|</li>'; $t = __('Test your db', 'amr-users'); echo PHP_EOL . '<li><a href="' . wp_nonce_url(add_query_arg('am_page', 'testyourdb', $ausersadminurl), 'amr-meta') . '" title="' . $t . '" >' . $t . '</a>|</li>'; $t = __('Overview', 'amr-users'); echo PHP_EOL . '<li> <span class="step">1.</span><a href="' . wp_nonce_url(add_query_arg('am_page', 'overview', $ausersadminurl), 'amr-meta') . '" title="' . $t . '" >' . $t . '</a>|</li>'; $t = __('Nice Names', 'amr-users'); echo '<li> <span class="step">' . '2.</span><a ' . a_currentclass('nicenames') . ' href="' . wp_nonce_url(add_query_arg('am_page', 'nicenames', $ausersadminurl), 'amr-meta') . '" title="' . $t . '" >' . $t . '</a>| <span class="step">' . '3.</span></li></ul>'; $t = __('Rebuild Cache in Background', 'amr-users'); list_configurable_lists(); echo '<ul class="subsubsub"><li> <span class="step">4.</span>' . au_buildcachebackground_link() . '|</li>'; echo '<li> <span class="step">5.</span>' . au_cachelog_link() . '|</li>'; echo '<li> <span class="step">6.</span>' . au_cachestatus_link() . '</li>'; echo '</ul>'; return; }