Skip to content

Hide documents from ElasticPress search until a given date & time

Notifications You must be signed in to change notification settings

dxw/elasticpress-embargo-attachments

Repository files navigation

ElasticPress Embargo Attachments

A WordPress plugin that allows media library files to be embargoed from search when using ElasticPress.

By default, ElasticPress will return all media library items in search results if Document Search is activated. Items are indexed on upload, and immediately start being returned in search.

This plugin provides an "Embargo datetime" option on media library items, and then hides those items from search until the datetime has passed.

Installation

Clone this repo into your WordPress /plugins/ directory, and activate the plugin.

You will need to re-index the first time you set an embargo datetime. After that, ElasticPress will recognise embargo datetimes automatically.

Development

Install the dependencies:

composer install

Run the tests:

vendor/bin/peridot spec

Run the linter:

vendor/bin/php-cs-fixer fix 

About

Hide documents from ElasticPress search until a given date & time

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages