mirror of
https://github.com/10h30/Display-Posts-Shortcode-Remote.git
synced 2026-06-05 15:07:31 +09:00
Fix no category specified
Support when no category specified
This commit is contained in:
@@ -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'] ) ) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user