diff --git a/wpenq-helper.php b/wpenq-helper.php index a1e9117..f3875f2 100644 --- a/wpenq-helper.php +++ b/wpenq-helper.php @@ -102,11 +102,13 @@ public static function isset_array($array, $index, $default = array()) { * @return string Full asset URL */ public static function get_full_url($value) { + if((bool) preg_match("/^https?:\/\/.*$/xi", $value)) { + return $value; + } if (mb_stripos($value, 'custom') === 0) { return self::$plugin_url . 'assets/' . $value; - } else { - return self::$theme_url . $value; } + return self::$theme_url . $value; } public static function set_default_scripts($scripts) { @@ -146,4 +148,4 @@ function plugin_assets($hook) { wp_enqueue_script('editable-select-js', $url . 'assets/plugin/jquery.editable-select.min.js'); } -add_action('admin_enqueue_scripts', 'plugin_assets'); \ No newline at end of file +add_action('admin_enqueue_scripts', 'plugin_assets');