Skip to content

Commit

Permalink
Merge pull request #5 from colorful-tones/release/0.1.3-prep
Browse files Browse the repository at this point in the history
Release/0.1.3 prep
  • Loading branch information
colorful-tones committed Sep 25, 2023
2 parents 9c2ac5b + f772648 commit 67b0b59
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ __Required__ You must have [ACF PRO](https://https://www.advancedcustomfields.co

## Changelog

### 0.1.3 – 2023-09-25

- Restrict access to block locking based on email domain with `demo_acf_show_admin()` check.
- Improve usage of `get_block_wrapper_attributes()` for Phone block based on [Liam's Tweet thread](https://x.com/lgladdy/status/170011422420935dd).
- Add `background` and `text` color supports to Phone block.

### 0.1.2 – 2023-08-29

Added example of restricting access to ACF admin screens based on role && email domain, example: `yourAgency.com`. So builders can limit admin screens for their clients. See: `includes/acf-restrict-access.php`
Expand Down
4 changes: 2 additions & 2 deletions demo-acf-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: A demo WordPress plugin for custom ACF PRO Blocks, Post Types, Options Pages, Taxonomies and more.
* Requires at least: 6.3
* Requires PHP: 7.4
* Version: 0.1.2
* Version: 0.1.3
* Author: ACF
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand All @@ -14,7 +14,7 @@
*/

// Define our handy constants.
define( 'DEMO_ACF_VERSION', '0.1.2' );
define( 'DEMO_ACF_VERSION', '0.1.3' );
define( 'DEMO_ACF_PLUGIN_DIR', __DIR__ );
define( 'DEMO_ACF_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'DEMO_ACF_PLUGIN_BLOCKS', DEMO_ACF_PLUGIN_DIR . '/blocks/' );
Expand Down
2 changes: 1 addition & 1 deletion includes/acf-restrict-access.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @since 0.1.2
*/
function demo_acf_show_admin() {
function demo_acf_show_acf_admin() {
// If our user can manage site options.
if ( current_user_can( 'manage_options' ) ) {
$user = wp_get_current_user();
Expand Down
12 changes: 6 additions & 6 deletions includes/acf-settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ function () {
// Add 'Contact Information' field group with Phone field.
acf_add_local_field_group(
array(
'key' => 'demo_acf_contact_information',
'key' => 'group_6511a57f5680c',
'title' => 'Contact Information',
'fields' => array(
array(
'key' => 'demo_acf_phone_number',
'key' => 'field_6511a57fcbe7e',
'label' => 'Phone Number',
'name' => 'demo_acf_phone_number',
'type' => 'text',
Expand All @@ -54,19 +54,19 @@ function () {

acf_add_local_field_group(
array(
'key' => 'demo_acf_notification_bar',
'key' => 'group_6511a5e8c1c15',
'title' => 'Notification Bar',
'fields' => array(
array(
'key' => 'demo_acf_notification_bar_group',
'key' => 'field_6511a5e897814',
'label' => 'Notification Bar',
'name' => 'demo_acf_notification_bar_group',
'aria-label' => '',
'type' => 'group',
'layout' => 'row',
'sub_fields' => array(
array(
'key' => 'demo_acf_notification_onoff',
'key' => 'field_6511a5f597815',
'label' => 'Notification On/Off',
'name' => 'demo_acf_notification_onoff',
'type' => 'true_false',
Expand All @@ -77,7 +77,7 @@ function () {
'ui' => 1,
),
array(
'key' => 'demo_acf_notification_message',
'key' => 'field_6511a5f597816',
'label' => 'Notification Message',
'name' => 'demo_acf_notification_message',
'type' => 'textarea',
Expand Down

0 comments on commit 67b0b59

Please sign in to comment.