Skip to main content

Customize

The plugin has no settings page. A site changes the behavior through filters, and a third party can add its own module to the package of the plugin.

Filters​

FilterDefaultPurpose
rinkukado.popover.root-selectormainThe element that holds the links.
rinkukado.popover.container-selectorpThe element that must hold the link.
rinkukado.popover.deny-classno-rinkukadoA link with this class shows no preview.
rinkukado.popover.timings['prefetch' => 80, 'open' => 300, 'close' => 200]The delays in milliseconds.
rinkukado.rest.post-typesevery public type except attachmentThe types that the endpoint accepts.
rinkukado.rest.excerpt-length30The word count of the fallback excerpt.
rinkukado.rest.payloadthe payloadThe last change before the response.
add_filter('rinkukado.popover.root-selector', static fn (): string => '.site-content');

Each module document describes its filters:

Extend the plugin​

sources/package.php exposes the package of the plugin through the package() function. The function always returns the same instance, so a third party can add its own module:

add_action('plugins_loaded', static function (): void {
\SpaghettiDojo\Rinkukado\package()->addModule(MyOwn\Module::new());
}, 5);

Add the module before the priority of the boot() call, which is 10.