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 = false;
if( array_key_exists( $current_theme, $theme_updates->response ) ){
$return = $theme_updates->response[$current_theme];
}
$response = new WP_REST_Response( $return );
return $response;
}
Related Posts:
- Making update notification functionality for my themes
- Best practices for monitoring the need for future updates on a theme that I developed?
- Custom theme/plugin update checks
- Automatic Updates For Private And Commercial Themes?
- Excess White Space Above Admin Bar on Frontend Using Twitter Bootstrap
- Pushing updates to your premium theme
- Theme showing incorrect update
- There’s an image named g.gif somewhere in my WordPress site
- Prevent update check for specific theme
- Prevent WordPress updates from overriding custom language translations?
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- How can one update a theme on a live site without interruption?
- WordPress 5.8 update problem custom theme styles are overridden by core styles common.min.css
- If I build a custom theme, will it update?
- Show warning if plugin is missing
- Is it a bad practice to use switch_to_blog in the frontend?
- Execute upgrade-theme with coding
- How to change database values on theme update
- How can I ping update-core.php with a script?
- WordPress Media Uploader in page template (On Front-end)
- Custom theme updater – random string in new theme name
- AJAXIFY WordPress Theme Frontend menu
- How to Find the Page the Front Page is Using?
- Updating a live theme safely?
- How to have content scroll over background
- is_home and is_frontpage always true
- Wordpres core-update theme renames theme folder name
- How to allow users to create their own website within my domain? [closed]
- How to make updatable custom WordPress theme?
- Updatable theme developing
- Update modified Shopify third-party theme [closed]
- Any way to permanently translate themes?
- How to throw the “We need ftp info” at a user
- Remove nonindex meta tag
- How do I send out an update for my custom wordpress theme?
- Hide a div that is part of all pages on one specific page
- Editing the custom background CSS
- What is a good way to pass a variable from add_action to a Theme?
- Why does my short code get executed before other content?
- Featured Image in 4.4 should be larger on mobile device
- How to disable the gradient and font size internal CSS added by WordPress when using theme.json
- Modifying JS files in Child-theme
- How can you determine whether an image is merely attached or has actually been inserted into a post?
- How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?
- Where is the correct place(s) in twentysixteen’s header.php to add a Google webfont?
- Flexible WordPress theme creation using themes
- How to support Lazy Loading Assets in a WordPress Theme?
- Toggle Sidebar Display
- How to move the the_excerpt’s read more link to another div
- How to create a custom template to admin dashboard
- Change The Meta-Description Of Home-Page?
- Add, edit specific CPT with custom role
- how to display search term in the template full site editor
- Table of Contents Before first heading
- How to add new page to wordpress theme through coding?
- comment form args are not translatable (customized comment form)
- Zoom on custom theme without child
- Dynamically generated wordpress customizer options?
- Changing a slider to a grid [closed]
- What do with the index.php … [duplicate]
- Code to determine WP version check
- “Theme without sidebar.php is deprecated”
- Is it acceptable for a WordPress theme to not accept widgets?
- get_term_link is Ending to single.php
- wp e-commerce – theme problem – why won’t it load wpsc-single_product.php? [closed]
- Extending Twenty Eleven Theme
- my excerpts lack the ‘more’ link
- how to retrieve the image title for image Post Format
- Iris color picker in custom theme option page not saving value
- Is functions.php in themes applied to all templates?
- Want to add cart and a search bar in the right of logo line
- how do i develop a global nav and local nav to be wordpress dynamic?
- Why Tags don’t appear in my page?
- How to make a theme unable to be used on a multisite network?
- Default PHP document / names needed for a WordPress theme?
- How to determine when my theme is deactivated?
- 1 post per category on homepage and counting those posts
- if (has_custom_menu())?
- Ensure SQL changes carry over
- only the first post is shown
- wordpress can’t find single-project page
- Show Yoast SEO meta tags in Custom WordPress Templates (Theme)
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- Exporting wp site as a theme
- What is the general function to add a Widget area (not of a particular type)?
- WordPress Post Order
- how can I re-utilize and class on a child theme
- How to manipulate wordpress template tags’ output
- Automatically Add Caption Shortcode to Image with Caption Field Filled In
- Incorrect search results in search.php – issue triggered by using `define(‘BodyID’, ‘search’); the_post();` in search.php
- WordPress Footer Widget Processing
- Flexslider not working for my custom theme WordPress
- Mamp pro permalink issues. Pages keep reverting to index.php
- wp_enqueue_script causes page to vanish
- Turning WordPress Into full-featured website?
- How To add li class and a class wp_nav_menu() with bootstrap 5 navbar?
- Permalink Setting Changes From Post Name to Default After Changing The Page Name
- Not Able to Access Terms Under Custom Taxonomy Archive
- Full site editing templates folder vs block-templates
- Why is my Toggle field not showing in Gutenberg?