Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Eric Martin

By: a guest on Dec 7th, 2010  |  syntax: PHP  |  size: 2.17 KB  |  hits: 3,344  |  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.         ob_start();
  25.         do_action('login_form');
  26.         $output .= ob_get_clean();
  27.  
  28.         $output .= sprintf('
  29.         <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" class="rememberme" value="forever" tabindex="90" />%s</label></p>
  30.         <p class="submit">
  31.                 <input type="submit" name="wp-submit" value="%s" tabindex="100" />
  32.                 <input type="button" class="simplemodal-close" value="%s" tabindex="101" />
  33.                 <input type="hidden" name="testcookie" value="1" />
  34.         </p>
  35.         <p class="nav">',
  36.                 __('Remember Me', 'simplemodal-login'),
  37.                 __('Log In', 'simplemodal-login'),
  38.                 __('Cancel', 'simplemodal-login')
  39.         );
  40.  
  41.         if ($users_can_register && $options['registration']) {
  42.                 $output .= sprintf('<a class="simplemodal-register" href="%s">%s</a>',
  43.                         site_url('wp-login.php?action=register', 'login'),
  44.                         __('Register', 'simplemodal-login')
  45.                 );
  46.         }
  47.  
  48.         if (($users_can_register && $options['registration']) && $options['reset']) {
  49.                 $output .= ' | ';
  50.         }
  51.  
  52.         if ($options['reset']) {
  53.                 $output .= sprintf('<a class="simplemodal-forgotpw" href="%s" title="%s">%s</a>',
  54.                         site_url('wp-login.php?action=lostpassword', 'login'),
  55.                         __('Password Lost and Found', 'simplemodal-login'),
  56.                         __('Lost your password?', 'simplemodal-login')
  57.                 );
  58.         }
  59.  
  60.         $output .= '
  61.         </p>
  62.         </div>
  63.         <div class="simplemodal-login-activity" style="display:none;"></div>
  64. </form>';
  65.  
  66.         return $output;
  67. }