Skip to content

Commit b849f6e

Browse files
georgeolaruclaude
andcommitted
Bump version to 2.10.7 with bug fixes
- Fix early translation loading notice on WordPress 6.7+ by lazy-loading plugin config in Customify_Settings (fixes #251) - Fix Customizer menu items reordering/nesting by removing conflicting CSS overrides on .menu-item and #accordion-section-add_menu (fixes #242) - Fix version string mismatch in PixCustomifyPlugin::instance() call - Update CLAUDE.md with release process and security documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5b502f8 commit b849f6e

8 files changed

Lines changed: 135 additions & 26 deletions

File tree

CLAUDE.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
# Customify Development
22

3+
## Repository
4+
- **GitHub:** https://github.com/pixelgrade/customify
5+
- **WordPress.org:** https://wordpress.org/plugins/customify/
6+
- **Current version:** 2.10.6
7+
- **Branch:** `dev` (main development branch)
8+
39
## Prerequisites
410
- **Node.js 14** (see `.nvmrc`)
511
- **Gulp 4** (installed via devDependencies)
12+
- **PHP 7.4+**
13+
- **WordPress 5.9+**
614

715
## Setup
816
```bash
917
nvm use 14
1018
npm install
1119
```
20+
Note: `fsevents` build warning on macOS is non-fatal (optional dependency).
1221

1322
## Development Mode
1423
```bash
@@ -34,6 +43,101 @@ Watches all SCSS and JS files, recompiles on change.
3443
- `scss/*.scss` - Source stylesheets, compiled to `css/`
3544
- `js/customizer/*.js`, `js/*.js` - Source scripts, minified versions get `.min.js` suffix
3645
- RTL stylesheets are auto-generated with `-rtl` suffix
46+
- `CLAUDE.md` is excluded from zip builds (listed in `gulpfile.js` `removeUnneededFiles`)
47+
48+
## Release Process
49+
50+
### 1. Version bump
51+
Update version in three places:
52+
- `customify.php` — plugin header `Version:` line
53+
- `customify.php``PixCustomifyPlugin::instance()` second argument
54+
- `readme.txt``Stable tag:` header
55+
56+
Also update as needed:
57+
- `readme.txt``Tested up to:`, `Requires PHP:`, `Requires at least:`
58+
- `customify.php` — matching plugin headers
59+
- `includes/class-pixcustomify.php``$minimalRequiredPhpVersion` property (~line 117)
60+
61+
### 2. Build zip
62+
```bash
63+
nvm use 14
64+
npx gulp zip
65+
```
66+
Output: `../Customify-X-X-X.zip` (in parent plugins directory)
67+
68+
### 3. GitHub release
69+
```bash
70+
git push origin dev
71+
gh release create vX.X.X ../Customify-X-X-X.zip --title "vX.X.X" --notes "changelog"
72+
```
73+
To update an existing release zip: `gh release upload vX.X.X ../Customify-X-X-X.zip --clobber`
74+
75+
### 4. WordPress.org SVN
76+
SVN repo: `https://plugins.svn.wordpress.org/customify/`
77+
SVN username: `babbardel`
78+
79+
```bash
80+
# Checkout trunk
81+
svn checkout https://plugins.svn.wordpress.org/customify/trunk /tmp/customify-svn
82+
83+
# Sync from zip (preserves .svn metadata)
84+
unzip -o ../Customify-X-X-X.zip -d /tmp/customify-unzipped
85+
rsync -a --delete --exclude='.svn' /tmp/customify-unzipped/customify/ /tmp/customify-svn/
86+
87+
# Add new files, remove deleted files
88+
cd /tmp/customify-svn
89+
svn status | grep '^\?' | awk '{print $2}' | xargs -I{} svn add "{}"
90+
svn status | grep '^\!' | awk '{print $2}' | xargs -I{} svn delete "{}"
91+
92+
# Commit trunk
93+
echo 'PASSWORD' | svn commit -m "message" --username babbardel --force-interactive
94+
95+
# Tag the release (wordpress.org reads metadata from the tag, not trunk)
96+
echo 'PASSWORD' | svn copy \
97+
https://plugins.svn.wordpress.org/customify/trunk \
98+
https://plugins.svn.wordpress.org/customify/tags/X.X.X \
99+
-m "Tag X.X.X" --username babbardel --force-interactive
100+
```
101+
102+
**Important:** WordPress.org sidebar metadata (Tested up to, Requires PHP, etc.) comes from the **tagged version's** readme.txt, not trunk. If you update metadata after tagging, you must delete and recreate the tag:
103+
```bash
104+
echo 'PASSWORD' | svn delete https://plugins.svn.wordpress.org/customify/tags/X.X.X -m "Remove old tag" --username babbardel --force-interactive
105+
echo 'PASSWORD' | svn copy https://plugins.svn.wordpress.org/customify/trunk https://plugins.svn.wordpress.org/customify/tags/X.X.X -m "Re-tag X.X.X" --username babbardel --force-interactive
106+
```
107+
108+
Note: `--non-interactive` does NOT work for SVN auth here. Must use `--force-interactive` with echo pipe.
109+
110+
## Security Considerations
111+
112+
### AJAX handlers
113+
All `wp_ajax_` handlers must have both:
114+
1. **Nonce verification:** `check_ajax_referer()`
115+
2. **Capability check:** `current_user_can('manage_options')`
116+
117+
Current AJAX handlers:
118+
- `customify_migrate_customizations_from_parent_to_child_theme``extras.php`
119+
- `customify_style_manager_user_feedback``class-customify-style-manager.php`
120+
121+
### REST API endpoints
122+
- `customify/v1/delete_theme_mod``class-customify-settings.php` (has both nonce + capability check)
123+
124+
### Settings form
125+
- `class-customify-settings.php` — uses `check_admin_referer()` + `manage_options` capability via `add_options_page()`
126+
127+
## PHP Compatibility Notes
128+
- Minimum PHP 7.4 (set in `class-pixcustomify.php:$minimalRequiredPhpVersion`)
129+
- Added null safety guards for `get_option()`, `apply_filters()`, `preg_split()` returns (PHP 8.x compat)
130+
- All classes have explicit property declarations (PHP 8.2 dynamic properties deprecation)
131+
132+
## Key Files
133+
- `customify.php` — main plugin file, version, bootstrap
134+
- `includes/class-pixcustomify.php` — main plugin class, hooks, enqueuing
135+
- `includes/extras.php` — helper functions, theme migration AJAX handler
136+
- `includes/class-customify-style-manager.php` — Style Manager, color/font palettes, feedback handler
137+
- `includes/class-customify-settings.php` — admin settings page, REST API, nonce handling
138+
- `includes/class-customify-color-palettes.php` — color palette rendering
139+
- `includes/class-customify-block-editor.php` — Gutenberg integration
140+
- `gulpfile.js` — build system configuration
37141

38142
## Local Environment
39143
- **URL:** http://barba.local/

css/customizer-rtl.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/customizer.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

customify.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Customify
44
* Plugin URI: https://wordpress.org/plugins/customify/
55
* Description: A Theme Customizer Booster to easily and consistently customize Fonts, Colors, and other options for your site.
6-
* Version: 2.10.6
6+
* Version: 2.10.7
77
* Author: Pixelgrade
88
* Author URI: https://pixelgrade.com
99
* Author Email: contact@pixelgrade.com
@@ -33,7 +33,7 @@
3333
function PixCustomifyPlugin() {
3434
require_once plugin_dir_path( __FILE__ ) . 'includes/class-pixcustomify.php';
3535

36-
return PixCustomifyPlugin::instance( __FILE__, '2.10.4' );
36+
return PixCustomifyPlugin::instance( __FILE__, '2.10.7' );
3737
}
3838

3939
// Now get the party started.

includes/class-customify-settings.php

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Customify_Settings {
3737
public $slug;
3838
public $version;
3939

40-
private $plugin_config = array();
40+
private $plugin_config = null;
4141

4242
protected function __construct( $file, $slug, $version = '1.0.0' ) {
4343
$this->file = $file;
@@ -46,15 +46,29 @@ protected function __construct( $file, $slug, $version = '1.0.0' ) {
4646

4747
require plugin_dir_path( $this->file ) . 'includes/admin-settings/core/bootstrap.php';
4848

49-
// Load the config file
50-
$this->plugin_config = self::get_plugin_config();
51-
// Load the plugin's settings from the DB
52-
$this->plugin_settings = get_option( $this->plugin_config['settings-key'] );
49+
// Load the plugin's settings from the DB.
50+
// We use the settings key directly to avoid loading the full config (which has translation calls) too early.
51+
$this->plugin_settings = get_option( 'pixcustomify_settings' );
5352

5453
// Register all the needed hooks
5554
$this->register_hooks();
5655
}
5756

57+
/**
58+
* Get the plugin config, loading it on first access.
59+
*
60+
* This lazy-loads the config to avoid calling translation functions before the textdomain is loaded.
61+
*
62+
* @return array
63+
*/
64+
private function get_lazy_plugin_config() {
65+
if ( null === $this->plugin_config ) {
66+
$this->plugin_config = self::get_plugin_config();
67+
}
68+
69+
return $this->plugin_config;
70+
}
71+
5872
/**
5973
* Register our actions and filters
6074
*/
@@ -409,9 +423,10 @@ static public function get_plugin_config() {
409423
* @return bool|null
410424
*/
411425
public function get_config_option( $option, $default = null ) {
426+
$config = $this->get_lazy_plugin_config();
412427

413-
if ( isset( $this->plugin_config[ $option ] ) ) {
414-
return $this->plugin_config[ $option ];
428+
if ( isset( $config[ $option ] ) ) {
429+
return $config[ $option ];
415430
} elseif ( $default !== null ) {
416431
return $default;
417432
}

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: pixelgrade, vlad.olaru, babbardel, razvanonofrei, gorby31
33
Tags: design, customizer, fonts, colors, gutenberg, font palettes, color palettes
44
Requires at least: 5.9.0
55
Tested up to: 6.9
6-
Stable tag: 2.10.6
6+
Stable tag: 2.10.7
77
Requires PHP: 7.4
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -30,6 +30,10 @@ This plugin is **primarily intended** to be used together with [Pixelgrade theme
3030

3131
== Changelog ==
3232

33+
= 2.10.7 =
34+
* Fixed early translation loading notice on WordPress 6.7+ by deferring plugin config initialization.
35+
* Fixed Customizer menu items reordering and nesting by removing conflicting CSS overrides.
36+
3337
= 2.10.6 =
3438
* Security: added capability checks to AJAX handlers for defense-in-depth.
3539
* Fix inline font script breaking AJAX-based theme navigation.

scss/_customize-control.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,6 @@
9999
}
100100
}
101101

102-
&.menu-item {
103-
.menu-item-settings {
104-
width: 100%;
105-
background-color: $blue-white;
106-
}
107-
}
108102
}
109103

110104
.customize-control-checkbox,

scss/_shame.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
.theme * {
44
box-sizing: content-box;
55
}
6-
7-
#accordion-section-add_menu {
8-
border-bottom: none;
9-
10-
.add-menu-toggle {
11-
float: none;
12-
}
13-
}
146
}
157

168
.customify_ace_editor {

0 commit comments

Comments
 (0)