- Timestamp:
- 11/30/2021 12:22:30 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
r52051 r52275 321 321 $id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id(); 322 322 } else { 323 $wp_query_args = array( 324 'post_status' => 'publish', 325 'post_type' => 'wp_global_styles', 326 'posts_per_page' => 1, 327 'no_found_rows' => true, 328 'fields' => 'ids', 329 'tax_query' => array( 330 array( 331 'taxonomy' => 'wp_theme', 332 'field' => 'name', 333 'terms' => $theme->get_stylesheet(), 334 ), 335 ), 336 ); 337 $global_styles_query = new WP_Query( $wp_query_args ); 338 $id = ! empty( $global_styles_query->posts ) ? array_shift( $global_styles_query->posts ) : null; 323 $user_cpt = WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type( $theme ); 324 $id = isset( $user_cpt['ID'] ) ? $user_cpt['ID'] : null; 339 325 } 340 326
Note: See TracChangeset
for help on using the changeset viewer.