settings = new Settings(); $this->meta_box = new Meta_Box($this->settings); $this->rest = new REST(); $this->generator = new Generator($this->settings); $this->product_images = new Product_Images($this->settings, $this->generator); $this->product_images->register_hooks(); $this->product_images->set_meta_box($this->meta_box); $this->product_unify = new Product_Unify($this->settings, $this->product_images); $this->product_unify->register_hooks(); $this->settings->set_product_images($this->product_images); $this->audio = new Audio($this->settings); $this->audio->register_hooks(); $this->podcast = new Podcast($this->settings, $this->audio); $this->podcast->register_hooks(); $this->abilities = new Abilities($this->settings, $this->generator, $this->product_images, $this->product_unify); $this->image_audit = new Image_Audit($this->settings, $this->generator, $this->abilities); $this->image_audit->register_hooks(); $this->auto_generate = new Auto_Generate($this->settings, $this->generator); $this->auto_generate->register_hooks(); $this->blocks = new Blocks($this->settings, $this->generator); $this->bulk = new Bulk($this->settings, $this->generator); $this->list_actions = new List_Actions($this->settings, $this->generator); $this->review_request = new Review_Request($this->settings); $this->compatibility_notice = new Compatibility_Notice($this->settings); $this->whats_new_notice = new Whats_New_Notice($this->settings); $this->stability_removed_notice = new Stability_Removed_Notice($this->settings); // Register hooks $this->register_hooks(); } /** * Register plugin hooks. */ private function register_hooks() { // Add settings link to plugins page add_filter('plugin_action_links_' . plugin_basename(AIFI_PLUGIN_DIR . 'ai-featured-image.php'), array($this, 'add_settings_link') ); } /** * Add settings link to plugin listing. * * @param array $links Plugin action links. * @return array */ public function add_settings_link($links) { $settings_link = sprintf( '%s', admin_url('admin.php?page=ai-featured-image-generator'), __('Settings', 'ai-featured-image-generator') ); array_unshift($links, $settings_link); return $links; } }