%2$s', esc_url( admin_url( 'options-general.php?page=acknowledgify' ) ), esc_html__( 'Settings', 'acknowledgify' ) ); array_unshift( $links, $settings_link ); return $links; } add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'acknowledgify_plugin_settings_link' ); /** * Activation: register the humans.txt route, then flush once. * * Flushing is expensive and must never happen on a normal page load. The only * places flush_rewrite_rules() is called are here, on deactivation, and when the * humans.txt toggle is saved to a new value. * * @return void */ function acknowledgify_activation() { \Acknowledgify\Includes\Humans_Txt::add_rewrite_rules(); flush_rewrite_rules(); } register_activation_hook( __FILE__, 'acknowledgify_activation' ); /** * Deactivation: drop the humans.txt route from the stored rules. * * @return void */ function acknowledgify_deactivation() { flush_rewrite_rules(); } register_deactivation_hook( __FILE__, 'acknowledgify_deactivation' );