Permalink
Browse files

Correc the CSS class for email field

  • Loading branch information...
1 parent 1698753 commit a6374b9a4ab24845abbbd9d8f47f78182382aab1 @rilwis committed Mar 26, 2013
Showing with 19 additions and 20 deletions.
  1. +11 −11 inc/fields/email.php
  2. +8 −9 inc/fields/url.php
View
@@ -5,7 +5,7 @@
// Make sure "text" field is loaded
require_once RWMB_FIELDS_DIR . 'text.php';
-if ( ! class_exists( 'RWMB_Email_Field' ) )
+if ( !class_exists( 'RWMB_Email_Field' ) )
{
class RWMB_Email_Field extends RWMB_Text_Field
{
@@ -21,28 +21,28 @@ class RWMB_Email_Field extends RWMB_Text_Field
static function html( $html, $meta, $field )
{
return sprintf(
- '<input type="email" class="rwmb-url" name="%s" id="%s" value="%s" size="%s" />',
+ '<input type="email" class="rwmb-email" name="%s" id="%s" value="%s" size="%s" />',
$field['field_name'],
$field['id'],
$meta,
$field['size']
);
}
-
+
/**
- * Sanitizes url
+ * Sanitize email
*
- * @param $post_id
- * @param $field
- * @param $old
- * @param $new
+ * @param mixed $new
+ * @param mixed $old
+ * @param int $post_id
+ * @param array $field
*
- * @return $new
+ * @return string
*/
- static function value( $new, $old, $post_id, $field)
+ static function value( $new, $old, $post_id, $field )
{
return sanitize_email( $new );
}
}
-}
+}
View
@@ -29,20 +29,19 @@ static function html( $html, $meta, $field )
);
}
-
/**
- * Sanitizes url
+ * Sanitize url
*
- * @param $post_id
- * @param $field
- * @param $old
- * @param $new
+ * @param mixed $new
+ * @param mixed $old
+ * @param int $post_id
+ * @param array $field
*
- * @return $new
+ * @return string
*/
- static function value( $new, $old, $post_id, $field)
+ static function value( $new, $old, $post_id, $field)
{
return esc_url( $new );
}
}
-}
+}

0 comments on commit a6374b9

Please sign in to comment.