Documentation

O3PO_Relevanssi
in package

Encapsulates the interface with the Relevanssi plugin.

Provides a filter to exclude latex source files (or other attachments specified via their mime types from indexing and search.

Tags
subpackage

O3PO/includes

author

Christian Gogolin o3po@quantum-journal.org

Table of Contents

Methods

exclude_mime_types_by_regexp()  : bool
Filter posts to index by mime type.
index_pdf_attachment_if_not_already_done()  : bool
Index an attached pdf if this has not already been done.

Methods

exclude_mime_types_by_regexp()

Filter posts to index by mime type.

public static exclude_mime_types_by_regexp(bool $block, int $post_id) : bool

To be added to the 'relevanssi_do_not_index' filter.

Parameters
$block : bool

Whether to block this post.

$post_id : int

The ID of the post.

Tags
since
0.3.0
access

public

Return values
bool

index_pdf_attachment_if_not_already_done()

Index an attached pdf if this has not already been done.

public static index_pdf_attachment_if_not_already_done(int $attachment_post_id[, bool $send_file = null ]) : bool
Parameters
$attachment_post_id : int

The ID of the attachment to index.

$send_file : bool = null

Whether to send the file or just the URL (default: false)

Tags
since
0.3.0
access

public

Return values
bool —

Whether the file has been uploaded and indexed.


        
On this page

Search results