Merges [25974] and [25975] to the 3.7 branch. Fixes a regression introduced in [25270]. Adds unit tests. props chrisbliss18. fixes #25750. git-svn-id: https://develop.svn.wordpress.org/branches/3.7@25976 602fd350-edb4-49c9-b593-d223f7449a82
Merges [25974] and [25975] to the 3.7 branch. Fixes a regression introduced in [25270]. Adds unit tests. props chrisbliss18. fixes #25750. git-svn-id: https://develop.svn.wordpress.org/branches/3.7@25976 602fd350-edb4-49c9-b593-d223f7449a82