﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
17240,Themes: Add ability to show a random header image,lancewillett,ryan,"'''Goal:'''

Add the option to load a different header image with each page load.

(Note: this is ''not'' intended to be a ""random image rotator"" that changes the image without a page load.)

'''Admin'''

If a theme has multiple headers defined with {{{register_default_headers()}}}, and the theme chooses to enable this feature, show a new option in checkbox in Appearance > Header that turns on the randomization.

Make the new option the first (or last) radio option in the form so that you choose not to use a single image, but to show any of them on any page or post. See attached screenshot ""random-option-admin-example.png"" for a visual example.

'''Theme Support'''

1. Themes wishing to use this feature should define multiple header images with {{{register_default_headers()}}}.
2. Then turn it on with {{{define( 'HEADER_IMAGE', 'random' )}}} to set it on by default for the theme. If set to ""random"" and a user visits Appearance > Header the ""Show Random Image"" option should be selected instead of one of the images.

When {{{get_header_image()}}} is called from a template, instead of returning the value in ""header_image"" theme_mod, the function should pick a random node from the global {{{$_wp_default_headers}}} variable and return its URL instead.

'''Reference:'''

 * This was originally brought up in #14151.
 * A further idea is to allow end users to rotate multiple header images that they've uploaded. See #15100 for the general idea.",feature request,closed,normal,3.2,Themes,,normal,fixed,has-patch,ian@… batmoo@… mv@… lance@…
