-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Replacing Plugin Updater Service (#341)
* Replaced old updater service with the new WPE Updater service. fixes #337 * Fixed PHPStan issues * PHPCS fixes
- Loading branch information
1 parent
fcca872
commit 7838c93
Showing
9 changed files
with
305 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@wpengine/wp-graphql-content-blocks": minor | ||
--- | ||
|
||
Replaced old plugin service to use the WPE updater service for checking for updates. The new API endpoint will be https://wpe-plugin-updates.wpengine.com/wp-graphql-content-blocks/info.json | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Plugin upgrade checker | ||
* | ||
* @package WPGraphQL\ContentBlocks\Updates | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace WPGraphQL\ContentBlocks\Updates; | ||
|
||
if ( ! function_exists( 'wp_graphql_content_blocks_check_for_upgrades' ) ) { | ||
/** | ||
* Checks for plugin upgrades | ||
*/ | ||
function wp_graphql_content_blocks_check_for_upgrades(): void { | ||
$properties = [ | ||
'plugin_slug' => 'wp-graphql-content-blocks', | ||
'plugin_basename' => WPGRAPHQL_CONTENT_BLOCKS_PLUGIN_PATH, | ||
]; | ||
|
||
require_once __DIR__ . '/PluginUpdater.php'; | ||
new PluginUpdater( $properties ); | ||
} | ||
|
||
add_action( 'admin_init', __NAMESPACE__ . '\wp_graphql_content_blocks_check_for_upgrades' ); | ||
} |
Oops, something went wrong.