Skip to content

Commit a9edfca

Browse files
author
Amanda
committed
Show in rest option to Group
1 parent 41b2202 commit a9edfca

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [1.37.2] - 2022-11-04
8+
9+
### Added
10+
11+
- Show in rest option to Group.
12+
713
## [1.37.1] - 2022-04-07
814

915
### Fixed

src/Group.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ class Group implements GroupableInterface {
9999
*/
100100
protected $active;
101101

102+
/**
103+
* Field group show in rest status
104+
*
105+
* @var boolean
106+
*/
107+
protected $show_in_rest;
108+
102109
/**
103110
* Is field group registered yet
104111
*
@@ -118,6 +125,8 @@ public function __construct( string $title, string $key = null ) {
118125
$this->key = $key;
119126

120127
$this->active = 1;
128+
129+
$this->show_in_rest = 0;
121130
}
122131

123132
/**
@@ -475,6 +484,17 @@ public function deactivate() {
475484
return $this;
476485
}
477486

487+
/**
488+
* Change the field group's show in rest status to active.
489+
*
490+
* @return self
491+
*/
492+
public function show_in_rest() {
493+
$this->show_in_rest = 1;
494+
495+
return $this;
496+
}
497+
478498
/**
479499
* Register the field group to ACF.
480500
*

0 commit comments

Comments
 (0)