Skip to content

Commit

Permalink
Themes Admin 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Aug 5, 2020
1 parent f9de4b6 commit 7187132
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.1.0"></a>
# [1.1.0](https://github.com/flextype-plugins/themes-admin/compare/v1.0.6...v1.1.0) (2020-08-05)

### Features

* **core** update code base for new Flextype 0.9.9

<a name="1.0.6"></a>
# [1.0.6](https://github.com/flextype-plugins/themes-admin/compare/v1.0.5...v1.0.6) (2020-06-23)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">Themes Admin Plugin for <a href="https://flextype.org/">Flextype</a></h1>

<p align="center">
<a href="https://github.com/flextype-plugins/themes-admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/themes-admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/themes-admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/themes-admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/themes-admin/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.8-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-themes-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-themes-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/themes-admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/themes-admin.svg?branch=dev" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&color=black&label=Discord%20Chat" alt="Discord"></a>
<a href="https://github.com/flextype-plugins/themes-admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/themes-admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/themes-admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/themes-admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/themes-admin/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.9-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-themes-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-themes-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/themes-admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/themes-admin.svg?branch=dev" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&color=black&label=Discord%20Chat" alt="Discord"></a>
</p>

Themes Admin plugin to manage site themes for the website frontend.
Expand All @@ -12,7 +12,7 @@ The following dependencies need to be installed for Themes Admin Plugin.

| Item | Version | Download |
|---|---|---|
| [flextype](https://github.com/flextype/flextype) | 0.9.8 | [download](https://github.com/flextype/flextype/releases) |
| [flextype](https://github.com/flextype/flextype) | 0.9.9 | [download](https://github.com/flextype/flextype/releases) |
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
| [admin](https://github.com/flextype-plugins/icon) | >=1.0.0 | [download](https://github.com/flextype-plugins/admin/releases) |
| [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) |
Expand Down
8 changes: 4 additions & 4 deletions app/Controllers/ThemesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ public function activateProcess(Request $request, Response $response) : Response
$post_data = $request->getParsedBody();

$custom_settings_file = PATH['project'] . '/config/plugins/site/settings.yaml';
$custom_settings_file_data = $this->serializer->decode(Filesystem::read($custom_settings_file), 'yaml');
$custom_settings_file_data = $this->yaml->decode(Filesystem::read($custom_settings_file));

Arrays::set($custom_settings_file_data, 'theme', $post_data['theme-id']);

Filesystem::write($custom_settings_file, $this->serializer->encode($custom_settings_file_data, 'yaml'));
Filesystem::write($custom_settings_file, $this->yaml->encode($custom_settings_file_data));

// clear cache
$this->cache->clear('doctrine');
$this->cache->purge('doctrine');

// Redirect to themes index page
return $response->withRedirect($this->router->pathFor('admin.themes.index'));
Expand Down Expand Up @@ -105,7 +105,7 @@ public function information(Request $request, Response $response) : Response
[
'menu_item' => 'themes',
'id' => $id,
'theme_manifest' => $this->serializer->decode($custom_theme_manifest_file_content, 'yaml'),
'theme_manifest' => $this->yaml->decode($custom_theme_manifest_file_content),
'links' => [
'themes' => [
'link' => $this->router->pathFor('admin.themes.index'),
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"issues": "https://github.com/flextype-plugins/themes-admin/issues"
},
"require": {
"php": ">=7.2.0"
"php": ">=7.2.5"
},
"config": {
"apcu-autoloader": true,
"optimize-autoloader": true,
"platform": {
"php": "7.2.0"
"php": "7.2.5"
}
},
"autoload": {
Expand Down
1 change: 1 addition & 0 deletions dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Flextype\Plugin\ThemesAdmin;

use Flextype\Plugin\ThemesAdmin\Controllers\ThemesController;
use Flextype\Plugin\ThemesAdmin\Controllers\TemplatesController;
use Flextype\Plugin\ThemesAdmin\Models\Themes;

use Slim\Flash\Messages;
Expand Down
4 changes: 2 additions & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Themes Admin
version: 1.0.6
version: 1.1.0
description: Themes Admin plugin to manage site themes for the website frontend.
icon: fas fa-paint-brush
author:
Expand All @@ -11,7 +11,7 @@ bugs: https://github.com/flextype-plugins/themes-admin/issues
license: MIT

dependencies:
flextype: 0.9.8
flextype: 0.9.9
twig: '>=1.0.0'
admin: '>=1.0.0'
form: '>=1.0.0'
Expand Down

0 comments on commit 7187132

Please sign in to comment.