/** * Load frontend CSS if the widget is active. * * @wp-hook template_redirect * * @return bool */ public function require_style() { if (!is_active_widget(FALSE, FALSE, self::$handle)) { return FALSE; } $theme_support = get_theme_support('multilingualpress'); if (!empty($theme_support[0]['language_switcher_widget_style'])) { return FALSE; } self::$assets->provide('mlp_frontend_css'); return TRUE; }
/** * @return void */ public function register_script() { $this->assets->provide(array('mlp-admin', 'mlp_admin_css')); }