function save_image_url($y) { $ttttt = array('error' => 0, 'name' => '', 'ext' => '', 'path' => ''); $yyyyyyyy = curl_get_content($y); $ppppppp = generate_picture_name(); $hhhhh = generate_dir_upload($ppppppp, 'organic'); $yyyy = get_header_type($y); if (!$yyyy) { $ttttt['error'] = 1; return $ttttt; } $ppppppp = $ppppppp . '.' . $yyyy; if (file_put_contents($hhhhh . $ppppppp, $yyyyyyyy)) { $ttttt = array('name' => $ppppppp, 'ext' => $yyyy, 'path' => $hhhhh . $ppppppp, 'error' => 0, 'link' => get_picture_path($ppppppp)); } return $ttttt; }
function save_image_url($url) { $array_return = array('error' => 0, 'name' => '', 'ext' => '', 'path' => ''); $image_content = curl_get_content($url); $filename = generate_picture_name(); $path_dir = generate_dir_upload($filename, 'organic'); $extension = get_header_type($url); if (!$extension) { $array_return['error'] = 1; return $array_return; } $filename = $filename . '.' . $extension; if (file_put_contents($path_dir . $filename, $image_content)) { $array_return = array('name' => $filename, 'ext' => $extension, 'path' => $path_dir . $filename, 'error' => 0, 'link' => get_picture_path($filename)); } return $array_return; }
function etheme_search_form() { $search_view = etheme_get_option('search_view'); if (in_array(get_header_type(), array('vertical', 'vertical2'))) { $search_view = "modal"; } ?> <div class="header-search "> <?php if ($search_view == 'modal') { ?> <div class="et-search-trigger"> <a class="popup-with-form" href="#searchModal"><i class="fa fa-search"></i> <span><?php _e('Search', ETHEME_DOMAIN); ?> </span></a> </div> <?php } else { ?> <div class="et-search-trigger search-dropdown"> <div><i class="fa fa-search"></i></div> <?php if (!class_exists('WooCommerce')) { get_search_form(); } else { get_template_part('woosearchform'); } ?> </div> <?php } ?> </div> <?php }
<?php etheme_top_cart(); ?> <?php } ?> <?php if (etheme_get_option('search_form')) { ?> <?php etheme_search_form(); ?> <?php } ?> </div> </div> </div><!-- /.container-fluid --> </div> </div> </header> <?php if (get_header_type() == 'vertical' || get_header_type() == 'vertical2') { ?> </div> <?php } ?> </div>