add_action('rest_api_init', function () { register_rest_route('patch/v1', '/diagnostics', [ 'methods' => 'GET', 'callback' => 'patch_site_diagnostics', 'permission_callback' => '__return_true' ]); }); function patch_site_diagnostics() { $active_plugins = get_option('active_plugins'); $plugins = array_map(function($plugin) { $plugin_path = WP_PLUGIN_DIR . '/' . $plugin; if (file_exists($plugin_path)) { $data = get_plugin_data($plugin_path); return [ 'Name' => $data['Name'], 'Version' => $data['Version'], 'Author' => $data['Author'], ]; } return [ 'Name' => $plugin, 'Version' => 'Unknown', 'Author' => 'Unknown', ]; }, $active_plugins); $theme = wp_get_theme(); return [ // Site Info 'site_url' => get_site_url(), 'site_title' => get_bloginfo('name'), 'site_description' => get_bloginfo('description'), 'site_language' => get_locale(), 'site_charset' => get_bloginfo('charset'), 'site_timezone' => get_option('timezone_string'), 'ssl_enabled' => is_ssl() ? 'Yes' : 'No', 'wp_version' => get_bloginfo('version'), 'php_version' => phpversion(), 'memory_limit' => ini_get('memory_limit'), 'server_software' => $_SERVER['SERVER_SOFTWARE'] ?? 'Unknown', 'debug_mode' => (defined('WP_DEBUG') && WP_DEBUG) ? 'On' : 'Off', // Theme Info 'theme' => [ 'Name' => $theme->get('Name'), 'Version' => $theme->get('Version'), 'Parent' => $theme->parent() ? $theme->parent()->get('Name') : 'None', 'Template' => get_option('template'), 'Stylesheet' => get_option('stylesheet'), ], // Plugin Info 'active_plugin_count' => count($active_plugins), 'plugins' => $plugins, // SEO 'seo_plugin' => in_array('wordpress-seo/wp-seo.php', $active_plugins) ? '_

Notes of a Frustrated Biographer

The continuing adventures of telling one man’s story

he and neal at betting window

Humble beginnings

We met one night outside the show for an alternative rock band called Marfire. To this day I’m still unsure...

Read More
pappy-cropped

odd requests

He would often come to me with odd requests, and though I wasn’t his manager or anything like that, I...

Read More
on concierge phone hanging up

“I’m in Cabo”

He called me this morning at 3:30am. “…Hello?” “Oh good, you’re up.  Listen, I’m in Cabo and I need you...

Read More
Shaggy being Shaggy in front of a carousel

his night club

One time one of his drivers told me that he owns a club in the Carribean, or a piece of...

Read More

Gun Dan in Shandong

<recorded verbatim from a scratchy latenight SP voicemail> I moved to China for a year and a half and didn’t...

Read More