classes/Tools/Crop/CropTool.php
public function setup()
    {
        if ($this->enabled())
        {
            $this->hookupUI();

            add_action('admin_enqueue_scripts', [$this,'enqueueTheGoods']);
            add_action('wp_ajax_ilab_crop_image_page',[$this,'displayCropUI']);
            add_action('wp_ajax_ilab_perform_crop',[$this,'performCrop']);

            add_filter('ilab_s3_process_crop', function($size, $path, $sizeMeta){
                return $sizeMeta;
            }, 3, 3);
            add_filter('ilab_s3_process_file_name', function($filename) {
                return $filename;
            }, 3, 1);
        }
    }
public function setup()
    {
        if ($this->enabled())
        {
            $this->hookupUI();

            add_action('admin_enqueue_scripts', [$this,'enqueueTheGoods']);
            add_action('wp_ajax_ilab_crop_image_page',[$this,'displayCropUI']);
            add_action('wp_ajax_ilab_perform_crop',[$this,'performCrop']);

            add_filter('ilab_s3_process_crop', function($size, $path, $sizeMeta){
                return $sizeMeta;
            }, 3, 3);
            add_filter('ilab_s3_process_file_name', function($filename) {
                return $filename;
            }, 3, 1);
        }
    }
public function setup ( ) { if ( $ this -> enabled ( ) ) { $ this -> hookupUI ( ) ; add_action ( 'admin_enqueue_scripts' , [ $ this , 'enqueueTheGoods' ] ) ; add_action ( 'wp_ajax_ilab_crop_image_page' , [ $ this , 'displayCropUI' ] ) ; add_action ( 'wp_ajax_ilab_perform_crop' , [ $ this , 'performCrop' ] ) ; add_filter ( 'ilab_s3_process_crop' , function ( $ size , $ path , $ sizeMeta ) { return $ sizeMeta ; } , 3 , 3 ) ; add_filter ( 'ilab_s3_process_file_name' , function ( $ filename ) { return $ filename ; } , 3 , 1 ) ; } }
Setup the plugin
Setup the plugin