WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 3.2beta1 action added to login form hook seems to be triggered twice (3 posts)

  1. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 2 years ago #

    I have the following snippet in my functions.php to add login warning text under the username & password fields.

    I get the warning banner text as expected, however there is an issue that results in the banner text also apprearing at the top of the login page. You can see the issue at http://new.cubecolour.com/wp-admin

    This code has worked perfectly on all WP versions I have used it on prior to 3.2 beta 1 - I am using it without issue on several sites running 3.12.

    // Place Warning Banner On Page
    
    function cc_warning_banner(){
    
       $cc_sitename = get_bloginfo('name');
       $cc_siteurl = get_bloginfo('url');
    
       echo '<p style="color: #909090;"<strong>Authorised access only</strong><br /><br />
    Disconnect immediately if you are not an authorised user.</p>
    <p style="color: #909090; text-align: right;"><a href="' . $cc_siteurl . '/">' . $cc_sitename . '</a>
    <br /><br /><br /></p>';
       }
    
    add_action('login_form', 'cc_warning_banner');
  2. Maybe you should use login_form_bottom?

    Or login_message?

  3. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 2 years ago #

    Thanks Ipstenu - I have updated to the latest build it looks like the issue has been fixed.

Topic Closed

This topic has been closed to new replies.

About this Topic