Anti Splog Plugin - Shortcode Menu Navigation

Anyone know how to make Anti-Splog Rename wp-signup.php feature work?

I need to make a menu item so I can send my members to signup when they reach that point.

Or any way to make it work. The shortcode currently displays the url, but members will have to copy and paste it into the address bar for them to visit the link.

Any solutions out there?

This would be extremely helpful.

Kindly,

Paul

  • Paul
    • The Crimson Coder

    @Ashok

    This Anti-Splog Software feature says:

    Checking this option will disable the wp-signup.php form and change the signup url automatically every 24 hours.
    .

    Won't this solution be invalid in 24 hours (tomorrow)?

  • Vinod Dalvi
    • WP Unicorn

    Hi @Paul,

    Yes you are correct that it will gets changed automatically so that hackers can't brute force attack it.

    You can just add the Register menu item to the primary menu of your site using the attached small plugin specially developed for you that contains the following code.

    add_filter( 'wp_nav_menu_items', 'add_anti_splog_custom_menu_item', 10, 2 );
    function add_anti_splog_custom_menu_item ( $items, $args ) {
    	$ust_signup  = get_site_option( 'ust_signup' );
    
        if (  $args->theme_location == 'primary' && function_exists('ust_wpsignup_url') && $ust_signup['active'] ) {
            $items .= '<li class="menu-item"><a href="'.ust_wpsignup_url( false ).'">'.__( "Register", "ust").'</a></li>';
        }
        return $items;
    }

    Could you please use the attached plugin and let me know how it works for you?

    Best Regards,
    Vinod Dalvi

  • Paul
    • The Crimson Coder

    Hello @Vinod Dalvi,

    Thank you for making this plugin for us. Can you tell me how to make the menu item appear?
    Is it automatic or are there steps I need to take?

    This information will be greatly appreciated.

    Most Kindly,

    Paul

  • Paul
    • The Crimson Coder

    Hi @Vinod Dalvi,

    Thank you for such a prompt reply. Unfortunately the plugin did not successfully activate a plugin on the site. I cleared cache and tried alternate browsers but no luck yet.

    Are there any suggestions I may try to tweak to get it to work?

    Thankfully,
    Paul

  • Vinod Dalvi
    • WP Unicorn

    Hi Paul,

    I checked it on your site and found the primary menu name is different on your site so i changed the plugin code as following and the register menu is displaying fine for non logged in users on your site as shown in the attached screenshot.

    add_filter( 'wp_nav_menu_items', 'add_anti_splog_custom_menu_item', 99, 2 );
    function add_anti_splog_custom_menu_item ( $items, $args ) {
    	$ust_signup  = get_site_option( 'ust_signup' );
    
        if ( !is_user_logged_in() && $args->theme_location == 'top-menu' && function_exists('ust_wpsignup_url') && $ust_signup['active'] ) {
            $items .= '<li class=&quot;menu-item&quot;><a href=&quot;'.ust_wpsignup_url( false ).'&quot;>'.__( &quot;Register&quot;, &quot;ust&quot;).'</a></li>';
        }
        return $items;
    }

    Could you please check it and let me know how it works for you?

    Best Regards,
    Vinod Dalvi

  • Paul
    • The Crimson Coder

    Hi @Vinod Dalvi,

    Thank you so much - it works. I have a quick question (no more mods needed i don't think).
    If I wanted this to work only for logged in users do I keep the previous code?

    As I have a paid membership site. Can I quickly invert this to a internal page?

    Kindly,

    Paul

  • Vinod Dalvi
    • WP Unicorn

    Hi Paul,

    The previous code won't work for you as primary menu name is different on your site, also it is developed to display the register menu for both logged in and not logged in users.

    You can try using the following code if you want this to work only for logged in users.

    add_filter( 'wp_nav_menu_items', 'add_anti_splog_custom_menu_item', 99, 2 );
    function add_anti_splog_custom_menu_item ( $items, $args ) {
    	$ust_signup  = get_site_option( 'ust_signup' );
    
        if ( is_user_logged_in() && $args->theme_location == 'top-menu' && function_exists('ust_wpsignup_url') && $ust_signup['active'] ) {
            $items .= '<li class=&quot;menu-item&quot;><a href=&quot;'.ust_wpsignup_url( false ).'&quot;>'.__( &quot;Register&quot;, &quot;ust&quot;).'</a></li>';
        }
        return $items;
    }

    Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.