inc2734 / wp-github-theme-updater
A library for WordPress that automatic theme updater with GitHub API.
Installs: 9 212
Dependents: 1
Suggesters: 0
Security: 0
Stars: 11
Watchers: 1
Forks: 3
Open Issues: 4
pkg:composer/inc2734/wp-github-theme-updater
Requires
- php: >=7.4
Requires (Dev)
- dev-master
- 3.1.17
- 3.1.16
- 3.1.15
- 3.1.14
- 3.1.13
- 3.1.12
- 3.1.11
- 3.1.10
- 3.1.9
- 3.1.8
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.2.0
- 2.1.0
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.2
- 0.1.1
- 0.1.0
- dev-dependabot/npm_and_yarn/glob-10.5.0
This package is auto-updated.
Last update: 2025-11-19 01:36:50 UTC
README
Install
$ composer require inc2734/wp-github-theme-updater
How to use
<?php
$updater = new Inc2734\WP_GitHub_Theme_Updater\Bootstrap(
get_template(),
'user-name',
'repository'
);
Filter hooks
inc2734_github_theme_updater_zip_url_<$user_name>/<$repository>
Customize downloaded package url.
add_filter(
'inc2734_github_theme_updater_zip_url_inc2734/snow-monkey',
function( $url, $user_name, $repository, $tag_name ) {
return $url;
},
10,
4
);
inc2734_github_theme_updater_request_url_<$user_name>/<$repository>
Customize requested api url.
add_filter(
'inc2734_github_theme_updater_request_url_inc2734/snow-monkey',
function( $url, $user_name, $repository ) {
return $url;
},
10,
3
);
inc2734_github_theme_updater_transient_response_<$user_name>/<$repository>
Customize transient response
add_filter(
'inc2734_github_theme_updater_transient_response_inc2734/snow-monkey',
function( $transient_response ) {
return $transient_response;
}
);
inc2734_github_theme_updater_repository_content_url_<$user_name>/<$repository>
Customize contents api url.
add_filter(
'inc2734_github_theme_updater_repository_content_url_inc2734/snow-monkey',
function( $url, $user_name, $repository, $theme_name ) {
return $url;
},
10,
4
);
inc2734_github_theme_updater_repository_content_headers_<$user_name>/<$repository>
Customize fields contents_api.
add_filter(
'inc2734_github_theme_updater_repository_content_headers_inc2734/snow-monkey',
function( $headers ) {
return $headers;
}
);
inc2734_github_theme_updater_zip_url
Obsolete from v2.0.0
Customize downloaded api url.
add_filter(
'inc2734_github_theme_updater_zip_url',
function( $url, $user_name, $repository, $tag_name ) {
if ( 'inc2734' === $user_name && 'snow-monkey-blocks' === $repository ) {
return 'https://example.com/my-custom-updater-zip-url';
}
return $url;
},
10,
4
);
inc2734_github_theme_updater_request_url
Obsolete from v2.0.0
Customize requested api url.
add_filter(
'inc2734_github_theme_updater_request_url',
function( $url, $user_name, $repository ) {
if ( 'inc2734' === $user_name && 'snow-monkey' === $repository ) {
return 'https://example.com/my-custom-updater-request-url';
}
return $url;
},
10,
3
);