WPML
add_action( 'wpml_hide_management_column', 'the_callback_function', 10, 2 );
Type
filter
Category
Miscellaneous
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.

Arguments

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.

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

icl_ls_languages, wpml_sync_custom_field_copied_value, wpml_ls_enable_ajax_navigation, wpml_element_type, wpml_setting, wpml_sub_setting, wpml_exclude_post_from_auto_translate, wpml_forms_config_ninja-forms, wpml_forms_config_wpforms, wpml_tf_feedback_open_link

All 30 Miscellaneous hooks →