Add unit tests for `links_add_target()`. Alter the patterns in `links_add_target()` and `_links_add_target()` slightly based on learnings after running tests.

Props mdbitz.
Fixes #26164.


Built from https://develop.svn.wordpress.org/trunk@26328


git-svn-id: http://core.svn.wordpress.org/trunk@26230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `get_posts()`, alter the doc block and default args to make `orderby` equal to `date`, not `post_date`.

Props ounziw.
Fixes #26128.


Built from https://develop.svn.wordpress.org/trunk@26329


git-svn-id: http://core.svn.wordpress.org/trunk@26231 1a063a9b-81f0-0310-95a4-ce76da25c4cd