This commit is contained in:
ThemeLexus
2019-09-28 16:39:55 +07:00
parent 2195d7e04f
commit f306df84c8
106 changed files with 2720 additions and 1356 deletions

View File

@@ -17,7 +17,18 @@ if( !class_exists( 'CMB2_Switch_Button' ) ) {
public function __construct() {
add_action( 'cmb2_render_switch', array( $this, 'callback' ), 10, 5 );
add_action( 'admin_head', array( $this, 'admin_head' ) );
add_filter( 'cmb2_sanitize_switch', array( $this, 'sanitize' ), 10, 4 );
}
public function sanitize ( $override_value, $value, $object_id, $field_args ) {
if( $value != "on" ) {
$value = 'off';
}
return $value;
}
public function callback($field, $escaped_value, $object_id, $object_type, $field_type_object) {
$field_name = $field->_name();

0
inc/vendors/cmb2-plugins/custom-fields/iconpicker/iconpicker.php vendored Executable file → Normal file
View File

0
inc/vendors/cmb2-plugins/custom-fields/user/user.php vendored Executable file → Normal file
View File