Skip to content

Commit

Permalink
PLANET-7561 Remove Blank Page pattern (#1217)
Browse files Browse the repository at this point in the history
We move it to the master theme
  • Loading branch information
mleray committed Jul 1, 2024
1 parent e862d42 commit 8b9455a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 57 deletions.
42 changes: 0 additions & 42 deletions classes/patterns/class-blankpage.php

This file was deleted.

1 change: 0 additions & 1 deletion classes/patterns/class-block-pattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public static function get_classname(): string {
*/
public static function get_list(): array {
return [
BlankPage::class,
DeepDive::class,
DeepDiveTopic::class,
GetInformed::class,
Expand Down
10 changes: 3 additions & 7 deletions classes/search/pattern/class-patternusageapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
namespace P4GBKS\Search\Pattern;

use WP_Block_Patterns_Registry;
use P4GBKS\Patterns\BlankPage;
use P4GBKS\Search\Pattern\Query\Parameters;

/**
Expand Down Expand Up @@ -77,12 +76,9 @@ private function fetch_items(): void {
* Get all patterns names
*/
private function pattern_names(): array {
return array_filter(
array_column(
( WP_Block_Patterns_Registry::get_instance() )->get_all_registered(),
'name'
),
fn ( $name ) => BlankPage::get_name() !== $name
return array_column(
( WP_Block_Patterns_Registry::get_instance() )->get_all_registered(),
'name'
);
}

Expand Down
10 changes: 3 additions & 7 deletions classes/search/pattern/class-patternusagetable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use InvalidArgumentException;
use WP_List_Table;
use WP_Block_Patterns_Registry;
use P4GBKS\Patterns\BlankPage;
use P4GBKS\Search\RowActions;
use P4GBKS\Search\Pattern\Query\Parameters;

Expand Down Expand Up @@ -95,12 +94,9 @@ public function __construct( $args = [] ) {
);
}

$this->pattern_names = array_filter(
array_column(
$this->pattern_registry->get_all_registered(),
'name'
),
fn ( $name ) => BlankPage::get_name() !== $name
$this->pattern_names = array_column(
$this->pattern_registry->get_all_registered(),
'name'
);
}

Expand Down

0 comments on commit 8b9455a

Please sign in to comment.