[wp-trac] [WordPress Trac] #18951: A function to add default images for themes

WordPress Trac wp-trac at lists.automattic.com
Fri Oct 14 17:49:22 UTC 2011


#18951: A function to add default images for themes
-----------------------------+------------------------------
 Reporter:  F J Kaiser       |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Themes           |     Version:  3.2.1
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by F J Kaiser):

 Still had wrong single/double quotes. [http://pastie.org/2696088
 (Hopefully) final paste].

 It would also be handy to have a ''sidekick'' function that cares about
 storing the default images as associative array with names as keys and
 urls as values. So calling the image inside templates would be even more
 easy:

 {{{
 function wp_set_default_img( $name, $url )
 {
         return $GLOBALS['_wp_default_images'][ $name ] = $url;
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18951#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list