• Resolved Maya

    (@tdgu)


    Hello,
    I’m the developer of WP Hide plugin https://www.ads-software.com/plugins/wp-hide-security-enhancer/
    We came across an issue with your plugin, since customizing URLs through the WP Hide (e.g. the default uploads ), they are saved that way by your code, within the database. The WP Hide include a special internal tool to revert the data before being saved within the database, still in your case as you use base64_encode for all options, that will not make a match.
    Do you know a way to make it compatible, maybe remove the base64_encode usage, as I really don’t see the point using it? You already run serialize.
    Or add a filter on your ad-inserter.php before line 7490 ai_save_options ($ai_options, $multisite_options) which we can use in our site to create a compatibility routine.

    Thanks

    • This topic was modified 2 years, 10 months ago by Maya.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Spacetime

    (@spacetime)

    Hello,

    the plugin encodes the settings as this is the only way to preserve the block code during export/import of database options. In the past we had many issues in this regard.

    But a filter can be added.

    There is already an filter in ad-inserter.php before line 7405:
    $ai_options = apply_filters ('ai_save_settings', $ai_options);
    It can be used to process site settings when the user saves them via the settings page.

    However, line 7490 is not a good place for a filter for your cases as ai_save_options is called from different places.

    I put them in the ai_save_options function. However, we need to be careful there. The pro plugin can manage settings on a remote site. So we can have 4 possible combinations regarding your plugin (installed on local, installed on remote website)

    I put the following two filters before the options are actually saved locally – check the latest development version:

      $options           = apply_filters ('ai_save_options',           $options);
      $multisite_options = apply_filters ('ai_save_multisite_options', $multisite_options);

    Please note that $multisite_options can be null (when not used).

    Please briefly explain how your plugin works so I can check for possible issues.

    Plugin Author Spacetime

    (@spacetime)

    Any feedback?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrong URLs’ is closed to new replies.