diff --git a/includes/base/class-base-transformer.php b/includes/base/class-base-transformer.php new file mode 100644 index 0000000..7c2d445 --- /dev/null +++ b/includes/base/class-base-transformer.php @@ -0,0 +1,28 @@ +require_files(); + + add_action( 'elementor/ajax/register_actions', [ $this, 'register_ajax_actions' ] ); + } + + /** + * Register a transformer. + * + * @since version_number_transformer_management_placeholder + * @access public + * + * @param \ActivityPub\Base_Transformer $transformer_instance ActivityPub Transformer. + * + * @return bool True if the transformer was registered. + */ + public function register( Base_Transformer $control_instance, $control_id = null ) { + + // TODO: For BC. Remove in the future. + if ( $control_id ) { + Plugin::instance()->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_argument( + '$control_id', '3.5.0' + ); + } else { + $control_id = $control_instance->get_type(); + } + + $this->controls[ $control_id ] = $control_instance; + } + +} \ No newline at end of file