$all_pages = ( new WP_Query() )->query( [
'post_type' => 'page',
'posts_per_page' => -1,
'post_parent__in' => array( 216, 204, 143, 219, 111, 214 )
] );
function cartGalleryLibs($all_pages) {
if(is_page(array($all_pages)) ) {
wp_enqueue_script('swiper-lib-script', get_template_directory_uri() . '/assets/js/swiper.lib.min.js', array('jquery'), null, true);
wp_enqueue_script('cart-lightgallery-lib', get_template_directory_uri() . '/assets/js/lightgallery.lib.js', array('jquery'), null, true);
wp_enqueue_script('cart-lightgallery', get_template_directory_uri() . '/assets/js/lightgallery.js', array('jquery'), null, true);
wp_enqueue_script('cart-swiper', get_template_directory_uri() . '/assets/js/cart-script.js', array('jquery'), null, true);
}
}