dispatch = 'feedwordpress_diagnostics'; $this->filename = __FILE__; $this->test_html = array(); add_action('feedwordpress_diagnostics_do_http_test', array($this, 'do_http_test'), 10, 1); } function has_link () { return false; } function display () { 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(); do_action('feedwordpress_admin_page_diagnostics_save', null, $this); endif; //////////////////////////////////////////////// // Prepare settings page /////////////////////// //////////////////////////////////////////////// $this->display_update_notice_if_updated('Diagnostics'); $this->open_sheet('FeedWordPress Diagnostics'); ?>
__('Diagnostic Information'), 'diagnostics_box' => __('Display Diagnostics'), 'updates_box' => __('Diagnostic Messages'), 'tests_box' => __('Diagnostic Tests'), ); 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 () */ public function do_requested () { return ( ! is_null( self::what_requested() ) ); } public function what_requested () { return FeedWordPress::post( 'feedwordpress_diagnostics_do' ); } function accept_POST () { if ( self::save_requested() || self::do_requested() ) : update_option( 'feedwordpress_debug', FeedWordPress::post( 'feedwordpress_debug' ) ); update_option( 'feedwordpress_secret_key', FeedWordPress::post( 'feedwordpress_secret_key' ) ); update_option( 'feedwordpress_diagnostics_output', FeedWordPress::post( 'diagnostics_output' ) ); update_option( 'feedwordpress_diagnostics_show', FeedWordPress::post( 'diagnostics_show' ) ); if ( FeedWordPress::post( 'diagnostics_show' ) and in_array( 'updated_feeds:errors:persistent', FeedWordPress::post( 'diagnostics_show' ) ) ) : update_option('feedwordpress_diagnostics_persistent_errors_hours', (int) FeedWordPress::post( 'diagnostics_persistent_error_hours' ) ); else : delete_option( 'feedwordpress_diagnostics_persistent_errors_hours' ); endif; if ( in_array( 'email', FeedWordPress::post( 'diagnostics_output' ) ) ) : $ded = FeedWordPress::post('diagnostics_email_destination' ); if ( 'mailto' == $ded ) : $ded .= ':' . FeedWordPress::post('diagnostics_email_destination_address' ); endif; update_option( 'feedwordpress_diagnostics_email_destination', $ded ); else : delete_option( 'feedwordpress_diagnostics_email_destination' ); endif; if ( self::do_requested() ) : foreach ( self::what_requested() as $do => $value) : do_action( 'feedwordpress_diagnostics_do_'.$do ); endforeach; endif; $this->updated = true; // Default update message endif; } /* FeedWordPressDiagnosticsPage::accept_POST () */ static function info_box ($page, $box = NULL) { global $feedwordpress; global $wp_version; $link_category_id = FeedWordPress::link_category_id(); ?>
Topic Information
.
  • WordPress:
  • SimplePie:

#term_id ); ?>, name ); ?>.

get_error_code(); ?>

get_error_data(); if ( ! empty( $data ) ) : ?>
get_error_message() ); ?>
get_error_data() ) ); ?>

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:
array( 'update_schedule:check' => 'whenever a FeedWordPress checks in on the update schedule', 'updated_feeds' => 'as each feed is checked for updates', 'syndicated_posts' => 'as each syndicated post is added to the database', 'feed_items' => 'as each syndicated item is considered on the feed', 'memory_usage' => 'indicating how much memory was used', ), // Note: the embedded HTML gets filtered out, so this might require some refactoring. (gwyneth 20230917) 'Feed Retrieval' => array( 'updated_feeds:errors:persistent' => 'when attempts to update a feed have resulted in errors