Opened 12 years ago
Closed 6 years ago
#18959 closed enhancement (wontfix)
Allow choosing multiple header images
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3 |
Component: | Customize | Keywords: | ux-feedback dev-feedback 2nd-opinion needs-patch |
Focuses: | Cc: |
Attachments (2)
Change History (18)
This ticket was mentioned in IRC in #wordpress-dev by jphase. View the logs.
9 years ago
#5
@
9 years ago
Hey everyone, this is my first diff so if I did anything wrong (syntactically or otherwise) then please give me feedback. I want to learn the right way to contribute :)
I updated the UI to have checkboxes next to each image and a bit of jQuery to toggle between the "Random" radio and the selected checkboxes. The "Random" radio still just pulls random images from the default images and I modified get_random_header_image() to allow an optional paths array to be passed which will allow a random index to be returned.
Perhaps we could eventually allow an interface to save a preferred order of the selected images later?
This ticket was mentioned in IRC in #wordpress-dev by jphase. View the logs.
9 years ago
#9
follow-up:
↓ 10
@
9 years ago
Hi Jphase,
I don't have time to test your patch right now (bedtime!), sorry, but I can point you towards the existing header tests. If you have the new style WordPress development repo, they are in tests/phpunit/tests/image/header.php
, or here's a link to them in SVN: http://develop.svn.wordpress.org/trunk/tests/phpunit/tests/image/header.php
Here's some info on automated tests, in case it's useful: http://make.wordpress.org/core/handbook/automated-testing/
(Note the stuff on @ticket
, that tripped me up when I couldn't work out why my tests weren't working.)
Hope this helps.
#10
in reply to:
↑ 9
@
9 years ago
Replying to simonwheatley:
Hi Jphase,
I don't have time to test your patch right now (bedtime!), sorry, but I can point you towards the existing header tests. If you have the new style WordPress development repo, they are in
tests/phpunit/tests/image/header.php
, or here's a link to them in SVN: http://develop.svn.wordpress.org/trunk/tests/phpunit/tests/image/header.php
Here's some info on automated tests, in case it's useful: http://make.wordpress.org/core/handbook/automated-testing/
(Note the stuff on
@ticket
, that tripped me up when I couldn't work out why my tests weren't working.)
Hope this helps.
Hey Simon,
Thanks for the info; it was exactly what I needed. I ran the phpunit test from the "header" group and it appears like things are okay. Here's a screenshot from my terminal. Let me know if I did this right or if I missed anything.
#11
@
9 years ago
I'd also try running the tests with the ticket number in the group parameter too, this will ensure any tests relating to this ticket are not skipped:
phpunit --group header,18959
#13
@
8 years ago
- Keywords 2nd-opinion added
The headers admin page is now only accessible to no-js users and a couple of other edge cases where the Customizer isn't supported. Headers in the Customizer could potentially benefit from this for default headers, although this functionality is present for user-uploaded ones of course.
Is anyone still interested in making improvements here, given that?
I'd say this falls under either child-theme or plugin development.