Import legacy nurinda.co.id website

This commit is contained in:
dirga committed 2026-10-01 14:27:19 +07:00
1 parent 3f59bb9038
commit 6e21646ac4
13389 files changed
+3246690

No files matched your search

@@ -0,0 +1,50 @@
<?php
/**
* Email field class.
*/
class MASHSB_RWMB_Email_Field extends MASHSB_RWMB_Text_Field
{
/**
* Normalize parameters for field
*
* @param array $field
*
* @return array
*/
static function normalize( $field )
{
$field = parent::normalize( $field );
return $field;
}
/**
* Get the attributes for a field
*
* @param array $field
* @param mixed $value
*
* @return array
*/
static function get_attributes( $field, $value = null )
{
$attributes = parent::get_attributes( $field, $value );
$attributes['type'] = 'email';
return $attributes;
}
/**
* Sanitize email
*
* @param mixed $new
* @param mixed $old
* @param int $post_id
* @param array $field
*
* @return string
*/
static function value( $new, $old, $post_id, $field )
{
return $field['clone'] ? array_map( 'sanitize_email', (array) $new ) : sanitize_email( $new );
}
}