function lessekirki_filtered_url() { $config = apply_filters('lessekirki/config', array()); if (isset($config['url_path'])) { Lessekirki::$url = esc_url_raw($config['url_path']); } }
/** * Properly set the Lessekirki URL for assets * Determines if Lessekirki is installed as a plugin, in a child theme, or a parent theme * and then does some calculations to get the proper URL for its CSS & JS assets * * @return string */ public function set_url() { /** * Are we on a parent theme? */ if (Lessekirki_Toolkit::is_parent_theme(__FILE__)) { $relative_url = str_replace(Lessekirki_Toolkit::clean_file_path(get_template_directory()), '', dirname(dirname(__FILE__))); Lessekirki::$url = trailingslashit(get_template_directory_uri() . $relative_url); } elseif (Lessekirki_Toolkit::is_child_theme(__FILE__)) { $relative_url = str_replace(Lessekirki_Toolkit::clean_file_path(get_stylesheet_directory()), '', dirname(dirname(__FILE__))); Lessekirki::$url = trailingslashit(get_stylesheet_directory_uri() . $relative_url); } else { Lessekirki::$url = plugin_dir_url(dirname(__FILE__) . 'lessekirki.php'); } }