• Resolved krystianj

    (@krystianj)


    Hi,
    I trying to hide column by setting update_user_meta but I dont know what name I must use

    My code is
    update_user_meta( $user_id, 'pll_filter_content', 'language_en' );
    is this is a good way?

    On databse I see that metakey name is “manageedit-postcolumnshidden”
    So I think the code must be something like this ???
    update_user_meta( $user_id, 'manageedit-postcolumnshidden', '???' );

    • This topic was modified 7 years, 9 months ago by krystianj.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Chouby

    (@chouby)

    Hi,

    You can add the language columns in the screen options on top right of your admin screen (but the content would not be filtered).
    Your code would rather be:

    
    update_user_meta( $user_id, 'pll_filter_content', 'en' );
    Thread Starter krystianj

    (@krystianj)

    Hi,
    Thank you very much. It’s working ??

    I have one more question how I can add more languges to hidden? For example: en,cs,de ?

    Thread Starter krystianj

    (@krystianj)

    I don’t know if this is best method but I resolve my problem by this code:

    $languages_list = pll_languages_list();
     foreach ($languages_list as &$value) {
      $value = 'language_'.$value;
     }
     unset($value);
     update_user_meta( $user_id, 'manageedit-postcolumnshidden', $languages_list );
    • This reply was modified 7 years, 9 months ago by krystianj.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘update_user_meta to hide language column’ is closed to new replies.