10up / classifai

Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence.
https://classifaiplugin.com
GNU General Public License v2.0
573 stars 53 forks source link

Ensure the excerpt length setting saves properly #767

Closed dkotter closed 4 months ago

dkotter commented 4 months ago

Description of the Change

While testing something else, noticed that when updating the Excerpt length setting for the Excerpt Generation Feature, the value I set never saved and always reverted to the default.

Looking into it, found that we were relying on the existing setting value and only using the new value if the existing didn't exist (which I think it will always exist). This conditional needed flipped around.

I worried this may be an issue in other places but in doing a spot check, didn't see this same problem anywhere else.

How to test the Change

Try changing the Excerpt length setting in the Excerpt Generation Feature and ensure the value saves

Changelog Entry

Fixed - Ensure the Excerpt length setting for the Excerpt Generation Feature can be changed.

Credits

Props @dkotter

Checklist: