Created
December 2, 2025 23:08
-
-
Save stingray82/5384d8851e7ee4b5cc875338476657f3 to your computer and use it in GitHub Desktop.
Hoster Filter Suggestion
This file contains hidden or 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
| Add Filter to Requests simlar to: | |
| public function request() { | |
| // 1) Global toggle for all plugins using hoster updater | |
| $enabled = apply_filters( | |
| 'devkit_dpupdatechecker_enable_request', | |
| true, | |
| $this->slug, | |
| $this | |
| ); | |
| // 2) Scoped toggle per plugin slug | |
| // e.g. devkit/devkit.php -> devkit_devkit_php | |
| $filter_slug = str_replace( array( '/', '.', '\\' ), '_', $this->slug ); | |
| $enabled = apply_filters( | |
| "devkit_dpupdatechecker_enable_request_{$filter_slug}", | |
| $enabled, | |
| $this->slug, | |
| $this | |
| ); | |
| if ( ! $enabled ) { | |
| return false; | |
| } | |
| // existing code... | |
| } | |
| Then I can just add the below or simlar to my utility plugin to stop this and serve the update myself | |
| add_filter( 'devkit_dpupdatechecker_enable_request', function ( $enabled, $slug, $checker ) { | |
| if ( $slug === 'devkit/devkit.php' ) { | |
| return false; // disable updater just for this plugin | |
| } | |
| return $enabled; | |
| }, 10, 3 ); | |
| an additional extra bonus a remote_url filter not for me for others in the same boat. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment