Breaks admin CSS
-
Hi,
my back-office is CSS broken because MailJet plugin for WordPress is loading external jQuery UI CSS in the admin. You should enqueue_style and enqueue_script in a better way to prevent this kind of bugs. 🙂
public function enqueue_scripts() { wp_enqueue_script('jquery-ui'); wp_enqueue_script('jquery-ui-accordion'); wp_enqueue_script('jquery-ui-tooltip'); wp_enqueue_style('jquery-ui', '//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css'); wp_enqueue_style('mailjet_css', plugins_url('/assets/mailjet.css', __FILE__)); wp_register_script('mailjet_js', plugins_url('/assets/js/mailjet.js', __FILE__), array('jquery')); wp_enqueue_script('mailjet_js'); $this->addMjJsGlobalVar(); }This piece of code shouldn’t load in every section of WP admin !
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘Breaks admin CSS’ is closed to new replies.