Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 9.1.4 #429

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
iruzevic marked this conversation as resolved.
Show resolved Hide resolved
'default' => '{}',
]
);
}
Expand Down