Fix constant check to index pdf #245

This commit is contained in:
Leo Germani 2019-09-20 09:10:00 -03:00
parent bc2afecc3a
commit 4bdfb304e5
1 changed files with 4 additions and 3 deletions

View File

@ -233,10 +233,11 @@ class Media {
public function index_pdf_content($file, $item_id) {
$content_index_meta = '_document_content_index';
if (defined('TAINACAN_CONTENT_PDF_INDEX_METADATA')) {
$content_index_meta = TAINACAN_CONTENT_PDF_INDEX_METADATA;
if ( ! defined('TAINACAN_INDEX_PDF_CONTENT') || true !== TAINACAN_INDEX_PDF_CONTENT ) {
return;
}
$content_index_meta = '_document_content_index';
if ($file == null) {
$meta_id = update_post_meta( $item_id, $content_index_meta, null );