Skip to main contentSkip to footer

Removing Relevanssi from the quick edit

Relevanssi Premium adds Relevanssi tools to post edit pages and in the quick edit box. If you want to disable these, there’s an option to hide both. But what if you want to keep the Relevanssi tools on the edit pages, but want to remove them from the quick edit?

The option removes both, but there’s a solution. The quick edit features are added with the WordPress filter hook quick_edit_custom_box and can be removed by unhooking the Relevanssi function from that hook. You can do this with this little snippet:

add_action( 'init', function() {
	remove_filter( 'quick_edit_custom_box', 'relevanssi_quick_edit_custom_box' );
}, 11);

Add this to your site, and the quick edit features will be gone.

It’s important to wrap the remove_filter() in the init action, because otherwise this will have no effect if you put this code in your theme. Theme code runs before plugin code, so you’d first remove the filter and then Relevanssi would add it. Relevanssi adds the filter in an init action on priority 10, so the priority 11 on init action is the first possible time to remove it.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

WooCommerce: Searching for orders
Searching for shop orders is tricky with WooCommerce. WooCommerce blocks searching the orders. WooCommerce also keeps the order data in…
Different fuzzy search setting on different searches

…for example, “none” when you’re doing an employee/department search. For example, you can set a global variable before the relevanssi_do_query(), like this: global $relevanssi_disable_fuzzy; $relevanssi_disable_fuzzy = true; relevanssi_do_query( $args ); Then use that global variable as a trigger: add_filter( ‘pre_option_relevanssi_fuzzy’, ‘rlv_disable_fuzzy’ ); function rlv_disable_fuzzy( $value ) { global $relevanssi_disable_fuzzy; if……it on the employees/department search? Yes, you can, but it takes some hacking. Since Relevanssi has just one setting for the fuzzy search, you need to change it on the fly for one of the searches. It’s probably easier to do with the relevanssi_do_query() search. Relevanssi reads the fuzzy search……setting from the relevanssi_fuzzy option. WordPress provides you with pre_option_relevanssi_fuzzy filter you can use to change the value. The values are “always” and “sometimes”, and everything else counts as none. So, set the setting to always from Relevanssi settings, and then add a filter function that sets the value to,…

bbPress: Private Groups support
Private Groups is a plugin that makes bbPress forum groups private. Relevanssi, however, doesn’t understand that privacy and will show…

Related Posts:

Currently there are no related posts available.

Comment Section:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed