admin = new Welcoma_Admin(); } $this->frontend = new Welcoma_Frontend(); // Activation counters (AJAX endpoints + catalogue sync). // Backfill 'enabled' for any module registered after this site's // settings were first saved (see Welcoma_Settings::sync_enabled_modules()). add_action( 'admin_init', array( 'Welcoma_Settings', 'sync_enabled_modules' ) ); // Settings link on the Plugins screen. add_filter( 'plugin_action_links_' . WELCOMA_WIDGET_BASENAME, array( $this, 'action_links' ) ); } /** * Add a "Settings" link under the plugin name. * * @param array $links Existing links. * @return array */ public function action_links( $links ) { $url = admin_url( 'admin.php?page=welcoma' ); $settings = '' . esc_html__( 'Settings', 'welcoma-accessibility-widget' ) . ''; array_unshift( $links, $settings ); return $links; } }