alleyinteractive / archiveless

WordPress plugin to hide posts from archives (lists)
GNU General Public License v2.0
7 stars 4 forks source link

Handling `archiveless` posts in Elasticsearch plugins #64

Closed renatonascalves closed 10 months ago

renatonascalves commented 11 months ago

Toggling the "Hide from Archives" button obliterates a post from Elasticsearch. Not only hidden but literally gone.

This pull request changes this behavior for the VIP Search, ElasticPress, and SearchPress plugins. Ensuring the archived posts are kept indexed in Elasticsearch.

Similar support was added to the Elasticsearch Extensions plugin: https://github.com/alleyinteractive/elasticsearch-extensions/pull/59

But if a site is not using it, this will ensure the archived posts are kept indexed.

And since the Elasticsearch Extensions hook is run at a later priority, there is no possibility of the status being added here if the plugin restricts it. :)

fixes #62