[wp-trac] [WordPress Trac] #43009: Create Video/Audio Playlist hooks not working as expected
WordPress Trac
noreply at wordpress.org
Thu Apr 12 17:39:19 UTC 2018
#43009: Create Video/Audio Playlist hooks not working as expected
--------------------------+------------------------------
Reporter: iforrest | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.9.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: administration
--------------------------+------------------------------
Comment (by adamsilverstein):
> I noticed that if we delete the last audio/video then the create
playlist menu items are not hidden.
Yea, the inconsistencies are a bit frustrating, in part because we've
hijacked these $has_ variables with a setting that i think really only
applies on load. I'm going to dig in to see why that happens.
The docs should make it clear you can pass three things to the filter:
true, false or null - each with different behaviors.
* null: perform a query to see if media exists, initially show button if
present
* true (default): always show button (initially)
* false: never show button (initially)
Thinking about this more, maybe we could consider changing how the filter
works so that true and false actually persist beyond initial load, which
is the core expectation that raised this ticket. This actually seems more
useful unless I'm missing some use case.
The filter action would then become:
* null: perform a query to see if media exists, initially show button if
present
* true (default): always show button (even if all items removed)
* false: never show button (even if new items added)
What do you think?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43009#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list