WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Members Only] bloginfo('url') should be 'wpurl' in members only. (6 posts)

  1. blackc2004
    Member
    Posted 6 years ago #

    Hi there. I just started using members-only and I think that you need to change line 261 to use wpurl instead of just url

    $home = get_bloginfo('wpurl'); //Get base URL or WordPress install

    If someone has the wordpress install in a different directory, then you get a redirect loop.

    http://wordpress.org/extend/plugins/members-only/

  2. blackc2004
    Member
    Posted 6 years ago #

    Actually, I found that when you redirect to a specific page that's broken when you update the above line, so I have changed the lines to read:

    if ($members_only_opt['redirect_to'] == 'specifypage') {
                    $home = get_bloginfo('url'); //Get base URL or WordPress install
            } else {
                    $home = get_bloginfo('wpurl'); //Get base URL or WordPress install
            }
  3. Chris
    Member
    Posted 6 years ago #

    Duh, If I'd just have scrolled up a few lines.

    Thanks!

  4. hami
    Member
    Posted 6 years ago #

    I've never actually used this feature of WordPress, I guess I'm one of those people you doesn't mind the file in the root of my site folder.

    I'm just about to release a new version of Members Only (0.6.5) this weekend before I embark on per-page and per-category protection, so I'll get this fix into 0.6.5.

    I think I'll check whether get_bloginfo('url') == get_bloginfo('wpurl') and then make the alterations in the code based on that logic, as I'm a little concerned that the fix above might break things for other users.

    I'll create a new test bed with WordPress installed in a different directory to check this going forward.

    Thanks

    / Hami

  5. hami
    Member
    Posted 6 years ago #

    Ok - I've fixed this in the latest version. I now using wpurl when referring to the core WordPress such as wp-login.php

    I'm just finshing testing the other tweaks in this version and I'll release it later tonight.

    / Hami

  6. hami
    Member
    Posted 6 years ago #

    New version is up - if your having problems still let me know.

    / Hami

Topic Closed

This topic has been closed to new replies.

About this Topic