WordPress.org

Ready to get started?Download WordPress

Forums

WordPress HTTPS (SSL)
admin_url in Filters.php returns too much https urls (2 posts)

  1. hsz_36
    Member
    Posted 1 year ago #

    There are two problems with the function admin_url in Filters.php:

    a) it returns a https-url even if the scheme is set to 'http'
    b) it alwayls returns a https-url if the settings say 'Force SSL Administration'. This breaks frontend plugins like wp search suggest, if they are used on a ssl enabled site and the frontend page gets delivered via http.

    To solve this issue i broadened the if-statement in admin_url.
    Replace in Filters.php the line
    if ( ( $scheme == 'https' || $this->getPlugin()->getSetting('ssl_admin') || ( ( is_admin() || $GLOBALS['pagenow'] == 'wp-login.php' ) && $this->getPlugin()->isSsl() ) ) && ( ! is_multisite() || ( is_multisite() && parse_url($url, PHP_URL_HOST) == $this->getPlugin()->getHttpsUrl()->getHost() ) ) ) {

    with this line
    if ( $scheme != 'http' && ( ( $scheme == 'https' || ( is_admin() && $this->getPlugin()->getSetting('ssl_admin') ) || ( ( is_admin() || $GLOBALS['pagenow'] == 'wp-login.php' ) && $this->getPlugin()->isSsl() ) ) && ( ! is_multisite() || ( is_multisite() && parse_url($url, PHP_URL_HOST) == $this->getPlugin()->getHttpsUrl()->getHost() ) ) ) ) {

    With kind regards
    hsz_36

    http://wordpress.org/extend/plugins/wordpress-https/

  2. Mvied
    Member
    Plugin Author

    Posted 1 year ago #

    This should be fixed in the next version. If you want, you can download the most current development version from https://github.com/Mvied/wordpress-https

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic