correcting and standarizing register hooks for exposers and others #293
This commit is contained in:
parent
5a80dac292
commit
a81138243b
|
@ -29,7 +29,7 @@ class Export_Handler {
|
|||
'manual_collection' => false
|
||||
]);
|
||||
|
||||
do_action('tainacan_register_exporters');
|
||||
do_action('tainacan-register-exporters');
|
||||
|
||||
add_action( 'tainacan-enqueue-admin-scripts', array($this, 'enqueue_scripts') );
|
||||
}
|
||||
|
|
|
@ -29,18 +29,23 @@ class Exposers_Handler {
|
|||
|
||||
public function __construct() {
|
||||
self::$instance = $this;
|
||||
|
||||
add_action('init', array(&$this, 'init'));
|
||||
|
||||
add_filter( 'rest_request_after_callbacks', [$this, 'rest_request_after_callbacks'], 10, 3 ); //exposer types
|
||||
|
||||
add_filter( 'tainacan-api-get-items-alternate', [$this, 'filter_check_items_request'], 10, 2 );
|
||||
|
||||
}
|
||||
|
||||
function init() {
|
||||
//$this->register_exposer('Tainacan\Exposers\Xml');
|
||||
//$this->register_exposer('Tainacan\Exposers\Txt');
|
||||
$this->register_exposer('Tainacan\Exposers\Html');
|
||||
$this->register_exposer('Tainacan\Exposers\Csv');
|
||||
//$this->register_exposer('Tainacan\Exposers\OAI_PMH');
|
||||
//$this->register_exposer('Tainacan\Exposers\JSON_LD');
|
||||
do_action('tainacan-register-exposer', $this);
|
||||
|
||||
add_filter( 'rest_request_after_callbacks', [$this, 'rest_request_after_callbacks'], 10, 3 ); //exposer types
|
||||
|
||||
add_filter( 'tainacan-api-get-items-alternate', [$this, 'filter_check_items_request'], 10, 2 );
|
||||
|
||||
do_action('tainacan-register-exposers', $this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -79,7 +79,7 @@ class Importer_Handler {
|
|||
'manual_mapping' => true,
|
||||
]);
|
||||
|
||||
do_action('tainacan_register_importers');
|
||||
do_action('tainacan-register-importers');
|
||||
|
||||
add_action( 'tainacan-enqueue-admin-scripts', array($this, 'enqueue_scripts') );
|
||||
}
|
||||
|
|
|
@ -21,11 +21,9 @@ class Mappers_Handler {
|
|||
|
||||
public function __construct() {
|
||||
self::$instance = $this;
|
||||
|
||||
add_action('init', array(&$this, 'init'));
|
||||
|
||||
$this->register_mapper('Tainacan\Mappers\Dublin_Core');
|
||||
|
||||
do_action('tainacan-register-mappers', $this);
|
||||
|
||||
add_filter( 'tainacan-admin-i18n', [$this, 'mappers_i18n']);
|
||||
|
||||
add_action('tainacan-api-collection-created', [$this, 'create_mapped_collection'], 10, 2);
|
||||
|
@ -34,6 +32,12 @@ class Mappers_Handler {
|
|||
|
||||
}
|
||||
|
||||
function init() {
|
||||
$this->register_mapper('Tainacan\Mappers\Dublin_Core');
|
||||
|
||||
do_action('tainacan-register-mappers', $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* register mappers class
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue