Skip to content

Commit c0d1d4a

Browse files
authored
Merge pull request #35 from soderlind/remove/duplicats
Remove duplicate code
2 parents 23d2238 + e005fe2 commit c0d1d4a

7 files changed

+18
-17
lines changed

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
# Changelog
22

3-
### 1.8.0
3+
### 1.8.1
4+
5+
- Remove duplicate code.
6+
7+
### 1.8.0
48

59
> REQUIRE PHP 8.0 OR HIGHER
610
711
#### Added
12+
813
- New Config class to manage plugin constants
914
- Constructor property promotion for better code organization
1015
- Strict type declarations throughout the codebase
1116

1217
#### Changed
18+
1319
- Increased default search threshold from 2 to 20 sites
1420
- Refactored main class to use modern PHP 8.0+ features
1521
- Improved error handling and null checks
1622
- Better type safety with more specific type declarations
1723
- Simplified plugin initialization
1824

1925
#### Developer Notes
26+
2027
- The Config class now centralizes all plugin constants
2128
- Removed redundant property declarations in favor of constructor property promotion
2229
- Added strict typing for better code reliability
@@ -281,5 +288,3 @@
281288
### 1.0.x
282289

283290
- Initial release.
284-
285-

build/index.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('wp-api-fetch', 'wp-i18n'), 'version' => '8a8e912db6e7c0137fcb');
1+
<?php return array('dependencies' => array('wp-api-fetch', 'wp-i18n'), 'version' => '1ebd4f27cd4018d342f4');

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "soderlind/super-admin-all-sites-menu",
33
"description": "For the super admin, replace WP Admin Bar My Sites menu with an All Sites menu.",
4-
"version": "1.8.0",
4+
"version": "1.8.1",
55
"keywords": [
66
"wordpress",
77
"multisite",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "super-admin-all-sites-menu",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"description": "For the super admin, replace WP Admin Bar My Sites menu with an All Sites menu.",
55
"main": "index.js",
66
"scripts": {

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=== Super Admin All Sites Menu ===
2-
Stable tag: 1.8.0
2+
Stable tag: 1.8.1
33
Requires at least: 5.6
44
Tested up to: 6.7
55
Requires PHP: 8.0
@@ -108,6 +108,10 @@ You can use the following filters to override the defaults:
108108

109109
== Changelog ==
110110

111+
= 1.8.1 =
112+
113+
* Remove duplicate code
114+
111115
= 1.8.0 =
112116

113117
REQUIRE PHP 8.0 OR HIGHER

super-admin-all-sites-menu.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Plugin URI: https://github.com/soderlind/super-admin-all-sites-menu
1313
* GitHub Plugin URI: https://github.com/soderlind/super-admin-all-sites-menu
1414
* Description: For the super admin, replace WP Admin Bar My Sites menu with an All Sites menu.
15-
* Version: 1.8.0
15+
* Version: 1.8.1
1616
* Author: Per Soderlind
1717
* Network: true
1818
* Author URI: https://soderlind.no
@@ -93,14 +93,6 @@ public function action_admin_bar_init(): void {
9393
add_action( 'admin_enqueue_scripts', [ $this, 'action_enqueue_scripts' ] );
9494
add_action( 'wp_enqueue_scripts', [ $this, 'action_enqueue_scripts' ] );
9595
}
96-
add_action( 'wp_insert_site', [ $this, 'update_local_storage' ] );
97-
add_action( 'wp_update_site', [ $this, 'update_local_storage' ] );
98-
add_action( 'wp_delete_site', [ $this, 'update_local_storage' ] );
99-
100-
add_action( 'update_option_blogname', [ $this, 'action_update_option_blogname' ], 10, 3 );
101-
102-
add_action( 'activated_plugin', [ $this, 'plugin_update_local_storage' ], 10, 1 );
103-
add_action( 'deactivated_plugin', [ $this, 'plugin_update_local_storage' ], 10, 1 );
10496

10597
$this->number_of_sites = $this->get_number_of_sites();
10698
}

0 commit comments

Comments
 (0)