strangerstudios / pmpro-courses

Create courses with lessons and manage member access access natively in Paid Memberships Pro. Also integrates membership with third party LMS plugins like LifterLMS, LearnDash, Tutor LMS, and Sensei LMS.
https://www.paidmembershipspro.com/add-ons/pmpro-courses-lms-integration/
3 stars 12 forks source link

Pagination on lessons pages is not consistent. #69

Open MaximilianoRicoTabo opened 5 months ago

MaximilianoRicoTabo commented 5 months ago
image image

All Submissions:

Make sure the code does what it says - done - No fatal errors when running it. - done - Run through WPCS - done - Are comments clean and readable? - done - Are function or class names named correctly? - done - Does the code follow the way we’ve done it before? - done -

Changes proposed in this Pull Request:

Hook into get_next_post_where, get_previous_post_where, get_next_post_sort and get_previous_post_sort filters to Replace the SQL query where and order by clauses string to sort adjacent posts by menu_order instead of post_date.

Resolves #67

How to test the changes in this Pull Request:

Check steps described in issue above

Other information:

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

Added filters callbacks for get_next_post_where, get_previous_post_where, get_next_post_sort and get_previous_post_sort to get proper results