Create component
Cli allows you to create a component for loonar-wp theme.
Component init
- Run
loonar create-componentorloonar create-component NAME - Provide answers to the questions
Questions with description
- Name - component name
- Scripts
- JavaScript
- Typescript - choose only if your compiler is adapted to use ts files
- None - file will not be created
- PHP (functions.php file)
- With fields - file with
add_filterfor ACF fields - With component data - file with
add_filterfor component data - With fields & component data - file with two above
add_filter - Default - file with only namespace added