From a3102e322d5aa6ab6c7ebc8820c4fef5d4342618 Mon Sep 17 00:00:00 2001 From: Mike Francis Date: Fri, 10 Apr 2015 10:17:05 +0100 Subject: [PATCH] Add wp_get_attachment_image_url function --- functions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/functions.php b/functions.php index e90a791..5192c57 100644 --- a/functions.php +++ b/functions.php @@ -131,3 +131,13 @@ function barebones_tiny_mce_before_init( $settings ) { } add_filter( 'tiny_mce_before_init', 'barebones_tiny_mce_before_init' ); + + +/** + * Get image URL for whatever size. + */ + +function wp_get_attachment_image_url( $id, $size = 'full', $attrs = []) { + $image = wp_get_attachment_image_src( $id, $size, $attrs ); + return $image[0]; +}