How to use nonce

most likely you should not. (ok, “don’t have to” is a better phrasing) nonce in meta box do not add any security as the whole submittion of the form happens only after the form’s nonce is verified. You might need some hidden input to be able to detect when the save filter is called from … Read more

Full documentation about $args for register_rest_route?

full documentation listing all of the possible keys you can provide for $args when calling register_rest_route, just as you have it with register_post_type register_rest_route(), as of writing, doesn’t have such a documentation; however, you can call $request->get_attributes() inside of your endpoint callback to get the full (registration) options (including those not explicitly specified) for that … Read more

Plugin custom post template; without overriding all posts

Not sure if there’s a better way to do it, but you can use the theme_<post type>_templates filter to add your custom template to the “Template” dropdown, and then use the template_include filter to ensure the correct file is loaded. So something like this should work: add_filter( ‘template_include’, ‘my_events_template_include’ ); function my_events_template_include( $template ) { … Read more