add_action( 'wpml_hide_management_column', 'the_callback_function', 10, 2 );
- Tipo
- filter
- Categoria
- Diversos
- Versão do WPML
- 3.4.1
Descrição
- Permite ocultar a coluna de gerenciamento de tradução com base no tipo de post.
- Este filtro funciona em sincronia com as Opções de tela. Portanto, ocultar a coluna nas Opções de tela terá o mesmo efeito.
Argumentos
Dois parâmetros são passados para esta ação:- $is_visible
- (bool) Se a coluna do Gerenciamento de tradução é exibida ou não.
- $post_type
- (string) O tipo de post.
Este filtro deve retornar um valor bool de $is_visible.
Exemplo de uso
Exemplo
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;
}
Hooks relacionados
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