\O3PO_Relevanssi

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.

Summary

Methods
Properties
Constants
exclude_mime_types_by_regexp()
index_pdf_attachment_if_not_already_done()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

exclude_mime_types_by_regexp()

exclude_mime_types_by_regexp(boolean  $block, integer  $post_id) : boolean

Filter posts to index by mime type.

To be added to the 'relevanssi_do_not_index' filter.

Parameters

boolean $block

Whether to block this post.

integer $post_id

The ID of the post.

Returns

boolean

index_pdf_attachment_if_not_already_done()

index_pdf_attachment_if_not_already_done(integer  $attachment_post_id, boolean  $send_file = null) : boolean

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

Parameters

integer $attachment_post_id

The ID of the attachment to index.

boolean $send_file

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

Returns

boolean —

Whether the file has been uploaded and indexed.