facetwp index new media

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php

/** add image indexing on initial upload */
add_action( ‘add_attachment’, function( $post_ID) {
FWP()->indexer->index( $post_ID );
} );
{{/gist}}