Skip to content

Commit

Permalink
post name as variable
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenedetto committed Apr 26, 2023
1 parent 0ad0aa4 commit 58fa7d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ public static function get_site_data_from_wp_global_styles($create_post = false,

$site_cpt = array();
$post_type_filter = 'wp_global_styles';
$post_name = 'wp-global-styles-site';
$args = array(
'posts_per_page' => 1,
'orderby' => 'date',
Expand All @@ -522,7 +523,7 @@ public static function get_site_data_from_wp_global_styles($create_post = false,
'no_found_rows' => true,
'update_post_meta_cache' => false,
'update_post_term_cache' => false,
'name' => 'wp-global-styles-site',
'name' => $post_name,
);

$global_style_query = new WP_Query();
Expand All @@ -536,7 +537,7 @@ public static function get_site_data_from_wp_global_styles($create_post = false,
'post_status' => 'publish',
'post_title' => 'Custom Styles Site', // Do not make string translatable, see https://core.trac.wordpress.org/ticket/54518.
'post_type' => $post_type_filter,
'post_name' => 'wp-global-styles-site',
'post_name' => $post_name,
),
true
);
Expand Down

0 comments on commit 58fa7d9

Please sign in to comment.