Changeset 3487881
- Timestamp:
- 03/21/2026 06:02:38 PM (7 days ago)
- Location:
- export-wp-page-to-static-html/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (3 diffs)
-
assets/admin.js (modified) (3 diffs)
-
export-wp-page-to-static-html.php (modified) (2 diffs)
-
includes/class-admin.php (modified) (2 diffs)
-
includes/class-exporter.php (modified) (4 diffs)
-
includes/class-rest.php (modified) (1 diff)
-
includes/class-whats-new.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
export-wp-page-to-static-html/trunk/README.txt
r3487855 r3487881 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 6.0. 7.07 Stable tag: 6.0.8.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 111 111 112 112 == Changelog == 113 = 6.0.8.0 = 114 * Improved: "Group assets by type" is now available to all users (previously Pro only) and enabled by default — exports organise /images, /css, and /js automatically. 115 * Fixed: "Parent posts in root dir" now works correctly on subdirectory WordPress installations, saving top-level pages as postname.html at the export root. 116 113 117 = 6.0.7.0 = 114 118 * Fixed: Clicking Stop now immediately halts background export processing. … … 301 305 == Upgrade Notice == 302 306 307 = 6.0.8.0 = 308 "Group assets by type" is now free and on by default. Fixed "Parent posts in root dir" for subdirectory WordPress installs. 309 303 310 = 6.0.6.1 = 304 311 This release improves export reliability with enhanced exporting experiance, added pdf export system. -
export-wp-page-to-static-html/trunk/assets/admin.js
r3479004 r3487881 643 643 const includeHome = jQuery('#eh-include-home').is(':checked'); 644 644 645 const saveGrouped = !!(window.wpToHtmlData && Number(window.wpToHtmlData.pro_active) === 1) &&jQuery('#save_assets_grouped').is(':checked');645 const saveGrouped = jQuery('#save_assets_grouped').is(':checked'); 646 646 647 647 const assetCollectionMode = String(jQuery('#wp-to-html-asset-collection-mode').val() || 'strict'); … … 2076 2076 $('#eh-export-full').on('click', (e) => { if (proGuard(e)) setScope('full_site'); }); 2077 2077 2078 // Pro guard for "Group assets by type" checkbox2079 $('#save_assets_grouped').on('click', function (e) {2080 if (!proGuard(e)) { e.preventDefault(); }2081 });2082 2078 2083 2079 $('#eh-tab-posts').on('click', () => setType('post')); … … 2349 2345 const includeHome = $('#wp-to-html-include-home').is(':checked'); 2350 2346 const rootParentHtml = $('#wp-to-html-root-parent-html').is(':checked'); 2351 const save_assets_grouped = !!(Number(wpToHtmlData?.pro_active || 0)) &&jQuery('#save_assets_grouped').is(':checked');2347 const save_assets_grouped = jQuery('#save_assets_grouped').is(':checked'); 2352 2348 const asset_collection_mode = String(jQuery('#wp-to-html-asset-collection-mode').val() || 'strict'); 2353 2349 -
export-wp-page-to-static-html/trunk/export-wp-page-to-static-html.php
r3487855 r3487881 4 4 * Plugin URI: https://myrecorp.com 5 5 * Description: Export WP Pages to Static HTML is the most flexible static HTML export plugin for WordPress. Unlike full-site generators, Export WP Pages to Static HTML gives you surgical control — export exactly the posts, pages, or custom post types you need, in the status you want, as the user role you choose. 6 * Version: 6.0. 7.06 * Version: 6.0.8.0 7 7 * Author: ReCorp 8 8 * Author URI: https://www.upwork.com/fl/rayhan1 … … 20 20 load_plugin_textdomain('wp-to-html', false, dirname(plugin_basename(__FILE__)) . '/languages'); 21 21 }); 22 define('WP_TO_HTML_VERSION', '6.0. 7.0');22 define('WP_TO_HTML_VERSION', '6.0.8.0'); 23 23 define('WP_TO_HTML_PATH', plugin_dir_path(__FILE__)); 24 24 define('WP_TO_HTML_URL', plugin_dir_url(__FILE__)); -
export-wp-page-to-static-html/trunk/includes/class-admin.php
r3487855 r3487881 449 449 <option value="full"><?php esc_html_e('Full (all uploads + theme assets)', 'wp-to-html'); ?></option> 450 450 </select> 451 <label class="eh-toggle"><input type="checkbox" id="save_assets_grouped" value="1" <?php echo $pro_active ? 'checked' : 'disabled data-pro="1"'; ?>><span><?php esc_html_e('Group assets by type', 'wp-to-html'); ?><?php if (!$pro_active): ?> 🔒<?php endif; ?></span></label>451 <label class="eh-toggle"><input type="checkbox" id="save_assets_grouped" value="1" checked><span><?php esc_html_e('Group assets by type', 'wp-to-html'); ?></span></label> 452 452 <p class="eh-hint"> 453 453 <?php echo wp_kses(__('When enabled, all exported assets are automatically organized into clean subdirectories: <code>/images</code>, <code>/css</code>, <code>/js</code>. The result is a well-structured, developer-friendly HTML package that is easy to hand off or deploy.', 'wp-to-html'), array('code' => array())); ?> 454 <?php if (!$pro_active): ?><span class="eh-pro-badge">PRO</span><?php endif; ?>455 454 </p> 456 455 </div> … … 1351 1350 <p class="eh-pro-modal-lead"><?php esc_html_e('Remove all limits and unlock every export scope:', 'wp-to-html'); ?></p> 1352 1351 <ul class="eh-pro-feat-list"> 1353 <li><span class="eh-pro-feat-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg></span><div><strong><?php esc_html_e('Unlimited Custom Scope', 'wp-to-html'); ?></strong> — <?php esc_html_e('select any number of posts, pages or CPTs', 'wp-to-html'); ?></div></li>1352 <li><span class="eh-pro-feat-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg></span><div><strong><?php esc_html_e('Unlimited Flexibility', 'wp-to-html'); ?></strong> — <?php esc_html_e('select any number of posts, pages, or custom post types', 'wp-to-html'); ?></div></li> 1354 1353 <li><span class="eh-pro-feat-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg></span><div><strong><?php esc_html_e('All Pages & All Posts', 'wp-to-html'); ?></strong> — <?php esc_html_e('bulk export entire archives in one click', 'wp-to-html'); ?></div></li> 1355 1354 <li><span class="eh-pro-feat-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="2" y1="12" x2="22" y2="12"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/></svg></span><div><strong><?php esc_html_e('Full Site Export', 'wp-to-html'); ?></strong> — <?php esc_html_e('complete static HTML of your entire site', 'wp-to-html'); ?></div></li> 1356 1355 <li><span class="eh-pro-feat-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg></span><div><strong><?php esc_html_e('AWS S3 Deployment', 'wp-to-html'); ?></strong> — <?php esc_html_e('push exports directly to your S3 bucket', 'wp-to-html'); ?></div></li> 1357 <li><span class="eh-pro-feat-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg></span><div><strong><?php esc_html_e('Grouped Assets', 'wp-to-html'); ?></strong> — <?php esc_html_e('auto-organized into /images, /css, /js', 'wp-to-html'); ?></div></li>1358 1356 </ul> 1359 1357 </div> -
export-wp-page-to-static-html/trunk/includes/class-exporter.php
r3487855 r3487881 106 106 } 107 107 108 /** 109 * Extract the URL path relative to the WordPress install root. 110 * Strips the home URL base path for subdirectory installs so that 111 * /elementor/my-page/ becomes my-page (not elementor/my-page). 112 */ 113 private function relative_url_path(string $url): string { 114 $path = trim((string) parse_url($url, PHP_URL_PATH), '/'); 115 $home_path = trim((string) parse_url(home_url('/'), PHP_URL_PATH), '/'); 116 if ($home_path !== '' && strpos($path, $home_path) === 0) { 117 $path = trim(substr($path, strlen($home_path)), '/'); 118 } 119 return $path; 120 } 121 108 122 109 123 /** … … 113 127 private function save_html($url, $html) { 114 128 115 $path = (string) parse_url($url, PHP_URL_PATH); 116 $path = trim($path, '/'); 129 $path = $this->relative_url_path($url); 117 130 118 131 // 1) Forced single-page export: always write root /index.html … … 1111 1124 private function get_page_output_dir($url) { 1112 1125 1113 $path = (string) parse_url($url, PHP_URL_PATH); 1114 $path = trim($path, '/'); 1126 $path = $this->relative_url_path($url); 1115 1127 1116 1128 // 1) Forced single-page export: always root … … 1602 1614 1603 1615 // Mirror your save_html() path logic 1604 $export_path = (string) parse_url($page_url, PHP_URL_PATH); 1605 $export_path = trim($export_path, '/'); 1616 $export_path = $this->relative_url_path($page_url); 1606 1617 1607 1618 // If the file ends up in root (single export OR root_parent_html), use "./" dot base. -
export-wp-page-to-static-html/trunk/includes/class-rest.php
r3487855 r3487881 745 745 $include_home = array_key_exists('include_home', $params) ? (bool) $params['include_home'] : true; 746 746 $save_assets_grouped = !empty($params['save_assets_grouped']); 747 // Pro gate: "Group assets by type" requires Pro.748 if ($save_assets_grouped && function_exists('wp_to_html_is_pro_active') && !wp_to_html_is_pro_active()) {749 $save_assets_grouped = false;750 }751 747 752 748 // Asset coverage strategy: strict | hybrid | full -
export-wp-page-to-static-html/trunk/includes/class-whats-new.php
r3487855 r3487881 296 296 <div class="wth-version"> 297 297 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"/><line x1="16" y1="8" x2="2" y2="22"/><line x1="17.5" y1="15" x2="9" y2="15"/></svg> 298 <?php esc_html_e('Version', 'wp-to-html'); ?> <strong>6.0. 7.0</strong>299 </div> 300 </div> 301 302 <!-- 6.0. 7.0 Changelog Cards -->298 <?php esc_html_e('Version', 'wp-to-html'); ?> <strong>6.0.8.0</strong> 299 </div> 300 </div> 301 302 <!-- 6.0.8.0 Changelog Cards --> 303 303 <div class="wth-cards"> 304 304 305 <!-- Fixed: Stop button halts background immediately --> 305 <!-- Improved: Group assets by type now free --> 306 <div class="wth-card"> 307 <div class="wth-card-icon improved"> 308 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg> 309 </div> 310 <div class="wth-card-body"> 311 <div class="wth-card-label improved"><?php esc_html_e('Improved', 'wp-to-html'); ?></div> 312 <div class="wth-card-text"><?php esc_html_e('"Group assets by type" is now available to all users — no Pro required. Assets are automatically organised into /images, /css, and /js subdirectories. The option is now enabled by default for cleaner, more portable export packages.', 'wp-to-html'); ?></div> 313 </div> 314 </div> 315 316 <!-- Fixed: Parent posts in root dir for subdirectory installs --> 306 317 <div class="wth-card"> 307 318 <div class="wth-card-icon fixed"> 308 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">< rect x="3" y="3" width="18" height="18" rx="2" ry="2"/></svg>319 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg> 309 320 </div> 310 321 <div class="wth-card-body"> 311 322 <div class="wth-card-label fixed"><?php esc_html_e('Fixed', 'wp-to-html'); ?></div> 312 <div class="wth-card-text"><?php esc_html_e('Clicking Stop now immediately halts background export processing. Previously, an active background tick could continue running for several seconds after stopping.', 'wp-to-html'); ?></div> 313 </div> 314 </div> 315 316 <!-- Improved: Log records pause/resume/stop --> 317 <div class="wth-card"> 318 <div class="wth-card-icon improved"> 319 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg> 320 </div> 321 <div class="wth-card-body"> 322 <div class="wth-card-label improved"><?php esc_html_e('Improved', 'wp-to-html'); ?></div> 323 <div class="wth-card-text"><?php esc_html_e('Export activity log now records when an export is paused, resumed, or stopped by the user, making it easier to track what happened during an export session.', 'wp-to-html'); ?></div> 324 </div> 325 </div> 326 327 <!-- Improved: Internal code improvements --> 328 <div class="wth-card"> 329 <div class="wth-card-icon core"> 330 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg> 331 </div> 332 <div class="wth-card-body"> 333 <div class="wth-card-label core"><?php esc_html_e('Core', 'wp-to-html'); ?></div> 334 <div class="wth-card-text"><?php esc_html_e('Internal code improvements for better reliability and stability across different server environments.', 'wp-to-html'); ?></div> 335 </div> 336 </div> 337 323 <div class="wth-card-text"><?php esc_html_e('"Parent posts in root dir" now works correctly on all WordPress installations, including sites hosted in a subdirectory. Top-level pages and posts are correctly saved as postname.html at the export root.', 'wp-to-html'); ?></div> 324 </div> 325 </div> 326 327 </div> 328 329 <!-- Previous Release: 6.0.7.0 --> 330 <div class="wth-prev-release"> 331 <div class="wth-prev-release-heading"> 332 <hr> 333 <span class="wth-prev-release-label"><?php esc_html_e('Previous Release', 'wp-to-html'); ?></span> 334 <hr> 335 </div> 336 337 <div style="margin-bottom:16px;"> 338 <span class="wth-prev-version-pill"> 339 <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"/><line x1="16" y1="8" x2="2" y2="22"/></svg> 340 <?php esc_html_e('Version', 'wp-to-html'); ?> 6.0.7.0 341 </span> 342 </div> 343 344 <div class="wth-cards"> 345 346 <div class="wth-card"> 347 <div class="wth-card-icon fixed"> 348 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/></svg> 349 </div> 350 <div class="wth-card-body"> 351 <div class="wth-card-label fixed"><?php esc_html_e('Fixed', 'wp-to-html'); ?></div> 352 <div class="wth-card-text"><?php esc_html_e('Clicking Stop now immediately halts background export processing. Previously, an active background tick could continue running for several seconds after stopping.', 'wp-to-html'); ?></div> 353 </div> 354 </div> 355 356 <div class="wth-card"> 357 <div class="wth-card-icon improved"> 358 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg> 359 </div> 360 <div class="wth-card-body"> 361 <div class="wth-card-label improved"><?php esc_html_e('Improved', 'wp-to-html'); ?></div> 362 <div class="wth-card-text"><?php esc_html_e('Export activity log now records when an export is paused, resumed, or stopped by the user, making it easier to track what happened during an export session.', 'wp-to-html'); ?></div> 363 </div> 364 </div> 365 366 <div class="wth-card"> 367 <div class="wth-card-icon core"> 368 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg> 369 </div> 370 <div class="wth-card-body"> 371 <div class="wth-card-label core"><?php esc_html_e('Core', 'wp-to-html'); ?></div> 372 <div class="wth-card-text"><?php esc_html_e('Internal code improvements for better reliability and stability across different server environments.', 'wp-to-html'); ?></div> 373 </div> 374 </div> 375 376 </div> 338 377 </div> 339 378
Note: See TracChangeset
for help on using the changeset viewer.