Skip to content

Instantly share code, notes, and snippets.

@mathetos
Created April 17, 2020 04:49
Show Gist options
  • Save mathetos/7f0d89996c891537ee06c5ced4fd6642 to your computer and use it in GitHub Desktop.
Save mathetos/7f0d89996c891537ee06c5ced4fd6642 to your computer and use it in GitHub Desktop.
Enqueue custom editor stylesheet for Elementor
<?php
add_action('elementor/editor/before_enqueue_scripts', 'custom_editor_enqueue_scripts');
// editor styles
function custom_editor_enqueue_scripts() {
// If you're making a GiveWP add-on and need the Give admin styles, you'll need to enqueue it here as well
wp_enqueue_style( 'give-admin-styles', GIVE_PLUGIN_URL . 'assets/dist/css/admin.rtl.css', array(), GIVE_VERSION );
// Then enqueue your stuff like normal.
wp_enqueue_style('dw4elementor-admin-styles', GiveWP_DW_4_Elementor_URL . '/assets/dw4elementor-admin.css', array('give-admin-styles') , mt_rand(9,999) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment