Skip to content

Commit 7496514

Browse files
committed
Static counter hack removed
1 parent 218ecea commit 7496514

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

.distignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ phpdoc.xml
3030
phpstan.neon
3131
phpunit.xml
3232
playwright.config.ts
33-
setup.sh
33+
setup.sh
34+
multisite-language-switcher.zip

includes/MslsPostTag.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*/
1818
class MslsPostTag extends MslsMain {
1919

20-
protected int $excution_counter = 0;
21-
2220
/**
2321
* Suggest
2422
*
@@ -150,10 +148,6 @@ public function edit_input( \WP_Term $tag, string $taxonomy ): void {
150148
* @return boolean
151149
*/
152150
public function the_input( ?\WP_Term $tag, string $title_format, string $item_format ): bool {
153-
if ( $this->already_executed() ) {
154-
return false;
155-
}
156-
157151
$blogs = $this->collection->get();
158152
if ( $blogs ) {
159153
$term_id = $tag->term_id ?? 0;
@@ -261,14 +255,4 @@ protected function get_select_title(): string {
261255
__( 'Multisite Language Switcher', 'multisite-language-switcher' )
262256
);
263257
}
264-
265-
protected function already_executed(): bool {
266-
if ( $this->excution_counter > 0 ) {
267-
return true;
268-
}
269-
270-
++$this->excution_counter;
271-
272-
return false;
273-
}
274258
}

includes/MslsPostTagClassic.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ public function edit_input( \WP_Term $tag, string $taxonomy ): void {
6767
* @return boolean
6868
*/
6969
public function the_input( ?\WP_Term $tag, string $title_format, string $item_format ): bool {
70-
if ( $this->already_executed() ) {
71-
return false;
72-
}
73-
7470
$blogs = $this->collection->get();
7571
if ( ! empty( $blogs ) ) {
7672
$term_id = $tag->term_id ?? 0;

0 commit comments

Comments
 (0)