@george J I added a few changes more in your plugin to add support for admin bar in front side (not only in wp-admin), please correct me if some is wrong:
if (!defined('ABSPATH'))
exit;
require_once( ABSPATH . "wp-includes/pluggable.php" );
if (is_user_logged_in()) {
class OpenSans_FTW {
protected static $instance = null;
public $plugin_slug = 'opensans-ftw';
public static function get_instance() {
if (null == self::$instance) {
self::$instance = new self;
}
return self::$instance;
}
public function __construct() {
$wp_version = get_bloginfo('version');
if (version_compare($wp_version, '4.6', '<')) {
return;
}
if(is_admin()) {
add_action('admin_enqueue_scripts', array($this, 'add_assets'));
} else {
add_action('wp_footer', array($this, 'add_assets'));
}
}
public function add_assets() {
// add font
wp_enqueue_style($this->plugin_slug, '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin,latin-ext');
// add custom css
if(is_admin()) {
$custom_css = 'body, #wpadminbar *:not([class="ab-icon"]), .wp-core-ui { font-family: "Open Sans", sans-serif !important; }';
wp_add_inline_style($this->plugin_slug, $custom_css);
} else {
$custom_css = '#wpadminbar *:not([class="ab-icon"]) { font-family: "Open Sans", sans-serif !important; }';
echo "<style type='text/css' media='all'>\n";
echo "$custom_css";
echo "</style>\n";
}
}
}
add_action('plugins_loaded', array('OpenSans_FTW', 'get_instance'));
}