RTL the spam trap

Avoids horizontal scroll on rtl. (and some minor code styling)
This commit is contained in:
Yakir Gottesman 2014-05-28 20:50:26 +03:00
parent a723b4ed3c
commit 2940a35509
1 changed files with 6 additions and 2 deletions

View File

@ -2,7 +2,7 @@
/**
* Login Form
*
* @author WooThemes
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.1.0
*/
@ -92,7 +92,11 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php endif; ?>
<!-- Spam Trap -->
<div style="left:-999em; position:absolute;"><label for="trap"><?php _e( 'Anti-spam', 'woocommerce' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" /></div>
<?php // Avoids horizontal scroll on rtl
$direction = 'left';
if ( is_rtl() ) { $direction = 'right'; }
?>
<div style="<?php echo $direction; ?>: -999em; position: absolute;"><label for="trap"><?php _e( 'Anti-spam', 'woocommerce' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" /></div>
<?php do_action( 'woocommerce_register_form' ); ?>
<?php do_action( 'register_form' ); ?>