[wp-trac] [WordPress Trac] #25047: Improve heartbeat queue checking
WordPress Trac
noreply at wordpress.org
Tue Aug 20 21:24:23 UTC 2013
#25047: Improve heartbeat queue checking
--------------------------+-----------------------
Reporter: evansolomon | Owner: azaozz
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 3.7
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-----------------------
Comment (by azaozz):
Thinking more about this: there is a good user case to set a queued item
to `false`. There is even a case to set it to `null`. If we return `false`
or `null` from `wp.heartbeat.isQueued()` and use that function in
`wp.heartbeat.enqueue()` we will miss either one or the other.
In addition, `obj.hasOwnProperty()` works pretty much like `isset()` in
PHP, i.e. it doesn't care what the value is, only checks whether the
property exists. So it would be best to use hasOwnProperty directly in
`wp.heartbeat.enqueue()` and return `undefined` from
`wp.heartbeat.isQueued()`.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25047#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list