array( 'class' => true, 'style' => true, ), 'small' => array( 'class' => true, ), 'input' => array( 'class' => true, 'type' => true, 'name' => true, 'value' => true, 'checked' => true, 'disabled' => true, 'autocomplete' => true, 'placeholder' => true, ), 'select' => array( 'name' => true, 'class' => true, 'disabled' => true, ), 'option' => array( 'value' => true, 'selected' => true, ), ); } /** * Creates a settings row with an input field. * * @param string $label Field label. * @param string $description Field description. * @param string $name Field name. * @param mixed $value Field value. * @param string $type Input type. * @param bool $disabled Whether the field is disabled. * @return string */ function dweb_ps_setting_create_row( $label, $description, $name, $value, $type = 'number', $disabled = false ) { $checked = ''; if ( 'checkbox' === $type ) { $checked = $value ? 'checked' : ''; $value = 1; } $disabled_attr = $disabled ? 'disabled' : ''; return sprintf( '