INN / link-roundups

A WordPress plugin to make it easy to collect links from around the web, turn them into roundup posts and streamline the production of daily/weekly roundup newsletters using MailChimp. Built and maintained by INN Labs.
https://wordpress.org/plugins/link-roundups/
GNU General Public License v2.0
20 stars 4 forks source link

Correct error with the plugin's get_excerpt() function. #186

Open laurelfulford opened 4 years ago

laurelfulford commented 4 years ago

Changes

This PR passes the expected $post to the_except() function in SavedLinks, to prevent errors.

Why

This PR is to fix an issue I noticed when using the Link Roundups plugin with a theme that was not Largo. If you run a search that returns a Saved Link CPT, it throws an error.

For #185

Testing/Questions

Features that this PR affects:

Questions that need to be answered before merging:

(I believe so, but please let me know if it's not!)

Steps to test this PR:

  1. On a test site, apply a theme that is not Largo -- a good bet is one of the default themes, like Twenty Twenty.
  2. If you don't have any, add at least one "Saved Link"
  3. Run a search on the front-end of the site; note that you get an error:

image

  1. Apply the PR.
  2. Confirm that the error is now gone, and the search results are displaying as expected:

image

Additional information

INN Member/Labs Client requesting: (if applicable)