Skip to content

Commit

Permalink
Merge pull request #7 from colorful-tones/fix/restrict-access
Browse files Browse the repository at this point in the history
馃悰 FIX: Misnamed function calls cause Fatal errors
  • Loading branch information
colorful-tones committed Oct 20, 2023
2 parents 67b0b59 + 9a79c75 commit 25e34ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/acf-restrict-access.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
add_filter( 'acf/settings/show_admin', 'demo_acf_show_acf_admin' );
/**
* Filters the settings to pass to the block editor for all editor type.
*
* @link https://developer.wordpress.org/reference/hooks/block_editor_settings_all/
*/
add_filter( 'block_editor_settings_all', 'demo_acf_restrict_locking_ui', 10, 2 );
Expand All @@ -33,6 +34,7 @@ function demo_acf_show_acf_admin() {
$allowed_email_domains = array(
'advancedcustomfields.com',
'wpengine.com',
'wpengine.local',
);

// Make sure we have a WP_User object and email address.
Expand All @@ -57,8 +59,8 @@ function demo_acf_show_acf_admin() {
*
* @since 0.1.3
*/
function example_theme_restrict_locking_ui( $settings ) {
$settings['canLockBlocks'] = demo_acf_show_admin();
function demo_acf_restrict_locking_ui( $settings ) {
$settings['canLockBlocks'] = demo_acf_show_acf_admin();

return $settings;
}

0 comments on commit 25e34ef

Please sign in to comment.