[wp-hackers] configure external url in functions?

Blue Chives info at bluechives.com
Sun Apr 8 13:24:38 UTC 2012


Hi Lee,

This might be of some help:
http://www.ghacks.net/2010/04/13/setting-up-a-content-delivery-network-in-wordpress/

Cheers
John


On 8 Apr 2012, at 13:45, Lee Rickler wrote:

> Not sure if this is possible, but it seems such a simple thing to implement so I may be missing the point.
> 
> In the same way you can use bloginfo() or get_stylesheet_directory_uri() to specify a direct path is there a way to define an external URL so it can be included in the same way?
> 
> As a general example, I want to pull an image from a CDN.
> 
> To grab the image in the 'normal' theme folder you could simply write:
> <img src="<?php get_stylesheet_directory_uri(); ?>/images/image.png">
> 
> but using the CDN I will have to use something like:
> <img src="https://s3.amazonaws.com/BUCKETNAME/images/image.png">
> 
> What would be super extra spiffy is if I could use something like:
> <img src="<?php get_cdn_uri(); ?>/images/image.png">
> 
> Possible? Newbie question? Completely off my rocker?
> 
> Cheers,
> 
> Lee
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

Tel: 01494680118
Mob: 07789 506505
Twitter: @bluechives

SME Web Management

Create (Domain , Design & Development)
Manage (Hosting, SEO, PPC & Social Media)
Evolve (Strategic Planning & Training)

BlueChives is a trading Name of JPARC Limited.  Company number: 4928902 VAT Registration Number: GB 824 4735 25
Registered Office: The Meridian, 4 Copthall House, Station Square, Coventry, CV1 2F



More information about the wp-hackers mailing list