Rarst\Fragment_Cache\Gallery_Cache::get_attachment_ids PHP Метод

get_attachment_ids() публичный Метод

Retrieve array of attachment IDs for current post.
public get_attachment_ids ( ) : array
Результат array
    public function get_attachment_ids()
    {
        static $attachments = array();
        $post_id = get_the_ID();
        if (!isset($attachments[$post_id])) {
            $attachments[$post_id] = get_posts(array('post_type' => 'attachment', 'post_parent' => $post_id, 'orderby' => 'ID', 'fields' => 'ids'));
        }
        return $attachments[$post_id];
    }