Skip to content

Instantly share code, notes, and snippets.

View anphira's full-sized avatar
💭
Busy working on projects

Gen Herres anphira

💭
Busy working on projects
View GitHub Profile
@slfrsn
slfrsn / WordPressUpdatesfromGitHub.md
Last active August 24, 2025 16:00
Automatic WordPress theme updates from a GitHub repository using the native WordPress update system.

WordPress Theme Updates from GitHub

Adding automatic theme updates from a GitHub repository is actually pretty simple. The following function will hook into WordPress's native update system and grab the latest release from the repo of your choosing (if the version number has increased).

Place the following in your functions.php

// Automatic theme updates from the GitHub repository
add_filter('pre_set_site_transient_update_themes', 'automatic_GitHub_updates', 100, 1);
function automatic_GitHub_updates($data) {