├── assets ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.png ├── screenshot-4.png ├── banner-1544x500.png ├── banner-772x250.png └── icon.svg ├── vendor ├── composer │ ├── autoload_namespaces.php │ ├── autoload_psr4.php │ ├── platform_check.php │ ├── LICENSE │ ├── autoload_real.php │ ├── installed.php │ ├── autoload_classmap.php │ ├── autoload_static.php │ ├── InstalledVersions.php │ ├── installed.json │ └── ClassLoader.php └── autoload.php ├── LICENSE ├── js └── git-remote-updater-switcher.js ├── composer.json ├── git-remote-updater.php ├── src └── Git_Remote_Updater │ ├── Actions.php │ ├── Updater.php │ ├── Settings_Row.php │ ├── Settings.php │ ├── Webhooks.php │ └── Site_List_Table.php ├── README.md ├── CHANGES.md ├── readme.txt ├── phpcs.xml └── languages └── git-remote-updater.pot /assets/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afragen/git-remote-updater/develop/assets/screenshot-1.png -------------------------------------------------------------------------------- /assets/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afragen/git-remote-updater/develop/assets/screenshot-2.png -------------------------------------------------------------------------------- /assets/screenshot-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afragen/git-remote-updater/develop/assets/screenshot-3.png -------------------------------------------------------------------------------- /assets/screenshot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afragen/git-remote-updater/develop/assets/screenshot-4.png -------------------------------------------------------------------------------- /assets/banner-1544x500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afragen/git-remote-updater/develop/assets/banner-1544x500.png -------------------------------------------------------------------------------- /assets/banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afragen/git-remote-updater/develop/assets/banner-772x250.png -------------------------------------------------------------------------------- /vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'), 10 | 'Fragen\\Git_Updater\\' => array($baseDir . '/src/Git_Updater'), 11 | 'Fragen\\Git_Remote_Updater\\' => array($baseDir . '/src/Git_Remote_Updater'), 12 | ); 13 | -------------------------------------------------------------------------------- /vendor/autoload.php: -------------------------------------------------------------------------------- 1 | = 70200)) { 8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.'; 9 | } 10 | 11 | if ($issues) { 12 | if (!headers_sent()) { 13 | header('HTTP/1.1 500 Internal Server Error'); 14 | } 15 | if (!ini_get('display_errors')) { 16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18 | } elseif (!headers_sent()) { 19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; 20 | } 21 | } 22 | trigger_error( 23 | 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 | E_USER_ERROR 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Andy Fragen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/composer/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) Nils Adermann, Jordi Boggiano 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is furnished 9 | to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /vendor/composer/autoload_real.php: -------------------------------------------------------------------------------- 1 | register(true); 35 | 36 | return $loader; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /js/git-remote-updater-switcher.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Vanilla Javascript to show and hide the update choices. 3 | * 4 | * @access public 5 | * @package git-remote-updater 6 | */ 7 | 8 | (function () { 9 | 10 | // Hide non-default settings on page load. 11 | let nonDefault = ['git-remote-updater-site']; 12 | 13 | nonDefault.forEach(function (item) { 14 | displayNone(item); 15 | }); 16 | 17 | // When the selector changes. 18 | let selects = document.querySelector('select[ name="git-remote-updater" ]'); 19 | 20 | // Only run when on proper tab. 21 | selects.addEventListener('change', function () { 22 | let defaults = ['git-remote-updater-site', 'git-remote-updater-repo']; 23 | 24 | // Create difference array. 25 | let hideMe = remove(defaults, this.value); 26 | 27 | // Hide items with unselected classes. 28 | hideMe.forEach(function (item) { 29 | displayNone(item); 30 | }); 31 | 32 | // Show selected setting. 33 | [this.value].forEach(function (item) { 34 | display(item); 35 | }); 36 | }); 37 | 38 | // Remove selected element from array and return array. 39 | function remove(array, element) { 40 | const index = array.indexOf(element); 41 | if (index !== -1) { 42 | array.splice(index, 1); 43 | } 44 | return array; 45 | } 46 | 47 | // Hide element. 48 | function displayNone(item) { 49 | x = document.getElementsByClassName(item)[0]; 50 | x.style.display = 'none'; 51 | } 52 | 53 | // Display element. 54 | function display(item) { 55 | x = document.getElementsByClassName(item)[0]; 56 | x.style.display = ''; 57 | } 58 | 59 | })(); 60 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "afragen/git-remote-updater", 3 | "description": "Allows you to easily update Git Updater repositories in bulk via REST API endpoint updating.", 4 | "type": "wordpress-plugin", 5 | "keywords": [ 6 | "git-updater", 7 | "bulk", 8 | "update", 9 | "webhook" 10 | ], 11 | "license": "MIT", 12 | "authors": [ 13 | { 14 | "name": "Andy Fragen", 15 | "email": "andy@thefragens.com", 16 | "homepage": "https://thefragens.com", 17 | "role": "Developer" 18 | } 19 | ], 20 | "repositories": [ 21 | { 22 | "type": "vcs", 23 | "url": "https://github.com/afragen/git-remote-updater" 24 | } 25 | ], 26 | "support": { 27 | "issues": "https://github.com/afragen/git-remote-updater/issues", 28 | "source": "https://github.com/afragen/git-remote-updater" 29 | }, 30 | "prefer-stable": true, 31 | "require": { 32 | "php": ">=7.2" 33 | }, 34 | "autoload": { 35 | "psr-4": { 36 | "Fragen\\Git_Remote_Updater\\": "src/Git_Remote_Updater/", 37 | "Fragen\\Git_Updater\\": "src/Git_Updater" 38 | } 39 | }, 40 | "config": { 41 | "allow-plugins": { 42 | "dealerdirect/phpcodesniffer-composer-installer": true 43 | } 44 | }, 45 | "require-dev": { 46 | "wp-coding-standards/wpcs": "^3.0.0" 47 | }, 48 | "scripts": { 49 | "wpcs": [ 50 | "vendor/bin/phpcbf .; vendor/bin/phpcs ." 51 | ] 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /git-remote-updater.php: -------------------------------------------------------------------------------- 1 | load_hooks(); 54 | } 55 | ); 56 | -------------------------------------------------------------------------------- /assets/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 44 | -------------------------------------------------------------------------------- /src/Git_Remote_Updater/Actions.php: -------------------------------------------------------------------------------- 1 | '; 35 | $this->show_feedback(); 36 | $this->repo_or_site_selector(); 37 | 38 | echo '
'; 51 | } 52 | 53 | 54 | /** 55 | * Display update feedback. 56 | * 57 | * @return void 58 | */ 59 | private function show_feedback() { 60 | $feedback = get_site_transient( 'git_remote_updater_feedback' ); 61 | if ( $feedback ) { 62 | echo '';
66 | foreach ( $repo_feedback as $message ) {
67 | echo wp_kses_post( $message ) . '
';
68 | }
69 | echo '
' . wp_kses_post( $dashicon . ' ' . $slug ) . '
'; 73 | } 74 | } 75 | 76 | echo '' . wp_kses_post( $site ) . '
'; 113 | } 114 | 115 | echo '';
179 | foreach ( $message as $feedback ) {
180 | echo wp_kses_post( $feedback ) . '
';
181 | }
182 | echo '