Skip to content

Commit 7a5634b

Browse files
committed
[ci]
1 parent ad252f7 commit 7a5634b

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

vendor/nextgenthemes/wp-shared/includes/WP/fn-remote-get.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,21 @@ function remote_get_json_cached( string $url, array $args = array(), string $jso
4343
);
4444
}
4545

46-
if ( $json_name && ! empty( $response[ $json_name ] ) ) {
47-
return $response[ $json_name ];
48-
} else {
49-
return new WP_Error(
50-
'json-value-empty',
51-
sprintf(
52-
// Translators: %1$s URL, %2$s JSON value, %3$s full JSON
53-
__( 'url: %1$s JSON value <code>%2$s</code> does not exist or is empty. Full Json: %3$s', 'advanced-responsive-video-embedder' ),
54-
esc_html( $url ),
55-
esc_html( $json_name ),
56-
esc_html( $response )
57-
)
58-
);
46+
if ( $json_name ) {
47+
if ( empty( $response[ $json_name ] ) ) {
48+
return new WP_Error(
49+
'json-value-empty',
50+
sprintf(
51+
// Translators: 1 URL 2 JSON value
52+
__( 'url: %1$s JSON value <code>%2$s</code> does not exist or is empty. Full Json: %3$s', 'advanced-responsive-video-embedder' ),
53+
esc_html( $url ),
54+
esc_html( $json_name ),
55+
esc_html( $response )
56+
)
57+
);
58+
} else {
59+
return $response[ $json_name ];
60+
}
5961
}
6062

6163
return $response;

0 commit comments

Comments
 (0)