Merge branch 'develop' of https://github.com/tainacan/tainacan into develop
This commit is contained in:
commit
472a6affab
|
@ -5,9 +5,8 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|||
|
||||
/**
|
||||
* Class TainacanFieldType
|
||||
* List_Filter because List is reseved
|
||||
*/
|
||||
class List_Filter extends Filter_Type {
|
||||
class Selectbox extends Filter_Type {
|
||||
|
||||
function __construct(){
|
||||
parent::set_supported_types(['string']);
|
|
@ -59,7 +59,7 @@ function tainacan_autoload($class_name){
|
|||
$dir = CLASSES_DIR;
|
||||
}
|
||||
|
||||
if( in_array('Field_Types', $class_path) ){
|
||||
if( in_array('Field_Types', $class_path) || in_array('Filter_Types', $class_path) ){
|
||||
$dir.= strtolower(str_replace('_', '-' , $class_name)).'/';
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ $Tainacan_Filters = new \Tainacan\Repositories\Filters();
|
|||
|
||||
//register filter type
|
||||
$Tainacan_Filters->register_filter_type('Tainacan\Filter_Types\Range');
|
||||
$Tainacan_Filters->register_filter_type('Tainacan\Filter_Types\List_Filter');
|
||||
$Tainacan_Filters->register_filter_type('Tainacan\Filter_Types\Selectbox');
|
||||
|
||||
global $Tainacan_Taxonomies;
|
||||
$Tainacan_Taxonomies = new \Tainacan\Repositories\Taxonomies();
|
||||
|
|
|
@ -65,7 +65,7 @@ class Filters extends TAINACAN_UnitTestCase {
|
|||
true
|
||||
);
|
||||
|
||||
$filter_list_type = $this->tainacan_filter_factory->create_filter('list_filter');
|
||||
$filter_list_type = $this->tainacan_filter_factory->create_filter('selectbox');
|
||||
|
||||
$filter = $this->tainacan_entity_factory->create_entity(
|
||||
'filter',
|
||||
|
|
Loading…
Reference in New Issue