WPML
SignaturePHP
add_action( 'wpml_hide_management_column', 'the_callback_function', 10, 2 );

Description

  • Allows hiding the translation management column based on the post type.
  • This filter is working in sync with Screen Options (opens in a new tab). Therefore, hiding column from Screen Options will have the same effect.

Arguments

There are two parameters being passed to this action:

  • $is_visiblebool

    Whether or not the translation management column displays.
  • $post_typestring

    The post type.


This filter must return a bool value of $is_visible.

Example Usage

PHP
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;
}