/** * Determine path to enqueue * * @param string $theme * @param string $path * @return string */ private function enqueue_path($theme, $path) { if (preg_match('/^https?:\\/\\//i', $path)) { return $path; } else { return ICE_Files::theme_file_url($theme, $path); } }
/** */ public function get_image_url($size = 'thumbnail') { // get the value $value = $this->get(); // did we get a number? if (is_numeric($value) && $value >= 1) { // get the details $src = $this->get_image_src($size, $value); // try to return a url return $src ? $src[0] : false; } elseif (is_string($value) && strlen($value) >= 1) { // use default $directive = $this->directive()->get('default_value'); // they must have provided an image path return ICE_Files::theme_file_url($directive->get_theme(), $directive->get_value()); } return null; }