WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/03/2018 07:56:28 AM (3 years ago)
Author:
pento
Message:

Build Tools: Update the @wordpress packages.

This brings support for the custom fields meta box to the block editor.

The webpack and copy-webpack-plugin packages have also been updated.

See #45145.
Fixes #45257.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/post.php

    r43815 r43861  
    281281    exit();
    282282
     283case 'toggle-custom-fields':
     284    check_admin_referer( 'toggle-custom-fields' );
     285
     286    $current_user_id = get_current_user_id();
     287    if ( $current_user_id ) {
     288        $enable_custom_fields = (bool) get_user_meta( $current_user_id, 'enable_custom_fields', true );
     289        update_user_meta( $current_user_id, 'enable_custom_fields', ! $enable_custom_fields );
     290    }
     291
     292    wp_safe_redirect( wp_get_referer() );
     293    exit();
     294
    283295default:
    284296    /**
Note: See TracChangeset for help on using the changeset viewer.