function my_gallery_slider() { $images = get_posts(['post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => 'inherit']); if ($images) { $output = gallery_slider_output($images); return $output; } }
function my_gallery_slider($output, $attr) { $ids = explode(',', $attr['ids']); $images = get_posts(array('include' => $ids, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image')); if ($images) { $output = gallery_slider_output($images); return $output; } }