Skip to content

Commit 69b9491

Browse files
committed
Merge branch 'develop'
2 parents 9d229b0 + 4ed61b4 commit 69b9491

31 files changed

+91
-98
lines changed

CHANGES.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#### [unreleased]
22

3+
#### 12.2.2 /2023-05-22
4+
* add back Network only activate for multisite, may cause issue where post-license activation Freemius doesn't re-direct to network admin
5+
* update anonymous functions as static functions for better performance
6+
* composer update
7+
38
#### 12.2.1 / 2023-04-21
49
* ensure `$wp_filesystem` set for `Bootstrap::rename_on_activation()`
510
* uninstall tested to function correctly

composer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@
5252
}
5353
},
5454
"scripts": {
55-
"post-update-cmd": [
55+
"make-pot": [
5656
"wp i18n make-pot . languages/git-updater.pot"
57+
],
58+
"wpcs": [
59+
"vendor/bin/phpcbf .; vendor/bin/phpcs ."
5760
]
5861
}
5962
}

composer.lock

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

git-updater.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
* Plugin Name: Git Updater
1313
* Plugin URI: https://git-updater.com
1414
* Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist.
15-
* Version: 12.2.1
15+
* Version: 12.2.2
1616
* Author: Andy Fragen
1717
* License: MIT
1818
* Domain Path: /languages
1919
* Text Domain: git-updater
20+
* Network: true
2021
* GitHub Plugin URI: https://github.com/afragen/git-updater
2122
* GitHub Languages: https://github.com/afragen/git-updater-translations
2223
* Requires at least: 5.2
@@ -63,7 +64,7 @@ function () {
6364
// Initiate Additions.
6465
add_filter(
6566
'gu_additions',
66-
function( $false, $repos, $type ) {
67+
static function( $false, $repos, $type ) {
6768
$config = get_site_option( 'git_updater_additions', [] );
6869
$additions = new Additions();
6970
$additions->register( $config, $repos, $type );

src/Git_Updater/GU_Upgrade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ public function flush_tokens() {
132132
'deprecated_error_logging',
133133
];
134134
$options = $this->get_class_vars( 'Base', 'options' );
135-
$new_options = \array_filter(
135+
$new_options = array_filter(
136136
$options,
137-
function( $value, $key ) use ( &$options, $base_options ) {
137+
static function( $value, $key ) use ( &$options, $base_options ) {
138138
if ( in_array( $key, $base_options, true ) || str_contains( $key, 'current_branch' ) ) {
139139
return $options[ $key ];
140140
}

src/Git_Updater/Ignore.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function load_hooks() {
4545
// Remove repository from array of repositories.
4646
add_filter(
4747
'gu_config_pre_process',
48-
function( $config ) {
48+
static function( $config ) {
4949
foreach ( self::$repos as $slug => $file ) {
5050
unset( $config[ $slug ] );
5151
}
@@ -59,7 +59,7 @@ function( $config ) {
5959
// Fix to display properly in Settings git subtab.
6060
add_filter(
6161
'gu_display_repos',
62-
function( $type_repos ) {
62+
static function( $type_repos ) {
6363
foreach ( self::$repos as $slug => $file ) {
6464
if ( isset( $type_repos[ $slug ] ) ) {
6565
$type_repos[ $slug ]->remote_version = false;
@@ -76,7 +76,7 @@ function( $type_repos ) {
7676
// Don't display Settings token field.
7777
add_filter(
7878
'gu_add_repo_setting_field',
79-
function( $arr, $token ) {
79+
static function( $arr, $token ) {
8080
foreach ( self::$repos as $file ) {
8181
if ( $file === $token->file ) {
8282
$arr = [];

src/Git_Updater/Settings.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ private function load_api_subtabs() {
226226
}
227227
add_filter(
228228
'gu_running_git_servers',
229-
function( $gits ) use ( &$show_tabs ) {
229+
static function( $gits ) use ( &$show_tabs ) {
230230
return array_merge( $gits, array_flip( $show_tabs ) );
231231
}
232232
);
233233
add_filter(
234234
'gu_add_settings_subtabs',
235-
function( $subtabs ) use ( &$show_tabs ) {
235+
static function( $subtabs ) use ( &$show_tabs ) {
236236

237237
return array_merge( $subtabs, $show_tabs );
238238
}

src/Git_Updater/Shim.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function wp_opcache_invalidate_directory( $dir ) {
149149
* with sub-directories represented as nested arrays.
150150
* @param string $path Absolute path to the directory.
151151
*/
152-
$invalidate_directory = function( $dirlist, $path ) use ( &$invalidate_directory ) {
152+
$invalidate_directory = static function( $dirlist, $path ) use ( &$invalidate_directory ) {
153153
$path = trailingslashit( $path );
154154

155155
foreach ( $dirlist as $name => $details ) {

vendor/afragen/wordpress-plugin-readme-parser/class-parser.php

-24
Original file line numberDiff line numberDiff line change
@@ -802,28 +802,4 @@ protected function parse_markdown( $text ) {
802802
return $markdown->transform( $text );
803803
}
804804

805-
/**
806-
* Determine if the readme contains unique installation instructions.
807-
*
808-
* When phrases are added here, the affected plugins will need to be reparsed to pick it up.
809-
*
810-
* @return bool Whether the instructions differ from default instructions.
811-
*/
812-
protected function has_unique_installation_instructions() {
813-
if ( ! isset( $this->sections['installation'] ) ) {
814-
return false;
815-
}
816-
817-
// If the plugin installation section contains any of these phrases, skip it as it's not useful.
818-
$common_phrases = array(
819-
'This section describes how to install the plugin and get it working.', // Default readme.txt content
820-
);
821-
foreach ( $common_phrases as $phrase ) {
822-
if ( false !== stripos( $this->sections['installation'], $phrase ) ) {
823-
return false;
824-
}
825-
}
826-
827-
return true;
828-
}
829805
}

vendor/afragen/wp-dependency-installer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ You will then need to update `wp-dependencies.json` to suit your requirements.
6161

6262
```php
6363
require_once __DIR__ . '/vendor/autoload.php';
64-
add_action( 'plugins_loaded', function() {
64+
add_action( 'plugins_loaded', static function() {
6565
WP_Dependency_Installer::instance( __DIR__ )->run();
6666
});
6767
```

vendor/afragen/wp-dependency-installer/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "afragen/wp-dependency-installer",
33
"description": "Library that helps WordPress plugin dependency management.",
4-
"version": "4.3.12",
4+
"version": "4.3.13",
55
"type": "library",
66
"license": "MIT",
77
"authors": [

vendor/afragen/wp-dependency-installer/wp-dependency-installer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ private function wp_opcache_invalidate_directory( $dir ) {
717717
* with sub-directories represented as nested arrays.
718718
* @param string $path Absolute path to the directory.
719719
*/
720-
$invalidate_directory = function( $dirlist, $path ) use ( &$invalidate_directory ) {
720+
$invalidate_directory = static function( $dirlist, $path ) use ( &$invalidate_directory ) {
721721
$path = trailingslashit( $path );
722722

723723
foreach ( $dirlist as $name => $details ) {

vendor/composer/installed.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@
5757
"source": {
5858
"type": "git",
5959
"url": "https://github.com/afragen/wordpress-plugin-readme-parser.git",
60-
"reference": "77fa0ee009bcfce63da1a51aa091dac20e242c98"
60+
"reference": "38f4252aea6660fbaf9c8a54c85bf936de8b8ff6"
6161
},
6262
"dist": {
6363
"type": "zip",
64-
"url": "https://api.github.com/repos/afragen/wordpress-plugin-readme-parser/zipball/77fa0ee009bcfce63da1a51aa091dac20e242c98",
65-
"reference": "77fa0ee009bcfce63da1a51aa091dac20e242c98",
64+
"url": "https://api.github.com/repos/afragen/wordpress-plugin-readme-parser/zipball/38f4252aea6660fbaf9c8a54c85bf936de8b8ff6",
65+
"reference": "38f4252aea6660fbaf9c8a54c85bf936de8b8ff6",
6666
"shasum": ""
6767
},
6868
"require": {
6969
"erusev/parsedown": "^1.7",
7070
"php": ">=5.4"
7171
},
72-
"time": "2022-10-14T02:55:01+00:00",
72+
"time": "2023-05-18T19:15:40+00:00",
7373
"default-branch": true,
7474
"type": "library",
7575
"installation-source": "dist",
@@ -102,24 +102,24 @@
102102
},
103103
{
104104
"name": "afragen/wp-dependency-installer",
105-
"version": "4.3.12",
106-
"version_normalized": "4.3.12.0",
105+
"version": "4.3.13",
106+
"version_normalized": "4.3.13.0",
107107
"source": {
108108
"type": "git",
109109
"url": "https://github.com/afragen/wp-dependency-installer.git",
110-
"reference": "da85ae335c8342878d83b5ed7fe56b58609db4e1"
110+
"reference": "6a6366d21710a34f134d747b1ae673daa165b78c"
111111
},
112112
"dist": {
113113
"type": "zip",
114-
"url": "https://api.github.com/repos/afragen/wp-dependency-installer/zipball/da85ae335c8342878d83b5ed7fe56b58609db4e1",
115-
"reference": "da85ae335c8342878d83b5ed7fe56b58609db4e1",
114+
"url": "https://api.github.com/repos/afragen/wp-dependency-installer/zipball/6a6366d21710a34f134d747b1ae673daa165b78c",
115+
"reference": "6a6366d21710a34f134d747b1ae673daa165b78c",
116116
"shasum": ""
117117
},
118118
"require": {
119119
"afragen/wp-dismiss-notice": "*",
120120
"php": ">=5.6"
121121
},
122-
"time": "2023-02-06T04:22:45+00:00",
122+
"time": "2023-05-18T18:49:19+00:00",
123123
"type": "library",
124124
"installation-source": "dist",
125125
"autoload": {
@@ -341,23 +341,23 @@
341341
},
342342
{
343343
"name": "freemius/wordpress-sdk",
344-
"version": "2.5.6",
345-
"version_normalized": "2.5.6.0",
344+
"version": "2.5.8",
345+
"version_normalized": "2.5.8.0",
346346
"source": {
347347
"type": "git",
348348
"url": "https://github.com/Freemius/wordpress-sdk.git",
349-
"reference": "095fc9ced29efef5b18f9b7242bb80b0b4ac6aff"
349+
"reference": "bbbcf3d976a1fd90355037b163746fdca6c93a4c"
350350
},
351351
"dist": {
352352
"type": "zip",
353-
"url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/095fc9ced29efef5b18f9b7242bb80b0b4ac6aff",
354-
"reference": "095fc9ced29efef5b18f9b7242bb80b0b4ac6aff",
353+
"url": "https://api.github.com/repos/Freemius/wordpress-sdk/zipball/bbbcf3d976a1fd90355037b163746fdca6c93a4c",
354+
"reference": "bbbcf3d976a1fd90355037b163746fdca6c93a4c",
355355
"shasum": ""
356356
},
357357
"require": {
358358
"php": ">=5.2"
359359
},
360-
"time": "2023-03-28T10:40:38+00:00",
360+
"time": "2023-05-15T06:17:55+00:00",
361361
"type": "library",
362362
"installation-source": "dist",
363363
"notification-url": "https://packagist.org/downloads/",
@@ -377,7 +377,7 @@
377377
],
378378
"support": {
379379
"issues": "https://github.com/Freemius/wordpress-sdk/issues",
380-
"source": "https://github.com/Freemius/wordpress-sdk/tree/2.5.6"
380+
"source": "https://github.com/Freemius/wordpress-sdk/tree/2.5.8"
381381
},
382382
"install-path": "../freemius/wordpress-sdk"
383383
},

vendor/composer/installed.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
'afragen/wordpress-plugin-readme-parser' => array(
3434
'pretty_version' => 'dev-master',
3535
'version' => 'dev-master',
36-
'reference' => '77fa0ee009bcfce63da1a51aa091dac20e242c98',
36+
'reference' => '38f4252aea6660fbaf9c8a54c85bf936de8b8ff6',
3737
'type' => 'library',
3838
'install_path' => __DIR__ . '/../afragen/wordpress-plugin-readme-parser',
3939
'aliases' => array(
@@ -42,9 +42,9 @@
4242
'dev_requirement' => false,
4343
),
4444
'afragen/wp-dependency-installer' => array(
45-
'pretty_version' => '4.3.12',
46-
'version' => '4.3.12.0',
47-
'reference' => 'da85ae335c8342878d83b5ed7fe56b58609db4e1',
45+
'pretty_version' => '4.3.13',
46+
'version' => '4.3.13.0',
47+
'reference' => '6a6366d21710a34f134d747b1ae673daa165b78c',
4848
'type' => 'library',
4949
'install_path' => __DIR__ . '/../afragen/wp-dependency-installer',
5050
'aliases' => array(),
@@ -78,9 +78,9 @@
7878
'dev_requirement' => false,
7979
),
8080
'freemius/wordpress-sdk' => array(
81-
'pretty_version' => '2.5.6',
82-
'version' => '2.5.6.0',
83-
'reference' => '095fc9ced29efef5b18f9b7242bb80b0b4ac6aff',
81+
'pretty_version' => '2.5.8',
82+
'version' => '2.5.8.0',
83+
'reference' => 'bbbcf3d976a1fd90355037b163746fdca6c93a4c',
8484
'type' => 'library',
8585
'install_path' => __DIR__ . '/../freemius/wordpress-sdk',
8686
'aliases' => array(),

0 commit comments

Comments
 (0)