Skip to content

Commit

Permalink
3.2.0 (#87)
Browse files Browse the repository at this point in the history
* JS build updates

* Extended ACF update

* Switch WordPlate namespace

* Theme version

* JS package changes

* More WordPlate > Extended ACF changes

* Ignore reqs on install

* Missed namespace

* Formatting

* New vite, packages
  • Loading branch information
gojsse authored Sep 7, 2023
1 parent 8c57be2 commit f60c021
Show file tree
Hide file tree
Showing 24 changed files with 277 additions and 254 deletions.
9 changes: 4 additions & 5 deletions App/Fields/FieldGroups/PageBuilderFieldGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

namespace MC\App\Fields\FieldGroups;

use Extended\ACF\Location;
use Extended\ACF\Fields\FlexibleContent;
use MC\App\Fields\Layouts\Carousel;
use MC\App\Fields\Layouts\ContentArea;
use MC\App\Fields\Layouts\Hero;
use MC\App\Fields\Layouts\Image;
use MC\App\Fields\FieldGroups\RegisterFieldGroups;

use WordPlate\Acf\Location;
use WordPlate\Acf\Fields\FlexibleContent;

/**
* Class PageBuilderFieldGroup
*
Expand All @@ -19,15 +18,15 @@
class PageBuilderFieldGroup extends RegisterFieldGroups
{
/**
* Register Field Group via Wordplate
* Register Field Group via Extended ACF
*/
public function registerFieldGroup()
{
register_extended_field_group([
'title' => __('Page Builder', 'mc-starter'),
'fields' => $this->getFields(),
'location' => [
Location::if('page_template', 'templates/page-builder.php')
Location::where('page_template', 'templates/page-builder.php')
],
'style' => 'default'
]);
Expand Down
2 changes: 1 addition & 1 deletion App/Fields/FieldGroups/RegisterFieldGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function addHooks()
}

/**
* Register Field Group via WordPlate
* Register Field Group via Extended ACF
*/
abstract public function registerFieldGroup();

Expand Down
6 changes: 3 additions & 3 deletions App/Fields/FieldGroups/SiteOptionsFieldGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace MC\App\Fields\FieldGroups;

use WordPlate\Acf\Location;
use Extended\ACF\Location;
use MC\App\Fields\Options\Branding;
use MC\App\Fields\Options\Scripts;

Expand All @@ -14,15 +14,15 @@
class SiteOptionsFieldGroup extends RegisterFieldGroups
{
/**
* Register Field Group via Wordplate
* Register Field Group via Extended ACF
*/
public function registerFieldGroup()
{
register_extended_field_group([
'title' => __('Site Options', 'mc-starter'),
'fields' => $this->getFields(),
'location' => [
Location::if('options_page', 'theme-general-options')
Location::where('options_page', 'theme-general-options')
],
'style' => 'default'
]);
Expand Down
18 changes: 9 additions & 9 deletions App/Fields/Layouts/Carousel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace MC\App\Fields\Layouts;

use WordPlate\Acf\Fields\ButtonGroup;
use WordPlate\Acf\Fields\Image as WPImage;
use WordPlate\Acf\Fields\Layout;
use WordPlate\Acf\Fields\Repeater;
use WordPlate\Acf\Fields\Select;
use Extended\ACF\Fields\ButtonGroup;
use Extended\ACF\Fields\Image as WPImage;
use Extended\ACF\Fields\Layout;
use Extended\ACF\Fields\Repeater;
use Extended\ACF\Fields\Select;

/**
* Class Carousel
Expand All @@ -24,16 +24,16 @@ public function fields()
{
return apply_filters(
'mc/layout/carousel',
Layout::make(__('Carousel'), 'carousel')
Layout::make(__('Carousel', 'mc-starter'), 'carousel')
->layout('block')
->fields([
$this->contentTab(),
Repeater::make(__('Carousel Items'))
Repeater::make(__('Carousel Items', 'mc-starter'), 'carousel-items')
->layout('block')
->min(1)
->buttonLabel(__('Add Item'))
->buttonLabel(__('Add Item', 'mc-starter'))
->fields([
WPImage::make('Image')
WPImage::make(__('Image', 'mc-starter'), 'image')
->returnFormat('array'),
]),
$this->optionsTab(),
Expand Down
12 changes: 6 additions & 6 deletions App/Fields/Layouts/ContentArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace MC\App\Fields\Layouts;

use WordPlate\Acf\Fields\Layout;
use WordPlate\Acf\Fields\WysiwygEditor;
use WordPlate\Acf\Fields\Textarea;
use Extended\ACF\Fields\Layout;
use Extended\ACF\Fields\WysiwygEditor;
use Extended\ACF\Fields\Textarea;

/**
* Class ContentArea
Expand All @@ -22,13 +22,13 @@ public function fields()
{
return apply_filters(
'mc/layout/content-area',
Layout::make(__('Content Area', 'mc-starter'))
Layout::make(__('Content Area', 'mc-starter'), 'content-area')
->layout('block')
->fields([
$this->contentTab(),
Textarea::make(__('Headline', 'mc-starter'))
Textarea::make(__('Headline', 'mc-starter'), 'headline')
->rows(2),
WysiwygEditor::make(__('Content', 'mc-starter'))
WysiwygEditor::make(__('Content', 'mc-starter'), 'content')
->mediaUpload(false)
])
);
Expand Down
34 changes: 17 additions & 17 deletions App/Fields/Layouts/Hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace MC\App\Fields\Layouts;

use WordPlate\Acf\Fields\Link;
use WordPlate\Acf\Fields\Group;
use WordPlate\Acf\Fields\Image;
use WordPlate\Acf\Fields\Layout;
use WordPlate\Acf\Fields\Select;
use WordPlate\Acf\Fields\WysiwygEditor;
use WordPlate\Acf\Fields\Textarea;
use WordPlate\Acf\Fields\ColorPicker;
use Extended\ACF\Fields\Link;
use Extended\ACF\Fields\Group;
use Extended\ACF\Fields\Image;
use Extended\ACF\Fields\Layout;
use Extended\ACF\Fields\Select;
use Extended\ACF\Fields\WysiwygEditor;
use Extended\ACF\Fields\Textarea;
use Extended\ACF\Fields\ColorPicker;

/**
* Class Hero
Expand All @@ -31,20 +31,20 @@ public function fields()
->layout('block')
->fields([
$this->contentTab(),
Textarea::make(__('Headline', 'mc-starter'))
Textarea::make(__('Headline', 'mc-starter'), 'headline')
->rows(2),
WysiwygEditor::make(__('Content', 'mc-starter'))
WysiwygEditor::make(__('Content', 'mc-starter'), 'content')
->mediaUpload(false),
Link::make(__('Button', 'mc-starter'))
Link::make(__('Button', 'mc-starter'), 'button')
->returnFormat('array'),
$this->optionsTab(),
Group::make(__('Background', 'mc-starter'))
Group::make(__('Background', 'mc-starter'), 'background')
->layout('block')
->fields([
Image::make(__('Image', 'mc-starter'))
Image::make(__('Image', 'mc-starter'), 'image')
->previewSize('thumbnail'),
ColorPicker::make(__('Color', 'mc-starter')),
Select::make(__('Repeat', 'mc-starter'))
ColorPicker::make(__('Color', 'mc-starter'), 'color'),
Select::make(__('Repeat', 'mc-starter'), 'repeat')
->choices([
'no-repeat' => __('No Repeat', 'mc-starter'),
'repeat' => __('Repeat', 'mc-starter'),
Expand All @@ -56,7 +56,7 @@ public function fields()
->wrapper([
'width' => '33.33'
]),
Select::make(__('Position', 'mc-starter'))
Select::make(__('Position', 'mc-starter'), 'position')
->choices([
'left top' => __('Left / Top', 'mc-starter'),
'left center' => __('Left / Center', 'mc-starter'),
Expand All @@ -73,7 +73,7 @@ public function fields()
->wrapper([
'width' => '33.33'
]),
Select::make(__('Size', 'mc-starter'))
Select::make(__('Size', 'mc-starter'), 'size')
->choices([
'auto auto' => __('Auto', 'mc-starter'),
'cover' => __('Cover', 'mc-starter'),
Expand Down
8 changes: 4 additions & 4 deletions App/Fields/Layouts/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace MC\App\Fields\Layouts;

use WordPlate\Acf\Fields\Image as WPImage;
use WordPlate\Acf\Fields\Layout;
use Extended\ACF\Fields\Image as WPImage;
use Extended\ACF\Fields\Layout;

/**
* Class Image
Expand All @@ -21,11 +21,11 @@ public function fields()
{
return apply_filters(
'mc/layout/image',
Layout::make('Image')
Layout::make(__('Image', 'mc-starter'), 'image')
->layout('block')
->fields([
$this->contentTab(),
WPImage::make('Image')
WPImage::make(__('Image', 'mc-starter'), 'image')
->returnFormat('array')
])
);
Expand Down
3 changes: 1 addition & 2 deletions App/Fields/Layouts/Layouts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

namespace MC\App\Fields\Layouts;

use MC\App\Fields\ACF;
use WordPlate\Acf\Fields\Tab;
use Extended\ACF\Fields\Tab;

/**
* Class Layouts
Expand Down
8 changes: 4 additions & 4 deletions App/Fields/Options/Branding.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace MC\App\Fields\Options;

use WordPlate\Acf\Fields\Tab;
use WordPlate\Acf\Fields\Image;
use Extended\ACF\Fields\Tab;
use Extended\ACF\Fields\Image;

/**
* Class Branding
Expand All @@ -22,9 +22,9 @@ public function fields()
return apply_filters(
'mc/options/branding',
[
Tab::make('Branding')
Tab::make(__('Branding', 'mc-starter'))
->placement('left'),
Image::make('Site Logo')
Image::make(__('Site Logo', 'mc-starter'), 'site-logo')
->returnFormat('array')
->previewSize('thumbnail')
]
Expand Down
4 changes: 2 additions & 2 deletions App/Fields/Options/Scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace MC\App\Fields\Options;

use WordPlate\Acf\Fields\Tab;
use WordPlate\Acf\Fields\Textarea;
use Extended\ACF\Fields\Tab;
use Extended\ACF\Fields\Textarea;

/**
* Class Scripts
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Versions

## [3.2.0] - 2023-09-07

### Changed

- Add postcss to meet other peer dependencies
- Update Extended ACF to latest

## [3.1.9] - 2023-07-28

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Starter WordPress theme. Features [UIKit](https://getuikit.com/docs/introduction), SCSS compiler, TS/JS linting and minifying, and class-based functions.php

Requires a minimum of WordPress 6.0, PHP 8.0, and Composer 2
Requires a minimum of WordPress 6.2, PHP 8.2, and Composer 2

MC Starter Theme is built with **Composer** and **Vite** usage in mind and is the recommended way to use this theme.

Expand Down
2 changes: 1 addition & 1 deletion components/modules/content-area.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use MC\App\Fields\Util;

$headline = ACF::getField('headline', $data);
$content = ACF::getField('content', $data);
$content = ACF::getField('content', $data);

do_action('mc/modules/styles', $row_id, $data);
?>
Expand Down
4 changes: 2 additions & 2 deletions components/modules/hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
use MC\App\Fields\Util;

$headline = ACF::getField('headline', $data);
$content = ACF::getField('content', $data);
$button = ACF::getField('button', $data);
$content = ACF::getField('content', $data);
$button = ACF::getField('button', $data);

do_action('mc/modules/styles', $row_id, $data);
?>
Expand Down
2 changes: 1 addition & 1 deletion components/modules/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*/

use MC\App\Fields\ACF;
use MC\App\Media;
use MC\App\Fields\Util;
use MC\App\Media;

$image = ACF::getField('image', $data);

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
},
"require": {
"vinkla/extended-acf": "11.2"
"vinkla/extended-acf": "^13.7.1"
},
"require-dev": {
"php-stubs/acf-pro-stubs": "*"
Expand Down
Loading

0 comments on commit f60c021

Please sign in to comment.