Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Thomas

Column edit & FacetWP indexer

Hi there,

Using the edit column fields feature of Admin Columns Pro doesn’t trigger the FacetWP indexer. As this filter plugin is rather popular it would be nice to add support for that. Otherwise, you have to manually open and update each post.

Cheers,
Thomas

5 years, 10 months ago
Stefan van den Dungen Gronovius
Developer

Hi Thomas,

You can use the following hook to trigger the indexer yourself.

acp/editing/saved

Based on the documentation of FacetWP, the hook should look something like this.
Not tested!

/**
 * Updates the post modified data after inline edit
 *
 * @param AC_Column $column Column instance
 * @param int $id Item ID
 * @param string $value User submitted input
 */
function acp_trigger_facet_wp_indexer_after_acp_edit( $column, $id ) {
	if( 'post' === $column->get_list_screen()->get_meta_type() ){
		FWP()->indexer->index( $id );
	}
}
add_action( 'acp/editing/saved', 'acp_trigger_facet_wp_indexer_after_acp_edit', 10, 2 );
5 years, 10 months ago

You must be logged in to reply to this topic.