Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 FIX: Misnamed function calls cause Fatal errors #7

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}