getPostImages($post_id, $size); } /** * Use this function in a wordpress loop to get list of images attached to a post * (Attached using the 'Attach Images to post' plugin) * * @param string $size Size of the image shown for an image attachment (either of thumbnail, medium, large or full) * @link https://codex.wordpress.org/The_Loop * @uses twp_get_post_images * @return array */ function twp_the_post_images($size = 'thumbnail') { $post_id = get_the_ID(); return twp_get_post_images($post_id, $size); } TWL_API_Post::getInstance()->init();