Skip to content

Commit

Permalink
Show v2 patterns from Dotcompatterns in pages modal for testing (#86983)
Browse files Browse the repository at this point in the history
  • Loading branch information
miksansegundo authored Jan 30, 2024
1 parent 898a114 commit 51bb724
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function enqueue_assets() {
public function get_page_templates( string $locale ) {
$page_template_data = get_transient( $this->get_templates_cache_key( $locale ) );
$override_source_site = apply_filters( 'a8c_override_patterns_source_site', false );
$is_assembler_v2_site = in_array( get_stylesheet(), array( 'pub/assembler', 'assembler' ), true );
$is_assembler_v2_site = in_array( get_stylesheet(), array( 'pub/assembler', 'assembler' ), true ) || isset( $_GET['v2_patterns'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended

// Load fresh data if we don't have any or vertical_id doesn't match.
if ( $is_assembler_v2_site || false === $page_template_data || ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || false !== $override_source_site ) {
Expand All @@ -302,7 +302,7 @@ public function get_page_templates( string $locale ) {

if ( $is_assembler_v2_site ) {
$request_params = array(
'site' => 'assemblerv2patterns.wordpress.com',
'site' => 'dotcompatterns.wordpress.com',
'categories' => 'page',
'post_type' => 'wp_block',
);
Expand Down

0 comments on commit 51bb724

Please sign in to comment.