Make WordPress Core


Ignore:
Timestamp:
09/30/2024 06:47:20 AM (23 months ago)
Author:
cbravobernal
Message:

Block bindings: Add canUpdateBlockBindings editor setting.

Adds a canUpdateBlockBindings editor setting that allows to decide if the user is able to create and modify bindings through the UI. By default, only admin users can do it, but it can be overridden with block_editor_settings_all filter.

Props santosguillamot, gziolo, jorbin, noisysocks, matveb, cbravobernal, youknowriad, mamaduka, timothyblynjacobs, peterwilsoncc, drivingralle.
Fixes #61945.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-editor.php

    r58798 r59122  
    665665                }
    666666        }
     667
     668        $editor_settings['canUpdateBlockBindings'] = current_user_can( 'edit_block_binding', $block_editor_context );
    667669
    668670        /**
Note: See TracChangeset for help on using the changeset viewer.