This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.mobile-toggle a').on('click', function(e) { | |
e.preventDefault(); | |
$('.mobile-nav-overlay').fadeIn(400, function() { | |
$('.mobile-nav-outer').addClass('opened'); | |
}); | |
}); | |
$('.mobile-nav-overlay .close-button').on('click', function(e) { | |
e.preventDefault(); | |
$('.mobile-nav-outer').removeClass('opened'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (!defined('FW')) die('Forbidden'); | |
$cfg = array(); | |
$cfg['page_builder'] = array( | |
'title' => __('Danh sách Đại Lý', 'fw'), | |
'title_template' => '{{- title}}: {{- o.title}}', | |
'tab' => __('DTA', 'fw'), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add to cart checkout redirect | |
function custom_add_to_cart_redirect() { | |
$checkout_ = get_permalink( get_option( 'woocommerce_checkout_page_id' ) ); | |
return $checkout_ | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dir = 'uploads'; | |
$zip_file = 'uploads.zip'; | |
// Get real path for our folder | |
$rootPath = realpath($dir); | |
// Initialize archive object | |
$zip = new ZipArchive(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( is_singular('product') ) { | |
global $post; | |
// get categories | |
$terms = wp_get_post_terms( $post->ID, 'product_cat' ); | |
foreach ( $terms as $term ) $cats_array[] = $term->term_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function _split_product_size() { | |
$term_need_delete = array(); | |
$q = new WP_Query(array( | |
'post_type' => 'product', | |
'posts_per_page' => -1, | |
'order' => 'DESC', | |
'meta_query' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// set terms | |
wp_set_object_terms( $post_id, $object_types, 'immomakler_object_type', true ); | |
// make terms hierarchial by objektart | |
$term_parent = get_term_by( 'slug', $openimmo_data['objektart'], 'immomakler_object_type' ); | |
$term_child = get_term_by( 'slug', $openimmo_data['objektart_detail'], 'immomakler_object_type' ); | |
delete_option( 'immomakler_object_type_children' ); // workaround for WordPress not updating this option properly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Check to see if the window is top if not then display button | |
$(window).scroll(function(){ | |
if ($(this).scrollTop() > 100) { | |
$('.scrollToTop').fadeIn(); | |
} else { | |
$('.scrollToTop').fadeOut(); | |
} | |
}); | |
//Click event to scroll to top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dimox_breadcrumbs() { | |
/* === OPTIONS === */ | |
$text['home'] = 'Home'; // text for the 'Home' link | |
$text['category'] = 'Archive by Category "%s"'; // text for a category page | |
$text['search'] = 'Search Results for "%s" Query'; // text for a search results page | |
$text['tag'] = 'Posts Tagged "%s"'; // text for a tag page | |
$text['author'] = 'Articles Posted by %s'; // text for an author page |
NewerOlder