How to Add New Field
FAQ
How to Add New Field
.
├── wpsf-framework
| ├── fields
| | ├── password
| | | ├── password.phpif ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
/**
*
* Field: Password
*
* @since 1.0
* @version 1.0
*
*/
class WPSFFramework_Option_password extends WPSFFramework_Options {
public function __construct( $field, $value = '', $unique = '' ) {
parent::__construct( $field, $value, $unique );
}
public function output(){
echo $this->element_before();
echo '<input type="password" name="'. $this->element_name() .'" value="'. $this->element_value() .'"'. $this->element_class() . $this->element_attributes() .'/>';
echo $this->element_after();
}
}Last updated