Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #45285, comment 3


Ignore:
Timestamp:
11/05/2018 08:25:51 AM (6 years ago)
Author:
websupporter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #45285, comment 3

    v1 v2  
    11#45282 seems to fix this problem currently as well, at least
    2 ```
     2
     3{{{#!php
    34$hidden_class = ( ! $screen->is_block_editor() && in_array( $box['id'], $hidden ) ) ? ' hide-if-js' : '';
    4 ```
     5}}}
    56
    67seems to be another solution to it. This effectively would mean to not take `get_hidden_meta_boxes()` into account. So, this function from now on serves only on \WP_Screens which do not serve Gutenberg.
     
    1516
    1617Given this usage:
    17 ```
     18{{{#!php
     19<?php
    1820 add_filter(
    1921        'hidden_meta_boxes',
     
    2224        }
    2325 );
    24 ```
     26}}}
    2527
    2628What `hidden_meta_boxes` did for the old editor was essentially always hide the custom fields box unless the author enabled it again. In this case for this page view, it would be visible again and would be hidden, once he clicks update again. Currently I can't see a really good use case for this and maybe Gutenberg is a good opportunity to say, we say goodbye to this behavior.