[wp-trac] [WordPress Trac] #51739: Randomize Header Images aren't actually random
WordPress Trac
noreply at wordpress.org
Tue Nov 10 12:38:58 UTC 2020
#51739: Randomize Header Images aren't actually random
--------------------------+----------------------
Reporter: richbhanover | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution: wontfix
Keywords: | Focuses:
--------------------------+----------------------
Comment (by Otto42):
Replying to [comment:6 richbhanover]:
> 1. Would you tell me which WordPress source file performs the header
image randomizing function?
This line, right here:
https://core.trac.wordpress.org/browser/trunk/src/wp-
includes/theme.php#L1299
> 2. Do you know if the randomizing code has any notion of the "last image
shown"? (I would like to experiment with letting the next image be
"current image+random(1,5) modulo number of images" so the next image
"walks progressively through all images.")
It does not do this, it is a simple call to array_rand.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51739#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list