Skip to content

Commit 4293aee

Browse files
committed
Update editor palette
1 parent fc8c671 commit 4293aee

File tree

5 files changed

+18
-16
lines changed

5 files changed

+18
-16
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.5.3
2+
3+
- Update editor palette
4+
15
## 1.5.2
26

37
- Update editor-styles.css

inc/tweaks.php

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -199,24 +199,22 @@ function show_post_thumbnail_column($columns, $id) {
199199

200200
// Add custom colors to wysiwygs
201201
function custom_editor_colors($init) {
202-
$custom_colors = '
203-
"FFC6B5", "Peach",
204-
"CCB6FC", "Lavender",
205-
"B6D8FC", "Sky",
206-
"F1563E", "Red",
207-
"3E4786", "Navy",
208-
"7BEFD3", "Teal",
209-
"212121", "Black",
210-
"707070", "Steel",
211-
"FFFFFF", "White",
212-
';
213-
214202
// build colour grid default+custom colors
215-
$init['textcolor_map'] = '['.$custom_colors.']';
203+
$custom_colors = [
204+
"F77D2B", "Orange",
205+
"4949B4", "Purple",
206+
"7BEFD3", "Teal",
207+
"000000", "Black",
208+
"393940", "Dark Grey",
209+
"EAEAEB", "Medium Grey",
210+
"F7F7F7", "Light Grey",
211+
"FFFFFF", "White",
212+
];
213+
$init['textcolor_map'] = json_encode($custom_colors);
216214

217215
// change the number of rows in the grid if the number of colors changes
218216
// 8 swatches per row
219-
$init['textcolor_rows'] = 2;
217+
$init['textcolor_rows'] = floor(count($custom_colors) / (8 * 2));
220218

221219
return $init;
222220
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "f1-mission-bit",
3-
"version": "1.5.2",
3+
"version": "1.5.3",
44
"scripts": {
55
"build": "yarn test && yarn format && NODE_ENV=production gulp build && yarn build-js && yarn build-scss",
66
"build-js": "parcel build ./assets/js/theme.js --out-dir ./dist/ --no-content-hash --log-level 4 --public-url ./ --no-cache",

screenshot.png

631 KB
Loading

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Theme URI: https://github.com/missionbit/f1-mission-bit
44
Author: Factor1 Studios
55
Author URI: https://factor1studios.com
66
Description: A custom WordPress theme for Mission Bit developed by Factor1
7-
Version: 1.5.2
7+
Version: 1.5.3
88
License: GPL-3.0
99
License URI:
1010
Text Domain:

0 commit comments

Comments
 (0)