LLMS_Post_Model::get_property_type( string $key )
Get a property’s data type for scrubbing
Description Description
Used by $this->scrub() to determine how to scrub the property.
Parameters Parameters
- $key
-
(string) (Required) Property key.
Return Return
(string)
Source Source
File: includes/abstracts/abstract.llms.post.model.php
protected function get_property_type( $key ) {
$props = $this->get_properties();
// Check against the properties array.
if ( in_array( $key, array_keys( $props ) ) ) {
$type = $props[ $key ];
} else {
$type = 'text';
}
return $type;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |