Themes: Check if the browse view is set in wp_ajax_query_themes()
to avoid a PHP notice when searching for new themes.
Introduced in [35527]. See #34206. git-svn-id: https://develop.svn.wordpress.org/trunk@35646 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
56625d9e13
commit
32d4eec670
@ -2821,7 +2821,7 @@ function wp_ajax_query_themes() {
|
||||
'fields' => $theme_field_defaults
|
||||
) );
|
||||
|
||||
if ( 'favorites' === $args['browse'] && ! isset( $args['user'] ) ) {
|
||||
if ( isset( $args['browse'] ) && 'favorites' === $args['browse'] && ! isset( $args['user'] ) ) {
|
||||
$user = get_user_option( 'wporg_favorites' );
|
||||
if ( $user ) {
|
||||
$args['user'] = $user;
|
||||
|
Loading…
Reference in New Issue
Block a user