Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ This plugin add two new type of sources for your facets, Posts to Posts (P2P) co

## Changelog

### 1.0.0
### 1.0.0
- Initial release: P2P connection facets for WP Grid Builder.

### 1.0.1
- Broaden PHP requirement from 8.3 to ^8.0 (supports PHP 8.0 through 8.4).
- Fix Composer installs on projects running PHP 8.4.
6 changes: 4 additions & 2 deletions classes/Facet.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ protected function parse_side( $side ): object {
public function get_p2p_connexion(): array {
static $load_connexions;

if ( isset( $load_connexions) ) {
if ( isset( $load_connexions ) ) {
return $load_connexions;
}

Expand Down Expand Up @@ -411,11 +411,12 @@ public function p2p_delete_connections( $p2p_ids ): void {
continue;
}

$facet_name_in = "'";
$facet_name_in = "'"; //phpcs:ignore Generic.Formatting.MultipleStatementAlignment.NotSameWarning
$facet_name_in .= implode( "', '", $names );
$facet_name_in .= "'";

$wpdb->query(
//phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$wpdb->prepare(
"
DELETE FROM {$wpdb->prefix}wpgb_index
Expand All @@ -429,6 +430,7 @@ public function p2p_delete_connections( $p2p_ids ): void {
$connexion->p2p_to,
)
);
//phpcs:enable
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
},
"require": {
"php": "8.3.*",
"php": "^8.0",
"ext-json": "*",
"composer/installers": "^1.0 || ^2.0"
},
Expand Down
Loading
Loading