We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple_history/log_query_inner_where
This was probably removed when doing the big sql query rewrite #409
Related: #341
The text was updated successfully, but these errors were encountered:
ffebfa9
The format has changed, so the inner query can be modified with a new filter:
// Modify query so it returns nothing. add_filter('simple_history/log_query_inner_where_array', function($inner_where, $args) { $inner_where[] = "1 = 0"; return $inner_where; }, 10, 2);
Sorry, something went wrong.
Nice, thank you, working ok!
add_filter( 'simple_history/log_query_inner_where_array', function( $inner_where, $args ) { $simple_history = \Simple_History\Simple_History::get_instance(); $contexts_table_name = $simple_history->get_contexts_table_name(); $inner_where[] = sprintf( 'id IN ( SELECT history_id FROM %1$s AS c WHERE c.key = "_user_id" AND c.value != "%2$s" )', $contexts_table_name, 1 ); $inner_where[] = sprintf( 'id IN ( SELECT history_id FROM %1$s AS c WHERE c.key = "post_type" AND c.value IN ("%2$s") )', $contexts_table_name, implode( '","', array( 'post', 'page', 'event' ) ) ); return $inner_where; }, 10, 2 );
bonny
No branches or pull requests
This was probably removed when doing the big sql query rewrite
#409
Related: #341
The text was updated successfully, but these errors were encountered: