$_SERVER['HTTP_USER_AGENT']
is something you should not rely on.
This can be anything from:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
to
☆*:。゜゚・*ヽ(^ᴗ^)ノ*・゜゚。:*☆ ¯\_(ツ)_/¯(ಠ益ಠ)(ಥ‿ಥ)(ʘ‿ʘ)ლ(ಠ_ಠლ)( ͡° ͜ʖ ͡°)ヽ(゚Д゚)ノʕ•̫͡•ʔᶘ ᵒᴥᵒᶅ(=^ ^=)oO
So you need to thinker something other to rely upon.
Why don’t you simply use form action do-theme-upgrade
?
File: wp-admin/update-core.php
336: function list_theme_updates() {
337: $themes = get_theme_updates();
338: if ( empty( $themes ) ) {
339: echo '<h2>' . __( 'Themes' ) . '</h2>';
340: echo '<p>' . __( 'Your themes are all up to date.' ) . '</p>';
341: return;
342: }
343:
344: $form_action = 'update-core.php?action=do-theme-upgrade';
Related Posts:
- Admin user can’t update WP
- Why are there updates for obsolete WordPress versions?
- How should I structure a WP website project using git and updating from WP dashboard?
- WP-CLI not recognizing commercial plugin updates
- After updating WP keeps nagging about a newer version. Why?
- How can I manually upgrade translations?
- Automating the Backup Process (30+ websites)
- Update to older wordpress version from admin?
- Prevent/Disable Automatic Update Check
- Git Deploying – Disabling plugin/theme installation/update on remote?
- Update WordPress automatically on its own
- How long does it take for theme / plugin automatic updates to initiate?
- Can’t preview drafts after upgrade to 4.0!
- Find out if there is a available core update?
- Why won’t my site automatically apply updates after upgrade to 3.7?
- “You have the latest version of WordPress. Future security updates will be applied automatically.”
- WordPress with composer, how to handle updates?
- How to automatically update on localhost after editing files
- After updating wordpress 4.5 my homepage and images not displaying
- Show last time WordPress site was updated / modified
- How can I prevent a plugin from searching for updates?
- WordPress load-scripts.php encoding issue
- Plugin for automated upgrade of WordPress core and it’s plugins?
- Why are the automatic updates to WordPress behind the version my site is on?
- update Semiologic?
- Upgrading themes never works
- How can the temporary update directory be changed?
- Still Another update is currently in progress by updating WordPress 5.3
- Is there any workaround to a core update still showing after core update if language set to anything other than US English
- Prevent wordpress from updating language files
- Possible to stay on Version 4?
- wordpress update will overwrite files changes?
- Worpdress update another update is currently in progress
- Updating beyond WordPress 4.2.1 yields “allowed memory size exhausted”
- “The package could not be installed” when updating plugins, themes, and core files on WampServer
- Where can I find the corrent version of my wordpress blog?
- WP 5 upgrade and ALTER TABLE wp_post … post_password
- 4.9.5 broke site behind load balancer, forwards to localhost [closed]
- WP-CLI command to update all plugins and core fails when executed from cron
- Jetpack Upgrade fails with WP CLI [closed]
- WordPress 3.8.1 update error
- What file(s) in core control automatic background updates?
- How can I quickly get a system showing the “Uncaught Error: Class ‘WP_Site_Health’ not found in” up and running again?
- Can’t upgrade WP 5.6 to 5.6.1: version-current.php is missing
- Replace or Alter the wp_version_check() Function
- Cannot update WordPress to 5.2
- WordPress and plugins can’t update (“inconsistent file permissions” error)?
- Update WordPress – Another update is currently in progress
- Errors when updating plugin through the WordPress plugin repository
- WordPress updates being blocked by proxy
- Translation update successful but apparently not
- Which directory should be writable to update wordpress?
- WordPress update messed special characters
- Increased memory usage after updating to wordpress 4.3
- How much maintenance is required to run a WordPress server?
- Is it safe to update from 2.6.2 to the newest version?
- Can anything go wrong if I let users change their usernames?
- Where can I see all changes for a new WordPress version?
- A shorter way to automatically update WordPress?
- Update to WordPress 4.7 – Fatal error: Maximum execution time of 30 seconds exceeded
- check if WordPress website has updates remotely
- Updating WP 3.9.5 without destroying my website
- WordPress updates
- is wpdb->replace() already sanitized?
- Cannot upgrade anything in vps install (migrated wp)
- Where does wordpress gets its core and plugin updates
- I tried updating my Live wordpress site to the latest wordpress version (v4.7) and i encountered some issues
- Site Cookie Error, Redirection and Blank Pages after Upgrade
- Can’t update WordPress 4.0
- Theme my login and update user meta
- why does installer/update screens not progress on some webhosts?
- WordPress managing dates that change in text regularly
- Updating wordpress from my Linux distro’s repository
- Avoid removal of a file on plugin update
- How to modify last posts block without losing modification on next WP update
- Disabling forced FTP credentials for any updates
- Admin keeps showing pending translation update
- mystery checkbox in comments area
- How to get the date of last updated post or page and put it in the footer
- Updates page not showing formating
- After WooCommerce-Update fucntion not working anymore
- Automating svn updates from a server-side cron job
- Issue after WordPress update
- Plugins download & install fine, wordpress update fails
- FS method direct on NGINX
- WordPress Auto Updates
- Core update of 4.2.3 changes all link to https [duplicate]
- Error on update translation
- Not able to Update wordpress to 4.0
- update post meta front end
- Custom message when wordpress updates are available
- WordPress Updates 3.5.2 to 3.8 Any Problem? [duplicate]
- How can I upgrade wordpress with manual?
- disk was full but wordpress still having issues
- Avoid loosing changes to theme
- Manually updating WordPress files
- cURL error 28: SSL connection timeout while can download the plugin file
- Updating WordPress or plugins causes site issues (due to API, I think)
- WordPress recommending to downgrade instead of upgrade?
- Automated WordPress update failed to complete – but all updates fail with code -1