Coder Social home page Coder Social logo

1thorarinn / wds-acf-blocks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webdevstudios/wds-acf-blocks

0.0 0.0 0.0 769 KB

A set of custom Gutenberg blocks built with Advanced Custom Fields Pro.

PHP 56.53% JavaScript 6.18% SCSS 37.08% CSS 0.20%

wds-acf-blocks's Introduction

WDS ACF Blocks

With the advent of Gutenberg in WordPress, Advanced Custom Fields stepped up to help make the process of creating custom blocks easier and faster. This plugin creates a set of custom blocks with basic styles for you to customize in your theme.

WebDevStudios. Your Success is Our Mission.

๐Ÿงฑ Available Blocks

This plugin includes the following blocks:

  • Accordion
  • Carousel
  • Call To Action
  • Fifty/Fifty
  • Hero
  • Recent Posts
  • Related Posts

WDS ACF Blocks is bundled with a Style Lint, ESLint, and PHPCS linting rulesets โ€“ plus, it passes both WCAG 2.1AA and Section 508 standards out of the box.

To better manage ACF Field Groups, the plugin supports synchronized JSON for Advanced Custom Fields.

๐Ÿ‘‰ Please visit the WDS ACF Blocks Wiki to learn more about the features of the blocks and how you can create Gutenberg Blocks with ACF.

๐Ÿ“ Requirements

We highly recommend NVM so you can easily switch between Node versions.

๐Ÿ’ป Development

๐Ÿš€ Installation

Clone the repository into wp-content/plugins of a WordPress website:

git clone [email protected]:WebDevStudios/wds-acf-blocks.git

From the command line, change directories:

cd wds-acf-blocks

Install plugin dependencies and trigger an initial build:

npm install

๐Ÿšฆ Workflow

To watch for changes during development, run the following command:

npm run dev

image

To build the production version, execute this command:

npm run build

๐Ÿ›  Linting Commands

Linting rules for JavaScript and SCSS are defined in package.json from line number 40 to 84.

Lint JS:

npm run lint:js

Lint SCSS:

npm run lint:css

Lint PHP:

The PHPCS ruleset is defined in .phpcs.xml.dist. To lint PHP via composer, run the following command:

composer run lint

๐Ÿ‘‰ Important: This plugin uses @wordpress/scripts to lint and compile JavaScript and SCSS.

โœ๏ธ Editing an ACF Block in Gutenberg

To edit an ACF block in Gutenberg, you need to access the settings. Please follow these three simple steps to access the block settings:

โ†’ Step #1

Go to the WordPress admin and open the add new post or edit post screen in Gutenberg.

image

โ†’ Step #2

Click on the add (+) block icon on the top left corner of the screen and search for call to action to add a new Call to Action block to the editor.

image

โ†’ Step #3

Click on the edit (โœ๏ธ) icon that is appearing in the toolbar of the block to access the settings.

image

ACF Block Settings:

image

๐Ÿ“š Developer Documentation

โ†’ Saving ACF JSON Files

By default, saving the ACF blocks to JSON files filter is commented out in the plugin. You can enable this feature by removing the comments from this line: https://github.com/WebDevStudios/wds-acf-blocks/blob/main/inc/hooks.php#L27

To know more about loading and saving of blocks in ACF JSON files, visit the Saving and Loading Blocks section in the Wiki.

โ†’ Important Wiki Links

Please find extensive developer documentation at the following links:

:octocat: Contributing and Support

Your contributions and support tickets are welcome. Please see our guidelines before submitting a pull request.

wds-acf-blocks's People

Contributors

asharirfan avatar coreymcollins avatar gregrickaby avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.