How can precision be improved for the debug log timestamp?

WordPress does not manage the format of the timestamp. Instead, WordPress hands off error message contents to the PHP function error_log(), which creates the timestamp. Finding no easy way to ask error_log() for higher resolution timestamp, combined with the fact that I’m creating the message content myself, I’ve added a microsecond string ahead of my … Read more

Create custom API endpoint to change custom header image

The header image falls under what WordPress calls theme modification values. To update that type of value, use the function set_theme_mod() function cs_set_logo($request) { set_theme_mod(‘header_image’, $request->get_param(‘new_header_image’)); return new WP_REST_Response(null, 200); } add_action(‘rest_api_init’, function() { register_rest_route(‘cs/v1’, ‘changelogo’, [ ‘methods’ => ‘POST’, ‘callback’ => ‘cs_set_logo’ ]) });