Plugin Directory

Changeset 3371403


Ignore:
Timestamp:
10/01/2025 08:14:43 PM (5 months ago)
Author:
ehtmlu
Message:

Version 1.1.0

Location:
theme-designer
Files:
2 edited
5 copied

Legend:

Unmodified
Added
Removed
  • theme-designer/tags/1.1.0/readme.txt

    r3329946 r3371403  
    33Donate link: https://www.paypal.com/donate/?hosted_button_id=2G6L8NWVXZ4T4
    44Tags: block-theme, colors, typography, spacing, theme-builder
    5 Requires at least: 6.3
     5Requires at least: 5.8
    66Tested up to: 6.8
    7 Stable tag: 1.0.0
    8 Requires PHP: 8.1
     7Stable tag: 1.1.0
     8Requires PHP: 7.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6868**Note**: Settings defined in the Site Editor take precedence over theme settings, even after saving new values in the theme.
    6969
     70== More from the same author ===
     71
     72Take a look at [www.wppeak.com](https://www.wppeak.com/)
     73
     74
    7075= Requirements =
    7176
     
    122127== Changelog ==
    123128
    124 = 1.0.0 =
     129= 1.1.0 - 2025-10-01 =
     130* Compatibility extended down to PHP 7.0 and down to WordPress 5.8
     131* Fixed two critical theme download issues
     132* Optimized the initial content of the index.html template
     133* Prevented existing template files from being overwritten
     134
     135= 1.0.0 - 2025-07-17 =
    125136* Initial release
    126137
    127 == Upgrade Notice ==
    128 
    129 = 1.0.0 =
    130 Initial release of Theme Designer. Create your first block theme today!
    131 
    132 == Credits ==
    133 
    134 Developed by [eHtmlu](https://ehtmlu.com/)
    135 
    136 Built with WordPress best practices and modern web standards.
    137 
    138 == Support ==
    139 
    140 For support, feature requests, or bug reports, please visit:
    141 * [WordPress.org Plugin Page](https://wordpress.org/plugins/theme-designer/)
    142 * [GitHub Repository](https://github.com/eHtmlu/theme-designer)
    143 
    144 == License ==
    145 
    146 This plugin is licensed under the GPL v2 or later.
    147 
    148 == Donate ==
    149 
    150 If you find this plugin helpful, please consider making a donation to support continued development:
    151 
    152 [Donate via PayPal](https://www.paypal.com/donate/?hosted_button_id=2G6L8NWVXZ4T4)
  • theme-designer/tags/1.1.0/theme-designer.php

    r3329946 r3371403  
    44 * Plugin URI: https://wordpress.org/plugins/theme-designer/
    55 * Description: Create and manage block themes (theme.json) with an intuitive interface.
    6  * Version: 1.0.0
    7  * Requires at least: 6.3
    8  * Requires PHP: 8.1
     6 * Version: 1.1.0
     7 * Requires at least: 5.8
     8 * Requires PHP: 7.0
    99 * Author: eHtmlu
    1010 * Author URI: https://ehtmlu.com/
     
    413413       
    414414        // Transform theme.json data into our format
    415         $parsed_data = [
    416             '_original_slug' => $theme_slug,
    417             ...$theme_data,
    418             'slug' => $theme_slug,
    419             'screenshot' => '',
    420             'theme_json' => $json_data,
    421         ];
     415        $parsed_data = array_merge(
     416            [
     417                '_original_slug' => $theme_slug
     418            ],
     419            $theme_data,
     420            [
     421                'slug' => $theme_slug,
     422                'screenshot' => '',
     423                'theme_json' => $json_data,
     424            ]
     425        );
    422426       
    423427        // Check for screenshot
     
    519523        }
    520524       
    521         // Save index.html
    522         $index_content = $this->generate_index_html($theme_data);
    523         if (!$this->wp_filesystem()->put_contents($templates_path . '/index.html', $index_content)) {
    524             return new \WP_Error('index_save_failed', __('Failed to save index.html.', 'theme-designer'));
    525         }
    526        
    527         // Save header template part
    528         $header_content = $this->generate_header_part($theme_data);
    529         if (!$this->wp_filesystem()->put_contents($parts_path . '/header.html', $header_content)) {
    530             return new \WP_Error('header_save_failed', __('Failed to save header.html.', 'theme-designer'));
    531         }
    532        
    533         // Save footer template part
    534         $footer_content = $this->generate_footer_part($theme_data);
    535         if (!$this->wp_filesystem()->put_contents($parts_path . '/footer.html', $footer_content)) {
    536             return new \WP_Error('footer_save_failed', __('Failed to save footer.html.', 'theme-designer'));
     525        // Save index.html (only if it doesn't exist)
     526        $index_file_path = $templates_path . '/index.html';
     527        if (!$this->wp_filesystem()->exists($index_file_path)) {
     528            $index_content = $this->generate_index_html($theme_data);
     529            if (!$this->wp_filesystem()->put_contents($index_file_path, $index_content)) {
     530                return new \WP_Error('index_save_failed', __('Failed to save index.html.', 'theme-designer'));
     531            }
     532        }
     533       
     534        // Save header template part (only if it doesn't exist)
     535        $header_file_path = $parts_path . '/header.html';
     536        if (!$this->wp_filesystem()->exists($header_file_path)) {
     537            $header_content = $this->generate_header_part($theme_data);
     538            if (!$this->wp_filesystem()->put_contents($header_file_path, $header_content)) {
     539                return new \WP_Error('header_save_failed', __('Failed to save header.html.', 'theme-designer'));
     540            }
     541        }
     542       
     543        // Save footer template part (only if it doesn't exist)
     544        $footer_file_path = $parts_path . '/footer.html';
     545        if (!$this->wp_filesystem()->exists($footer_file_path)) {
     546            $footer_content = $this->generate_footer_part($theme_data);
     547            if (!$this->wp_filesystem()->put_contents($footer_file_path, $footer_content)) {
     548                return new \WP_Error('footer_save_failed', __('Failed to save footer.html.', 'theme-designer'));
     549            }
    537550        }
    538551       
     
    661674     */
    662675    private function generate_index_html($theme_data) {
    663         return '<!-- wp:group {"style":{"dimensions":{"minHeight":"100vh"},"spacing":{"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
     676        return '<!-- wp:group {"style":{"dimensions":{"minHeight":"100vh"},"spacing":{"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch","flexWrap":"nowrap"}} -->
    664677<div class="wp-block-group" style="min-height:100vh"><!-- wp:template-part {"slug":"header","tagName":"header"} /-->
    665678
    666 <!-- wp:group {"tagName":"main","style":{"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"constrained"}} -->
    667 <main class="wp-block-group"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
    668 <div class="wp-block-group alignwide"><!-- wp:paragraph -->
    669 <p>Delete me to start with a blank canvas</p>
    670 <!-- /wp:paragraph --></div>
    671 <!-- /wp:group --></main>
     679<!-- wp:group {"tagName":"main","style":{"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"default"}} -->
     680<main class="wp-block-group"><!-- wp:post-content {"align":"full","layout":{"type":"constrained"}} /--></main>
    672681<!-- /wp:group -->
    673682
     
    759768       
    760769        $zip_path = wp_tempnam('theme-export-' . $theme_slug);
    761         $zip = new ZipArchive();
     770        $zip = new \ZipArchive();
    762771        $zip_result = $zip->open($zip_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
    763772       
     
    797806
    798807        // Filename
    799         $filename = $sanitized_slug . '.zip';
     808        $filename = $theme_slug . '.zip';
    800809       
    801810        // Send file to browser
  • theme-designer/trunk/readme.txt

    r3329946 r3371403  
    33Donate link: https://www.paypal.com/donate/?hosted_button_id=2G6L8NWVXZ4T4
    44Tags: block-theme, colors, typography, spacing, theme-builder
    5 Requires at least: 6.3
     5Requires at least: 5.8
    66Tested up to: 6.8
    7 Stable tag: 1.0.0
    8 Requires PHP: 8.1
     7Stable tag: 1.1.0
     8Requires PHP: 7.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6868**Note**: Settings defined in the Site Editor take precedence over theme settings, even after saving new values in the theme.
    6969
     70== More from the same author ===
     71
     72Take a look at [www.wppeak.com](https://www.wppeak.com/)
     73
     74
    7075= Requirements =
    7176
     
    122127== Changelog ==
    123128
    124 = 1.0.0 =
     129= 1.1.0 - 2025-10-01 =
     130* Compatibility extended down to PHP 7.0 and down to WordPress 5.8
     131* Fixed two critical theme download issues
     132* Optimized the initial content of the index.html template
     133* Prevented existing template files from being overwritten
     134
     135= 1.0.0 - 2025-07-17 =
    125136* Initial release
    126137
    127 == Upgrade Notice ==
    128 
    129 = 1.0.0 =
    130 Initial release of Theme Designer. Create your first block theme today!
    131 
    132 == Credits ==
    133 
    134 Developed by [eHtmlu](https://ehtmlu.com/)
    135 
    136 Built with WordPress best practices and modern web standards.
    137 
    138 == Support ==
    139 
    140 For support, feature requests, or bug reports, please visit:
    141 * [WordPress.org Plugin Page](https://wordpress.org/plugins/theme-designer/)
    142 * [GitHub Repository](https://github.com/eHtmlu/theme-designer)
    143 
    144 == License ==
    145 
    146 This plugin is licensed under the GPL v2 or later.
    147 
    148 == Donate ==
    149 
    150 If you find this plugin helpful, please consider making a donation to support continued development:
    151 
    152 [Donate via PayPal](https://www.paypal.com/donate/?hosted_button_id=2G6L8NWVXZ4T4)
  • theme-designer/trunk/theme-designer.php

    r3329946 r3371403  
    44 * Plugin URI: https://wordpress.org/plugins/theme-designer/
    55 * Description: Create and manage block themes (theme.json) with an intuitive interface.
    6  * Version: 1.0.0
    7  * Requires at least: 6.3
    8  * Requires PHP: 8.1
     6 * Version: 1.1.0
     7 * Requires at least: 5.8
     8 * Requires PHP: 7.0
    99 * Author: eHtmlu
    1010 * Author URI: https://ehtmlu.com/
     
    413413       
    414414        // Transform theme.json data into our format
    415         $parsed_data = [
    416             '_original_slug' => $theme_slug,
    417             ...$theme_data,
    418             'slug' => $theme_slug,
    419             'screenshot' => '',
    420             'theme_json' => $json_data,
    421         ];
     415        $parsed_data = array_merge(
     416            [
     417                '_original_slug' => $theme_slug
     418            ],
     419            $theme_data,
     420            [
     421                'slug' => $theme_slug,
     422                'screenshot' => '',
     423                'theme_json' => $json_data,
     424            ]
     425        );
    422426       
    423427        // Check for screenshot
     
    519523        }
    520524       
    521         // Save index.html
    522         $index_content = $this->generate_index_html($theme_data);
    523         if (!$this->wp_filesystem()->put_contents($templates_path . '/index.html', $index_content)) {
    524             return new \WP_Error('index_save_failed', __('Failed to save index.html.', 'theme-designer'));
    525         }
    526        
    527         // Save header template part
    528         $header_content = $this->generate_header_part($theme_data);
    529         if (!$this->wp_filesystem()->put_contents($parts_path . '/header.html', $header_content)) {
    530             return new \WP_Error('header_save_failed', __('Failed to save header.html.', 'theme-designer'));
    531         }
    532        
    533         // Save footer template part
    534         $footer_content = $this->generate_footer_part($theme_data);
    535         if (!$this->wp_filesystem()->put_contents($parts_path . '/footer.html', $footer_content)) {
    536             return new \WP_Error('footer_save_failed', __('Failed to save footer.html.', 'theme-designer'));
     525        // Save index.html (only if it doesn't exist)
     526        $index_file_path = $templates_path . '/index.html';
     527        if (!$this->wp_filesystem()->exists($index_file_path)) {
     528            $index_content = $this->generate_index_html($theme_data);
     529            if (!$this->wp_filesystem()->put_contents($index_file_path, $index_content)) {
     530                return new \WP_Error('index_save_failed', __('Failed to save index.html.', 'theme-designer'));
     531            }
     532        }
     533       
     534        // Save header template part (only if it doesn't exist)
     535        $header_file_path = $parts_path . '/header.html';
     536        if (!$this->wp_filesystem()->exists($header_file_path)) {
     537            $header_content = $this->generate_header_part($theme_data);
     538            if (!$this->wp_filesystem()->put_contents($header_file_path, $header_content)) {
     539                return new \WP_Error('header_save_failed', __('Failed to save header.html.', 'theme-designer'));
     540            }
     541        }
     542       
     543        // Save footer template part (only if it doesn't exist)
     544        $footer_file_path = $parts_path . '/footer.html';
     545        if (!$this->wp_filesystem()->exists($footer_file_path)) {
     546            $footer_content = $this->generate_footer_part($theme_data);
     547            if (!$this->wp_filesystem()->put_contents($footer_file_path, $footer_content)) {
     548                return new \WP_Error('footer_save_failed', __('Failed to save footer.html.', 'theme-designer'));
     549            }
    537550        }
    538551       
     
    661674     */
    662675    private function generate_index_html($theme_data) {
    663         return '<!-- wp:group {"style":{"dimensions":{"minHeight":"100vh"},"spacing":{"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
     676        return '<!-- wp:group {"style":{"dimensions":{"minHeight":"100vh"},"spacing":{"blockGap":"0"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch","flexWrap":"nowrap"}} -->
    664677<div class="wp-block-group" style="min-height:100vh"><!-- wp:template-part {"slug":"header","tagName":"header"} /-->
    665678
    666 <!-- wp:group {"tagName":"main","style":{"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"constrained"}} -->
    667 <main class="wp-block-group"><!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
    668 <div class="wp-block-group alignwide"><!-- wp:paragraph -->
    669 <p>Delete me to start with a blank canvas</p>
    670 <!-- /wp:paragraph --></div>
    671 <!-- /wp:group --></main>
     679<!-- wp:group {"tagName":"main","style":{"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"default"}} -->
     680<main class="wp-block-group"><!-- wp:post-content {"align":"full","layout":{"type":"constrained"}} /--></main>
    672681<!-- /wp:group -->
    673682
     
    759768       
    760769        $zip_path = wp_tempnam('theme-export-' . $theme_slug);
    761         $zip = new ZipArchive();
     770        $zip = new \ZipArchive();
    762771        $zip_result = $zip->open($zip_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
    763772       
     
    797806
    798807        // Filename
    799         $filename = $sanitized_slug . '.zip';
     808        $filename = $theme_slug . '.zip';
    800809       
    801810        // Send file to browser
Note: See TracChangeset for help on using the changeset viewer.