Skip to content

Commit

Permalink
release 9.1.4 (#429)
Browse files Browse the repository at this point in the history
* updating bug for theme options

* Apply suggestions from code review

Co-authored-by: Goran Alković <77000136+goranalkovic-infinum@users.noreply.github.com>

---------

Co-authored-by: Goran Alković <77000136+goranalkovic-infinum@users.noreply.github.com>
  • Loading branch information
iruzevic and goranalkovic-infinum committed Sep 19, 2024
1 parent 53a9b74 commit ca054a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

## [9.1.4]

### Fixed
- Theme options settings are now saved as string and not as object.

## [9.1.3]

### Fixed
Expand Down Expand Up @@ -648,6 +653,7 @@ Init setup

[Unreleased]: https://github.com/infinum/eightshift-libs/compare/main...HEAD

[9.1.4]: https://github.com/infinum/eightshift-libs/compare/9.1.3...9.1.4
[9.1.3]: https://github.com/infinum/eightshift-libs/compare/9.1.2...9.1.3
[9.1.2]: https://github.com/infinum/eightshift-libs/compare/9.1.1...9.1.2
[9.1.1]: https://github.com/infinum/eightshift-libs/compare/9.1.0...9.1.1
Expand Down
28 changes: 3 additions & 25 deletions src/ThemeOptions/ThemeOptionsExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,13 @@ public function register(): void
*/
public function addRbHfSettings(): void
{
$default = [
'header' => null,
'footer' => null,
];

$schema = [
'type' => 'object',
'properties' => [
'header' => [
'type' => 'string',
],
'footer' => [
'type' => 'string',
],
'fourOhFour' => [
'type' => 'string',
],
],
];

\register_setting(
'options',
self::OPTION_NAME,
[
'type' => 'object',
'default' => $default,
'show_in_rest' => [
'schema' => $schema,
],
'type' => 'string',
'show_in_rest' => true,
'default' => '{}',
]
);
}
Expand Down

0 comments on commit ca054a6

Please sign in to comment.