admin = new AccessVane_Admin(); $this->rest = new AccessVane_REST(); $this->fixes = new AccessVane_Fixes(); $this->alt_text = new AccessVane_Alt_Text(); $this->statement = new AccessVane_Statement(); $this->sibling = new AccessVane_Sibling(); $this->review = new AccessVane_Review(); $this->editor = new AccessVane_Editor(); $this->admin->register(); $this->rest->register(); $this->fixes->register(); $this->alt_text->register(); $this->statement->register(); $this->sibling->register(); $this->review->register(); $this->editor->register(); add_filter( 'plugin_action_links_' . ACCESSVANE_BASENAME, array( $this, 'action_links' ) ); } /** * Add a Settings shortcut on the Plugins screen. * * @param array $links Existing links. * @return array */ public function action_links( $links ) { $url = admin_url( 'admin.php?page=accessvane' ); array_unshift( $links, sprintf( '%s', esc_url( $url ), esc_html__( 'Scan my site', 'accessvane' ) ) ); return $links; } /** * Activation: seed default options only. No tables are created — scan * results live in a single option, which keeps uninstall trivially clean and * avoids a schema to migrate later. * * @return void */ public static function on_activate() { AccessVane_Settings::seed_defaults(); AccessVane_Review::remember_install_date(); set_transient( 'accessvane_just_activated', 1, 60 ); } /** * Deactivation: nothing to tear down. Settings and results survive so a * temporary deactivation does not lose the visitor's work. * * @return void */ public static function on_deactivate() { delete_transient( 'accessvane_just_activated' ); } }