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

Develop acf-field/acf-field block #1

Closed
5 tasks done
bobbingwide opened this issue Jun 10, 2023 · 1 comment
Closed
5 tasks done

Develop acf-field/acf-field block #1

bobbingwide opened this issue Jun 10, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jun 10, 2023

This issue is to extract the acf-field block logic from oik-testimonials to this new plugin.

Background

  • For oik-testimonials' integration with ACF I first developed a version which would use ACF's logic rather than oik-field's logic.
  • I then developed shortcodes to display testimonials using fields defined using ACF.
  • Next I developed an acf-cycler block.
  • And then I started developing an acf-field block to display
    see Add generic ACF block to display any field oik-testimonials#7

After a while I realised that the acf-field block should be a single block plugin that didn't come with the oik-testimonials and acf-cycler baggage. So I cloned the oik-testimonials plugin to acf-field-block.

Requirements

  • Develop a single block plugin to deliver an acf-field block
  • The field block should be able to display any ACF field type associated with any block editor enabled post type.
  • The block should be extensible, allowing other plugins or themes to provide their own rendering for a field.
  • The block should provide many of the supports attributes
  • Optionally the block could deliver several styles
  • The plugin should be developed to WordPress coding guidelines

Proposed solution

  • The oik-testimonials/acf-field block will be renamed to acf-field/acf-field
  • The unrequired logic for oik-testimonials should be deleted
  • The field types not yet supported at the time of cloning should be added
  • Refactor the functions to use an ACF_Field class
  • Add hooks to enable plugins to extend the functionality
@bobbingwide
Copy link
Owner Author

I'm going to close this issue now.

  • There are several other issues to develop support for the different field types that I hadn't attempted.
  • While trying to develop PHP Unit Tests I noticed problems with the logic to determine the list of fields to be displayed.
  • One is to do with the use of the Clone field type.
  • These problems will be addressed in separate issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant