Changeset 3371403
- Timestamp:
- 10/01/2025 08:14:43 PM (5 months ago)
- Location:
- theme-designer
- Files:
-
- 2 edited
- 5 copied
-
tags/1.1.0 (copied) (copied from theme-designer/trunk)
-
tags/1.1.0/README.md (copied) (copied from theme-designer/trunk/README.md)
-
tags/1.1.0/assets (copied) (copied from theme-designer/trunk/assets)
-
tags/1.1.0/readme.txt (copied) (copied from theme-designer/trunk/readme.txt) (3 diffs)
-
tags/1.1.0/theme-designer.php (copied) (copied from theme-designer/trunk/theme-designer.php) (6 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/theme-designer.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
theme-designer/tags/1.1.0/readme.txt
r3329946 r3371403 3 3 Donate link: https://www.paypal.com/donate/?hosted_button_id=2G6L8NWVXZ4T4 4 4 Tags: block-theme, colors, typography, spacing, theme-builder 5 Requires at least: 6.35 Requires at least: 5.8 6 6 Tested up to: 6.8 7 Stable tag: 1. 0.08 Requires PHP: 8.17 Stable tag: 1.1.0 8 Requires PHP: 7.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 68 68 **Note**: Settings defined in the Site Editor take precedence over theme settings, even after saving new values in the theme. 69 69 70 == More from the same author === 71 72 Take a look at [www.wppeak.com](https://www.wppeak.com/) 73 74 70 75 = Requirements = 71 76 … … 122 127 == Changelog == 123 128 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 = 125 136 * Initial release 126 137 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 4 4 * Plugin URI: https://wordpress.org/plugins/theme-designer/ 5 5 * Description: Create and manage block themes (theme.json) with an intuitive interface. 6 * Version: 1. 0.07 * Requires at least: 6.38 * Requires PHP: 8.16 * Version: 1.1.0 7 * Requires at least: 5.8 8 * Requires PHP: 7.0 9 9 * Author: eHtmlu 10 10 * Author URI: https://ehtmlu.com/ … … 413 413 414 414 // 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 ); 422 426 423 427 // Check for screenshot … … 519 523 } 520 524 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 } 537 550 } 538 551 … … 661 674 */ 662 675 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"}} --> 664 677 <div class="wp-block-group" style="min-height:100vh"><!-- wp:template-part {"slug":"header","tagName":"header"} /--> 665 678 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> 672 681 <!-- /wp:group --> 673 682 … … 759 768 760 769 $zip_path = wp_tempnam('theme-export-' . $theme_slug); 761 $zip = new ZipArchive();770 $zip = new \ZipArchive(); 762 771 $zip_result = $zip->open($zip_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 763 772 … … 797 806 798 807 // Filename 799 $filename = $ sanitized_slug . '.zip';808 $filename = $theme_slug . '.zip'; 800 809 801 810 // Send file to browser -
theme-designer/trunk/readme.txt
r3329946 r3371403 3 3 Donate link: https://www.paypal.com/donate/?hosted_button_id=2G6L8NWVXZ4T4 4 4 Tags: block-theme, colors, typography, spacing, theme-builder 5 Requires at least: 6.35 Requires at least: 5.8 6 6 Tested up to: 6.8 7 Stable tag: 1. 0.08 Requires PHP: 8.17 Stable tag: 1.1.0 8 Requires PHP: 7.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 68 68 **Note**: Settings defined in the Site Editor take precedence over theme settings, even after saving new values in the theme. 69 69 70 == More from the same author === 71 72 Take a look at [www.wppeak.com](https://www.wppeak.com/) 73 74 70 75 = Requirements = 71 76 … … 122 127 == Changelog == 123 128 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 = 125 136 * Initial release 126 137 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 4 4 * Plugin URI: https://wordpress.org/plugins/theme-designer/ 5 5 * Description: Create and manage block themes (theme.json) with an intuitive interface. 6 * Version: 1. 0.07 * Requires at least: 6.38 * Requires PHP: 8.16 * Version: 1.1.0 7 * Requires at least: 5.8 8 * Requires PHP: 7.0 9 9 * Author: eHtmlu 10 10 * Author URI: https://ehtmlu.com/ … … 413 413 414 414 // 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 ); 422 426 423 427 // Check for screenshot … … 519 523 } 520 524 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 } 537 550 } 538 551 … … 661 674 */ 662 675 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"}} --> 664 677 <div class="wp-block-group" style="min-height:100vh"><!-- wp:template-part {"slug":"header","tagName":"header"} /--> 665 678 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> 672 681 <!-- /wp:group --> 673 682 … … 759 768 760 769 $zip_path = wp_tempnam('theme-export-' . $theme_slug); 761 $zip = new ZipArchive();770 $zip = new \ZipArchive(); 762 771 $zip_result = $zip->open($zip_path, \ZipArchive::CREATE | \ZipArchive::OVERWRITE); 763 772 … … 797 806 798 807 // Filename 799 $filename = $ sanitized_slug . '.zip';808 $filename = $theme_slug . '.zip'; 800 809 801 810 // Send file to browser
Note: See TracChangeset
for help on using the changeset viewer.