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
917nvm use 14
1018npm 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/
0 commit comments