- availability:
-
WPML Version: 3.4.1
- description:
-
- Allows hiding the translation management column based on the post type.
- This filter is working in sync with Screen Options. Therefore, hiding column from Screen Options will have the same effect.
- type:
- filter
- category:
- Miscellaneous
- parameters:
-
add_action( 'wpml_hide_management_column', 'the_callback_function', 10, 2 );
There are two parameters being passed to this action:
- $is_visible
- (bool) Whether or not the translation management column displays.
- $post_type
- (string) The post type.
This filter must return a bool value of $is_visible.
- hook example usage:
-
Example
add_filter( 'wpml_hide_management_column', array( $this, 'my_filter_function' ), 10, 2 ); /** * Hide management column by default for products. * */ function my_filter_function( $is_visible, $post_type ) { if ( 'product' === $post_type ) { $is_visible = false; } return $is_visible; }