Plugin Directory

Changeset 3301582


Ignore:
Timestamp:
05/27/2025 02:57:57 PM (10 months ago)
Author:
eesywp
Message:

1.0.2

  • Fix Rewrite Rules
Location:
eesy-id2wp-publish-indesign-html5
Files:
35 added
4 edited

Legend:

Unmodified
Added
Removed
  • eesy-id2wp-publish-indesign-html5/trunk/admin/class-id2wp-help.php

    r3296550 r3301582  
    4848            ),
    4949            'editor-project-folder-light'     => array(
    50                 'description' => __( 'The project folder name is the name of the folder in which the project will be available. If you leave it empty, a random name will be generated each time you upload a new .zip file. This is important because it ensures that the client-side browser cache is overridden. If you overwrite the name of the project folder, remember that the browser will keep the project in the cache. It is therefore possible that the browser displays an older version because the cache may not have been cleared. We therefore recommend working with the randomly generated URLs and creating a separate page in WordPress and displaying the uploaded project using a shortcode.', 'eesy-id2wp-publish-indesign-html5' ),
     50                'description' => __( 'Spaces are not allowed for the project folder name! The project folder name is the name of the folder in which the project will be available. If you leave it empty, a random name will be generated each time you upload a new .zip file. This is important because it ensures that the client-side browser cache is overridden. If you overwrite the name of the project folder, remember that the browser will keep the project in the cache. It is therefore possible that the browser displays an older version because the cache may not have been cleared. We therefore recommend working with the randomly generated URLs and creating a separate page in WordPress and displaying the uploaded project using a shortcode.', 'eesy-id2wp-publish-indesign-html5' ),
    5151                'link'        => false,
    5252            ),
  • eesy-id2wp-publish-indesign-html5/trunk/eesy-id2wp-publish-indesign-html5.php

    r3296550 r3301582  
    44Plugin URI: https://eesy.com/eesy_id2wp/
    55Description: A plugin for publishing InDesign HTML5 packages in WordPress. The HTML5 packages exported from InDesign are optimised during upload and can then be edited.
    6 Version: 1.0.1
     6Version: 1.0.2
    77Requires at least: 6.0
    88Requires PHP: 8.0
     
    1717    exit; // Exit if accessed directly.
    1818}
    19 define( 'ID2WP_VERSION', '0.1' );
    2019define( 'ID2WP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    2120define( 'ID2WP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     
    6160    ID2WP_Post_Type::register();
    6261    ID2WP_Rewrite_Handler::register_rewrite_rules();
     62    flush_rewrite_rules();
     63
    6364}
    6465register_activation_hook(__FILE__, 'id2wp_register');
  • eesy-id2wp-publish-indesign-html5/trunk/includes/class-id2wp-rewrite-handler.php

    r3280160 r3301582  
    1919        // Add redirect_canonical filter that only affects our rewrite rules
    2020        add_filter('redirect_canonical', array($this, 'handle_redirect_canonical'), 10, 2);
     21
     22        add_action('init', array($this, 'register_rewrite_rules'));
    2123
    2224    }
     
    5153     */
    5254    public static function register_rewrite_rules() {
    53     // Retrieve the applications folder from settings, with a default value
    54     $app_folder =id2wp_get_application_folder();
    55    
     55        // Retrieve the applications folder from settings, with a default value
     56        $app_folder =id2wp_get_application_folder();
     57       
    5658
    57     // Define the rewrite rule dynamically based on the applications folder
    58     add_rewrite_rule(
    59         sprintf('^%s/([^/]+)(/.*)?$', preg_quote($app_folder, '/')), // Match with or without trailing slash
    60         'index.php?id2wp_project=$matches[1]&id2wp_path=$matches[2]',
    61         'top'
    62     );
     59        // Define the rewrite rule dynamically based on the applications folder
     60        add_rewrite_rule(
     61            sprintf('^%s/([^/]+)(/.*)?$', preg_quote($app_folder, '/')), // Match with or without trailing slash
     62            'index.php?id2wp_project=$matches[1]&id2wp_path=$matches[2]',
     63            'top'
     64        );
    6365
    64     // Flush rewrite rules to apply changes
    65     flush_rewrite_rules();
    6666    }
    6767
  • eesy-id2wp-publish-indesign-html5/trunk/readme.txt

    r3296550 r3301582  
    55Requires at least: 6.0
    66Tested up to: 6.8.1
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 8.0
    99License: GPLv2 or later
     
    140140* Improved password logic in Backend
    141141* Fixed minor bugs
    142 * Tested for newer Wordpress version
     142* Tested for newer Wordpress Version
     143
     144= 1.0.2 =
     145* Fix Rewrite Rules
Note: See TracChangeset for help on using the changeset viewer.