Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Takis,

    I understand the problem. And there doesn’t seem to be a convenient solution. Fortunately, the problem afflicts only a relatively small portion of users, and I guess the most rational approach would be to enable people to fix the problem on the options page by letting them indicate the correct location of the wp-content folder. One could also support them by scanning the wp-config file when they visit the options page and showing them the value of WP_CONTENT_DIR if it is defined there. Those are just some ideas that come to my mind and I hope they are not utterly stupid. 🙂

    Cheers,
    George

    Hi Takis,

    well, this is an altogether different problem.

    If somebody decides to move his /wp-content folder, I think this goes by defining the WP_CONTENT_DIR and WP_CONTENT_URL constants in the wp-config.php. So for your plugin to work properly in such a scenario, it would have to check if these constants are set and, if this being the case, use them instead:

    http://hookr.io/constants/wp_content_url/

    Cheers,
    Georg

    Hello Takis,

    I had the same problem with https and I broke the problem down to the line:

    $wp_content_url = 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content';

    in adaptive-images-script.php. To fix it I replaced it with:

    $ssl = ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' );
    $wp_content_url = 'http'. ($ssl ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'] . '/wp-content';

    It would be wonderful if you considered this fix for a future commit.

    With best regards,
    George

Viewing 3 replies - 1 through 3 (of 3 total)