Media: Add new functions to return the previous/next attachment links.

New functions:

* get_adjacent_image_link()
* get_next_image_link()
* get_previous_image_link()

Fixes #45708.

Props flixos90, DrewAPicture, mor10, antpb, hellofromTonya, whyisjake.




git-svn-id: https://develop.svn.wordpress.org/trunk@51122 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock
2021-06-08 23:12:22 +00:00
parent c2313c6934
commit 38232f655d
8 changed files with 440 additions and 10 deletions

View File

@@ -249,6 +249,7 @@
<element value="WP_Import_UnitTestCase"/>
<element value="Tests_Query_Conditionals"/>
<element value="WP_Test_XML_TestCase"/>
<element value="WP_Test_Adjacent_Image_Link_TestCase"/>
<!-- Mock classes. -->
<element value="Spy_REST_Server"/>