Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove parsed PDF content when rebuilding SearchWP index
<?php
// Remove parsed PDF content when rebuilding SearchWP index.
add_action( 'searchwp\index\rebuild', function() {
global $wpdb;
$wpdb->delete( $wpdb->prefix . 'postmeta', array( 'meta_key' => SEARCHWP_PREFIX . 'content' ) );
$wpdb->delete( $wpdb->prefix . 'postmeta', array( 'meta_key' => SEARCHWP_PREFIX . 'pdf_metadata' ) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.