Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 24th, 2010  |  syntax: PHP  |  size: 2.13 KB  |  hits: 154  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. add_filter('simplemodal_login_form', 'mytheme_login_form');
  2. function mytheme_login_form($form) {
  3.         $users_can_register = get_option('users_can_register') ? true : false;
  4.         $options = get_option('simplemodal_login_options');
  5.  
  6.         $output = sprintf('
  7. <form name="loginform" id="loginform" action="%s" method="post">
  8.         <div class="title">%s</div>
  9.         <div class="simplemodal-login-fields">
  10.         <p>
  11.                 <label>%s<br />
  12.                 <input type="text" name="log" class="user_login input" value="" size="20" tabindex="10" /></label>
  13.         </p>
  14.         <p>
  15.                 <label>%s<br />
  16.                 <input type="password" name="pwd" class="user_pass input" value="" size="20" tabindex="20" /></label>
  17.         </p>',
  18.                 site_url('wp-login.php', 'login_post'),
  19.                 __('Login', 'simplemodal-login'),
  20.                 __('Username', 'simplemodal-login'),
  21.                 __('Password', 'simplemodal-login')
  22.         );
  23.  
  24.         do_action('login_form');
  25.  
  26.         $output .= sprintf('
  27.         <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" class="rememberme" value="forever" tabindex="90" />%s</label></p>
  28.         <p class="submit">
  29.                 <input type="submit" name="wp-submit" value="%s" tabindex="100" />
  30.                 <input type="button" class="simplemodal-close" value="%s" tabindex="101" />
  31.                 <input type="hidden" name="testcookie" value="1" />
  32.         </p>
  33.         <p class="nav">',
  34.                 __('Remember Me', 'simplemodal-login'),
  35.                 __('Log In', 'simplemodal-login'),
  36.                 __('Cancel', 'simplemodal-login')
  37.         );
  38.  
  39.         if ($users_can_register && $options['registration']) {
  40.                 $output .= sprintf('<a class="simplemodal-register" href="%s">%s</a>',
  41.                         site_url('wp-login.php?action=register', 'login'),
  42.                         __('Register', 'simplemodal-login')
  43.                 );
  44.         }
  45.  
  46.         if (($users_can_register && $options['registration']) && $options['reset']) {
  47.                 $output .= ' | ';
  48.         }
  49.  
  50.         if ($options['reset']) {
  51.                 $output .= sprintf('<a class="simplemodal-forgotpw" href="%s" title="%s">%s</a>',
  52.                         site_url('wp-login.php?action=lostpassword', 'login'),
  53.                         __('Password Lost and Found', 'simplemodal-login'),
  54.                         __('Lost your password?', 'simplemodal-login')
  55.                 );
  56.         }
  57.  
  58.         $output .= '
  59.         </p>
  60.         </div>
  61.         <div class="simplemodal-login-activity" style="display:none;"></div>
  62. </form>';
  63.  
  64.         return $output;
  65. }