Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Eric Martin

By: a guest on Dec 7th, 2010  |  syntax: PHP  |  size: 1.80 KB  |  views: 2,737  |  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_registration_form', 'mytheme_registration_form');
  2. function mytheme_registration_form($form) {
  3.         $options = get_option('simplemodal_login_options');
  4.  
  5.         $output = sprintf('
  6. <form name="registerform" id="registerform" action="%s" method="post">
  7.         <div class="title">%s</div>
  8.         <div class="simplemodal-login-fields">
  9.         <p>
  10.                 <label>%s<br />
  11.                 <input type="text" name="user_login" class="user_login input" value="" size="20" tabindex="10" /></label>
  12.         </p>
  13.         <p>
  14.                 <label>%s<br />
  15.                 <input type="text" name="user_email" class="user_email input" value="" size="25" tabindex="20" /></label>
  16.         </p>',
  17.                 site_url('wp-login.php?action=register', 'login_post'),
  18.                 __('Register', 'simplemodal-login'),
  19.                 __('Username', 'simplemodal-login'),
  20.                 __('E-mail', 'simplemodal-login')
  21.         );
  22.  
  23.         ob_start();
  24.         do_action('register_form');
  25.         $output .= ob_get_clean();
  26.  
  27.         $output .= sprintf('
  28.         <p class="reg_passmail">%s</p>
  29.         <p class="submit">
  30.                 <input type="submit" name="wp-submit" value="%s" tabindex="100" />
  31.                 <input type="button" class="simplemodal-close" value="%s" tabindex="101" />
  32.         </p>
  33.         <p class="nav">
  34.                 <a class="simplemodal-login" href="%s">%s</a>',
  35.                 __('A password will be e-mailed to you.', 'simplemodal-login'),
  36.                 __('Register', 'simplemodal-login'),
  37.                 __('Cancel', 'simplemodal-login'),
  38.                 site_url('wp-login.php', 'login'),
  39.                 __('Log in', 'simplemodal-login')
  40.         );
  41.  
  42.         if ($options['reset']) {
  43.                 $output .= sprintf(' | <a class="simplemodal-forgotpw" href="%s" title="%s">%s</a>',
  44.                         site_url('wp-login.php?action=lostpassword', 'login'),
  45.                         __('Password Lost and Found', 'simplemodal-login'),
  46.                         __('Lost your password?', 'simplemodal-login')
  47.                 );
  48.         }
  49.  
  50.         $output .= '
  51.         </p>
  52.         </div>
  53.         <div class="simplemodal-login-activity" style="display:none;"></div>
  54. </form>';
  55.  
  56.         return $output;
  57. }