Skip to content
Snippets Groups Projects

release: 3.0.0

Merged Krzysztof Dyszczyk requested to merge devel into master
6 files
+ 37
24
Compare changes
  • Side-by-side
  • Inline

Files

+ 10
2
@@ -2,6 +2,8 @@
namespace WPDesk\Forms\Field\Traits;
use WPDesk\Forms\Field;
/**
* Implementation of HTML attributes like id, name, action etc.
*
@@ -29,13 +31,19 @@ trait HtmlAttributes {
);
}
public function set_attribute( string $name, string $value ): self {
/**
* @return \WPDesk\Forms\Field|\WPDesk\Forms\Form
*/
public function set_attribute( string $name, string $value ) {
$this->attributes[ $name ] = $value;
return $this;
}
public function unset_attribute( string $name ): self {
/**
* @return \WPDesk\Forms\Field|\WPDesk\Forms\Form
*/
public function unset_attribute( string $name ) {
unset( $this->attributes[ $name ] );
return $this;
Loading