Overwriting CSS
-
Hi from Germany,
first of all: Fantastic plugin, works like a charm out of the box, even on my old iPhone.
But if I could make a whish, you could probably check for the existance of a css file, let’s say “karma_by_kadar.css”, in the theme or childtheme directory, before including your master.css. Would make customization of the player (colors, shadows, etc.) a bit easier.
// CSS files. if(file_exists(get_stylesheet_directory(). '/assets/css/karma_by_kadar.css')){ wp_enqueue_style( 'karma-by-kadar-master', get_stylesheet_directory_uri(). '/assets/css/karma_by_kadar.css' ); } else { wp_enqueue_style( 'karma-by-kadar-master', KARMA_BY_KADAR__PLUGIN_URL . 'assets/css/master.css' ); }
Another thing that came to my mind is the inclusion of the jquery.ui.slider-rtl.js script. Since that is only needed, if a language is really using right to left, you could wrap the enqueuing in a statement like this:
// JS files. wp_enqueue_script( 'jquery-ui-slider' ); if(is_rtl()){ wp_enqueue_script( 'karma-by-kadar-jquery-ui-slider-rtl', KARMA_BY_KADAR__PLUGIN_URL . 'assets/js/jquery.ui.slider-rtl.js' , array('jquery'), true, true ); }
Thanks for the effort you put into this plugin, I will definitively use it in my upcoming homepage relaunch.
- The topic ‘Overwriting CSS’ is closed to new replies.