Remove Filter
-
Hello,
I love your plugin except the permalink override within the post edit screen is a game changer for us because it creates redirects instead up updating the post’s real permalink. We use the plugin more for category slug overrides.
I’ve found the following filter in class-custom-permalinks-form.php which controls this behavior:
class Custom_Permalinks_Form { ... add_filter( 'get_sample_permalink_html', array( $this, 'custom_permalinks_get_sample_permalink_html' ), 10, 4 ); ...
I have tried to use a remove_filter in functions.php but it’s not working for me. Here are the two snippets I’ve tried:
remove_filter('get_sample_permalink_html', array('Custom_Permalinks_Form', 'custom_permalinks_get_sample_permalink_html'), 10, 4 ); global $Custom_Permalinks_Form; remove_filter( 'get_sample_permalink_html', array($Custom_Permalinks_Form, 'custom_permalinks_get_sample_permalink_html') , 10, 4 );
Can you lend a hand in providing the correct remove_filter snippet so I do not have to edit the core plugin. Thanks kindly in advance!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Remove Filter’ is closed to new replies.