Skip to content

Commit 78cd7a1

Browse files
committed
Remove github update code
1 parent 96963ee commit 78cd7a1

File tree

131 files changed

+31
-11662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+31
-11662
lines changed

.github/workflows/build-zip.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- github
78

89
jobs:
910
build:

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"plugin"
1111
],
1212
"require": {
13-
"wpboilerplate/wpb-updater-checker-github": "dev-main",
1413
"wpboilerplate/wpb-buddyboss-dependency": "dev-main"
1514
},
1615
"support": {

composer.lock

Lines changed: 3 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/class-post-anonymously.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -212,22 +212,6 @@ private function load_composer_dependencies() {
212212
if ( class_exists( 'WPBoilerplate_BuddyBoss_Platform_Dependency' ) ) {
213213
new WPBoilerplate_BuddyBoss_Platform_Dependency( $this->get_plugin_name(), POST_ANONYMOUSLY_PLUGIN_FILES, array( 'activity' ) );
214214
}
215-
216-
/**
217-
* For Plugin Update via Github
218-
*/
219-
if ( class_exists( 'WPBoilerplate_Updater_Checker_Github' ) ) {
220-
221-
$package = array(
222-
'repo' => 'https://github.com/acrosswp/post-anonymously',
223-
'file_path' => POST_ANONYMOUSLY_PLUGIN_FILE,
224-
'name_slug' => POST_ANONYMOUSLY_PLUGIN_NAME_SLUG,
225-
'release_branch' => 'main',
226-
'release-assets' => false
227-
);
228-
229-
new WPBoilerplate_Updater_Checker_Github( $package );
230-
}
231215
}
232216

233217
/**

post-anonymously.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
*
1515
* @wordpress-plugin
1616
* Plugin Name: Post Anonymously for BuddyBoss
17-
* Plugin URI: https://acrosswp.com
17+
* Plugin URI: https://acrosswp.com/downloads/post-anonymously/
1818
* Description: Post Anonymously in Activity Areas of BuddyBoss Platform
1919
* Version: 0.0.14
20-
* Author: AcrossWP
20+
* Author: acrosswp
2121
* Author URI: https://acrosswp.com
2222
* License: GPL-2.0+
2323
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt

vendor/composer/InstalledVersions.php

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class InstalledVersions
3232
*/
3333
private static $installed;
3434

35+
/**
36+
* @var bool
37+
*/
38+
private static $installedIsLocalDir;
39+
3540
/**
3641
* @var bool|null
3742
*/
@@ -309,6 +314,12 @@ public static function reload($data)
309314
{
310315
self::$installed = $data;
311316
self::$installedByVendor = array();
317+
318+
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
319+
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
320+
// so we have to assume it does not, and that may result in duplicate data being returned when listing
321+
// all installed packages for example
322+
self::$installedIsLocalDir = false;
312323
}
313324

314325
/**
@@ -322,19 +333,27 @@ private static function getInstalled()
322333
}
323334

324335
$installed = array();
336+
$copiedLocalDir = false;
325337

326338
if (self::$canGetVendors) {
339+
$selfDir = strtr(__DIR__, '\\', '/');
327340
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
341+
$vendorDir = strtr($vendorDir, '\\', '/');
328342
if (isset(self::$installedByVendor[$vendorDir])) {
329343
$installed[] = self::$installedByVendor[$vendorDir];
330344
} elseif (is_file($vendorDir.'/composer/installed.php')) {
331345
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
332346
$required = require $vendorDir.'/composer/installed.php';
333-
$installed[] = self::$installedByVendor[$vendorDir] = $required;
334-
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
335-
self::$installed = $installed[count($installed) - 1];
347+
self::$installedByVendor[$vendorDir] = $required;
348+
$installed[] = $required;
349+
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
350+
self::$installed = $required;
351+
self::$installedIsLocalDir = true;
336352
}
337353
}
354+
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
355+
$copiedLocalDir = true;
356+
}
338357
}
339358
}
340359

@@ -350,7 +369,7 @@ private static function getInstalled()
350369
}
351370
}
352371

353-
if (self::$installed !== array()) {
372+
if (self::$installed !== array() && !$copiedLocalDir) {
354373
$installed[] = self::$installed;
355374
}
356375

vendor/composer/autoload_files.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77

88
return array(
99
'be1174c0e92ca9c51be576fa4116555e' => $vendorDir . '/wpboilerplate/wpb-dependency/index.php',
10-
'256558b1ddf2fa4366ea7d7602798dd1' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p5.php',
1110
'3d5bdb9874404392d175bd917027453e' => $vendorDir . '/wpboilerplate/wpb-buddyboss-dependency/index.php',
12-
'7c995e13e9d12cc31ce686afebdfe9c4' => $vendorDir . '/wpboilerplate/wpb-updater-checker-github/index.php',
1311
);

vendor/composer/autoload_real.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ public static function getLoader()
2222
return self::$loader;
2323
}
2424

25-
require __DIR__ . '/platform_check.php';
26-
2725
spl_autoload_register(array('ComposerAutoloaderInit03dc15a346eddd60e40c074ce58a682f', 'loadClassLoader'), true, true);
2826
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
2927
spl_autoload_unregister(array('ComposerAutoloaderInit03dc15a346eddd60e40c074ce58a682f', 'loadClassLoader'));

vendor/composer/autoload_static.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ class ComposerStaticInit03dc15a346eddd60e40c074ce58a682f
88
{
99
public static $files = array (
1010
'be1174c0e92ca9c51be576fa4116555e' => __DIR__ . '/..' . '/wpboilerplate/wpb-dependency/index.php',
11-
'256558b1ddf2fa4366ea7d7602798dd1' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p5.php',
1211
'3d5bdb9874404392d175bd917027453e' => __DIR__ . '/..' . '/wpboilerplate/wpb-buddyboss-dependency/index.php',
13-
'7c995e13e9d12cc31ce686afebdfe9c4' => __DIR__ . '/..' . '/wpboilerplate/wpb-updater-checker-github/index.php',
1412
);
1513

1614
public static $classMap = array (

vendor/composer/installed.json

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -92,108 +92,6 @@
9292
"source": "https://github.com/WPBoilerplate/wpb-dependency/tree/main"
9393
},
9494
"install-path": "../wpboilerplate/wpb-dependency"
95-
},
96-
{
97-
"name": "wpboilerplate/wpb-updater-checker-github",
98-
"version": "dev-main",
99-
"version_normalized": "dev-main",
100-
"source": {
101-
"type": "git",
102-
"url": "https://github.com/WPBoilerplate/wpb-updater-checker-github.git",
103-
"reference": "0bbdbd161e43352d01e1dd13db308a05ebaf5afa"
104-
},
105-
"dist": {
106-
"type": "zip",
107-
"url": "https://api.github.com/repos/WPBoilerplate/wpb-updater-checker-github/zipball/0bbdbd161e43352d01e1dd13db308a05ebaf5afa",
108-
"reference": "0bbdbd161e43352d01e1dd13db308a05ebaf5afa",
109-
"shasum": ""
110-
},
111-
"require": {
112-
"yahnis-elsts/plugin-update-checker": "dev-master"
113-
},
114-
"time": "2024-08-08T20:33:22+00:00",
115-
"default-branch": true,
116-
"type": "library",
117-
"installation-source": "dist",
118-
"autoload": {
119-
"files": [
120-
"index.php"
121-
]
122-
},
123-
"notification-url": "https://packagist.org/downloads/",
124-
"license": [
125-
"GPL-2.0-or-later"
126-
],
127-
"authors": [
128-
{
129-
"name": "WPBoilerplate"
130-
}
131-
],
132-
"description": "Composer to autoload the Updater via Github",
133-
"homepage": "https://github.com/WPBoilerplate/wpb-updater-checker-github",
134-
"keywords": [
135-
"plugin",
136-
"wordpress"
137-
],
138-
"support": {
139-
"issues": "https://github.com/WPBoilerplate/wpb-updater-checker-github/issues",
140-
"source": "https://github.com/WPBoilerplate/wpb-updater-checker-github/tree/main"
141-
},
142-
"install-path": "../wpboilerplate/wpb-updater-checker-github"
143-
},
144-
{
145-
"name": "yahnis-elsts/plugin-update-checker",
146-
"version": "dev-master",
147-
"version_normalized": "dev-master",
148-
"source": {
149-
"type": "git",
150-
"url": "https://github.com/YahnisElsts/plugin-update-checker.git",
151-
"reference": "73e6281e434bceffa7884568611804f8c38e27b5"
152-
},
153-
"dist": {
154-
"type": "zip",
155-
"url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/73e6281e434bceffa7884568611804f8c38e27b5",
156-
"reference": "73e6281e434bceffa7884568611804f8c38e27b5",
157-
"shasum": ""
158-
},
159-
"require": {
160-
"ext-json": "*",
161-
"php": ">=5.6.20"
162-
},
163-
"time": "2024-12-09T15:47:56+00:00",
164-
"default-branch": true,
165-
"type": "library",
166-
"installation-source": "dist",
167-
"autoload": {
168-
"files": [
169-
"load-v5p5.php"
170-
]
171-
},
172-
"notification-url": "https://packagist.org/downloads/",
173-
"license": [
174-
"MIT"
175-
],
176-
"authors": [
177-
{
178-
"name": "Yahnis Elsts",
179-
"email": "[email protected]",
180-
"homepage": "https://w-shadow.com/",
181-
"role": "Developer"
182-
}
183-
],
184-
"description": "A custom update checker for WordPress plugins and themes. Useful if you can't host your plugin in the official WP repository but still want it to support automatic updates.",
185-
"homepage": "https://github.com/YahnisElsts/plugin-update-checker/",
186-
"keywords": [
187-
"automatic updates",
188-
"plugin updates",
189-
"theme updates",
190-
"wordpress"
191-
],
192-
"support": {
193-
"issues": "https://github.com/YahnisElsts/plugin-update-checker/issues",
194-
"source": "https://github.com/YahnisElsts/plugin-update-checker/tree/master"
195-
},
196-
"install-path": "../yahnis-elsts/plugin-update-checker"
19795
}
19896
],
19997
"dev": true,

0 commit comments

Comments
 (0)