diff --git a/composer.json b/composer.json index 63a12f55c80e8e..8574d27cae8baa 100644 --- a/composer.json +++ b/composer.json @@ -41,8 +41,8 @@ } ], "require": { - "php": ">=7.4", - "composer/installers": "^1.0 || ^2.0" + "composer/installers": "^1.0 || ^2.0", + "afragen/git-updater-lite": "^3" }, "scripts": { "format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source", diff --git a/gutenberg.php b/gutenberg.php index 9236537dc8bbd1..1c0f7e51a0a283 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -9,6 +9,7 @@ * Version: 23.7.20260716 * Author: Gutenberg Team and Birgit Pauli-Haack (Gutenberg Times) * Text Domain: gutenberg + * Update URI: https://gutenbergtimes.com * GitHub Plugin URI: bph/gutenberg * Primary Branch: trunk * Release Asset: true @@ -16,6 +17,16 @@ * @package gutenberg */ +// Add the development channel to the Git Updater Lite API URL for the Gutenberg plugin. +add_filter( 'git_updater_lite_api_url', fn( $url, $slug ) => ( 'gutenberg' === $slug ) ? add_query_arg( [ 'channel' => 'development' ], $url ) : $url, 10, 2 ); + + // Initialize Git Updater Lite. + if ( file_exists( __DIR__ . '/vendor/afragen/git-updater-lite/Lite.php' ) ) { + require_once __DIR__ . '/vendor/afragen/git-updater-lite/Lite.php'; + ( new \Fragen\Git_Updater\Lite( __FILE__ ) )->run(); +} + + // GitHub Updater filters. add_filter( 'gu_override_dot_org',