Looking to create an “update theme” functionality for a custom front-end dashboard
You could add a REST endpoint to check if the current theme has an update. Here’s a quick example to get you started: function wpd_register_themecheck_route(){ register_rest_route( ‘themecheck/v1’, ‘/updates/’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘wpd_check_theme’ ) ); } add_action( ‘rest_api_init’, ‘wpd_register_themecheck_route’ ); function wpd_check_theme(){ $current_theme = get_option( ‘template’ ); $theme_updates = get_option( ‘_site_transient_update_themes’ ); $return … Read more