WPML
add_action( 'wpml_hide_management_column', 'the_callback_function', 10, 2 );
类型
filter
类别
杂项
WPML 版本
3.4.1

说明

  • 允许根据文章类型隐藏翻译管理列。
  • 此过滤器与显示选项同步。因此,从“显示选项”中隐藏列将产生相同的效果。

参数

传递给此操作的参数有两个:

$is_visible

(bool) 翻译管理列是否显示。

$post_type

(string) 文章类型。

此过滤器必须返回$is_visible的 bool 值。

使用示例

示例
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

所有 30 个 杂项 钩子 →