Can we use a rewrite or query var instead of directly accessing display-recent.php?
Right now we have a crazy relative path to include wp-admin/admin.php in this file. This is bound to break in WordPress installs where the default locations of wp-content and other directories has been changed.
We should probably include this file as a part of the standard WordPress stack so that we can use either ABSPATH or WP_CONTENT_DIR to include the required file.
This will need a little bit of research and interrogation to determine if there's a good reason for the way it is set up now.
I'm going to include this in the fixes for #63.
Yes, and this makes it much more testable if we're using WP ajax functions.
Initial page load works as expected.
However, the filter button doesn't work, because the filtration <form> is loading within the post editor's <form>, making the browser remove the inner <form> from the DOM, so pressing the filtration submit button submits the post form erroneously, causing an error. :person_frowning:
That's not quite it. Changing the containing form's id did nothing to fix this.
The scripts are loaded on the page, and ajaxurl is the expected /wp-admin/admin/ajax/php.
(Thanks to @rnagle, a fix for this is in branch 63-refactor-saved-links. It turns out that to detect clicks on content loaded after the page loads, the click event should be bound to body and then use the loaded content's selector within the .on('click',
This issue will be closed with the pull request for #63.