Fix no category specified

Support when no category specified
This commit is contained in:
2020-10-02 23:16:15 +07:00
committed by GitHub
parent b52d6a871b
commit 614ae1d45a
+1 -1
View File
@@ -253,7 +253,7 @@ if ( ! class_exists( 'Display_Posts_Remote' ) ) {
$url = trailingslashit( $atts['url'] ) . 'wp-json/wp/v2/posts'; $url = trailingslashit( $atts['url'] ) . 'wp-json/wp/v2/posts';
$url = add_query_arg( '_embed' , '', $url ); $url = add_query_arg( '_embed' , '', $url );
if ( ! empty( $atts['category_id'] ) ) { if ( ! empty( $atts['category_id'] ) && ( is_array( $atts['category_id'] ) || false !== filter_var( $atts['category_id'], FILTER_VALIDATE_BOOLEAN ) ) ) {
if ( is_array( $atts['category_id'] ) ) { if ( is_array( $atts['category_id'] ) ) {