'text',
'required' => false,
) );
if ( ! isset( $args['id'] ) ) {
$args['id'] = sanitize_html_class( preg_replace( '/\[(.*?)\]/', '__$1', $args['name'] ) );
}
$function = 'render_' . $args['type'];
if ( method_exists( 'Suki_Admin_Fields', $function ) ) {
self::$function( $args );
}
}
/**
* Text control
*
* @param array $args
*/
private static function render_text( $args ) {
if ( ! isset( $args['name'] ) ) return;
$args = wp_parse_args( $args, array(
'value' => '',
'placeholder' => '',
'class' => 'regular-text',
) );
?>
>
'',
'placeholder' => '',
'class' => 'regular-text',
'rows' => 3,
) );
?>
'',
'placeholder' => '',
'class' => 'regular-text',
) );
?>
>
'',
'placeholder' => '',
'min' => '',
'max' => '',
'step' => '',
'class' => 'small-text',
) );
?>
>
'',
'return_value' => 1,
'label' => '',
'class' => '',
) );
?>
'',
'default' => '',
'label' => '',
'class' => '',
) );
?>
>
'',
'placeholder' => '',
'choices' => array(),
'class' => '',
) );
?>
'',
'placeholder' => '',
'class' => 'regular-text',
'library' => '',
'frame_title' => esc_html__( 'Upload & choose file', 'suki' ),
'frame_button' => esc_html__( 'Choose', 'suki' ),
) );
?>
>
tags for