dispatch = 'feedwordpress_diagnostics'; $this->filename = __FILE__; } function has_link () { return false; } function display () { global $wpdb, $wp_db_version, $fwp_path; global $fwp_post; if (FeedWordPress::needs_upgrade()) : fwp_upgrade_page(); return; endif; // If this is a POST, validate source and user credentials FeedWordPressCompatibility::validate_http_request(/*action=*/ 'feedwordpress_diagnostics', /*capability=*/ 'manage_options'); if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') : $this->accept_POST($fwp_post); do_action('feedwordpress_admin_page_diagnostics_save', $GLOBALS['fwp_post'], $this); endif; //////////////////////////////////////////////// // Prepare settings page /////////////////////// //////////////////////////////////////////////// $this->display_update_notice_if_updated('Diagnostics'); $this->open_sheet('FeedWordPress Diagnostics'); ?>
__('Diagnostics'), 'updates_box' => __('Updates'), ); foreach ($boxes_by_methods as $method => $title) : add_meta_box( /*id=*/ 'feedwordpress_'.$method, /*title=*/ $title, /*callback=*/ array('FeedWordPressDiagnosticsPage', $method), /*page=*/ $this->meta_box_context(), /*context=*/ $this->meta_box_context() ); endforeach; do_action('feedwordpress_admin_page_diagnostics_meta_boxes', $this); ?>
meta_box_context(), $this->meta_box_context(), $this); ?>
close_sheet(); } /* FeedWordPressDiagnosticsPage::display () */ function accept_POST ($post) { if (isset($post['submit']) or isset($post['save'])) : update_option('feedwordpress_debug', $post['feedwordpress_debug']); if (!isset($post['diagnostics_output']) or !is_array($post['diagnostics_output'])) : $post['diagnostics_output'] = array(); endif; update_option('feedwordpress_diagnostics_output', $post['diagnostics_output']); if (!isset($post['diagnostics_show']) or !is_array($post['diagnostics_show'])) : $post['diagnostics_show'] = array(); endif; update_option('feedwordpress_diagnostics_show', $post['diagnostics_show']); $this->updated = true; // Default update message endif; } /* FeedWordPressDiagnosticsPage::accept_POST () */ /*static*/ function diagnostics_box ($page, $box = NULL) { $settings = array(); $settings['debug'] = (get_option('feedwordpress_debug')=='yes'); $diagnostics_output = get_option('feedwordpress_diagnostics_output', array()); // Hey ho, let's go... ?>
Debugging mode:

When debugging mode is ON, FeedWordPress displays many diagnostic error messages, warnings, and notices that are ordinarily suppressed, and turns off all caching of feeds. Use with caution: this setting is useful for testing but absolutely inappropriate for a production server.

Diagnostics output:
  • /> Log in PHP error logs
  • /> Display in WordPress admin footer
  • /> Echo in web browser as they are issued
  • /> Echo to output when they are issued during an update cron job
  • /> Send a daily email digest to the site administrator
'', 'updated_feeds:errors' => '', 'updated_feeds:errors:persistent' => '', "syndicated_posts" => '', 'syndicated_posts:meta_data' => '', 'feed_items' => '', 'memory_usage' => '', ); $diagnostics_show = get_option('feedwordpress_diagnostics_show', array()); if (is_array($diagnostics_show)) : foreach ($diagnostics_show as $thingy) : $checked[$thingy] = ' checked="checked"'; endforeach; endif; // Hey ho, let's go... ?>
Update diagnostics:

Show a diagnostic message...

Syndicated post details:

Show a diagnostic message...

display();