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
jquery.isotope.min.js | |
jquery-latest.js |
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
/** | |
* Based @ Wordpress VIP | |
* Remove the slug from published post permalinks. Only affect our CPT though. | |
*/ | |
function remove_cpt_slug( $post_link, $post, $leavename ) { | |
if ( ! in_array( $post->post_type, array( 'tours', 'services' ) ) || 'publish' != $post->post_status ) | |
return $post_link; | |
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link ); |
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
/** | |
Remove query strings from static resources like CSS & JS files. This plugin will improve your scores in services like PageSpeed, YSlow, Pingdoom and GTmetrix. | |
*/ | |
function _remove_query_strings_1( $src ){ | |
$rqs = explode( '?ver', $src ); | |
return $rqs[0]; | |
} | |
function _remove_query_strings_2( $src ){ |
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 | |
$mimo_query = new WP_Query( | |
array( | |
'post_type' => 'petreceri', | |
//'showposts' => 8, | |
'no_found_rows' => true, | |
) | |
); | |
if( $mimo_query->posts ) { ?> | |
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
<ul class="products"> | |
<?php | |
global $product; | |
$mimo_product_query = new WP_Query( | |
array( | |
'post_type' => 'product', | |
'orderby' => 'date', | |
'order' => 'desc', | |
'posts_per_page' => 2 | |
) |
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 /* This function attaches the image to the post in the database, add it to functions.php */ | |
function insert_attachment($file_handler,$post_id,$setthumb='false') { | |
// check to make sure its a successful upload | |
if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false(); | |
require_once(ABSPATH . "wp-admin" . '/includes/image.php'); | |
require_once(ABSPATH . "wp-admin" . '/includes/file.php'); | |
require_once(ABSPATH . "wp-admin" . '/includes/media.php'); |
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
//Display Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); | |
//Save variation fields | |
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 ); | |
function variable_fields( $loop, $variation_data ) { | |
?> | |
<tr> |
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 | |
// Just require() this class via your theme's functions.php file. | |
/* Then instantiate this at the top of your 404.php file with: | |
if ( class_exists( 'Clean_404_Email' ) ) | |
new Clean_404_Email; | |
*/ | |
class Clean_404_Email { | |
var $time, $request, $blog, $email, $theme, $theme_data, $site, $referer, $string, $address, $remote, $agent, $message; |
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
/*-----------------------------------------------------------*/ | |
/* WooCommerce : add custom fields to product variations | |
/* https://gist.github.com/corsonr/9152652#file-gistfile1-php | |
/*----------------------------------------------------------*/ | |
//Display Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); |
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
/** | |
* This function will add the Payment title method to the emails | |
*/ | |
add_action( 'woocommerce_email_before_order_table', 'add_payment_method_to_new_order', 10, 2 ); | |
function add_payment_method_to_new_order( $order) { | |
$method = get_post_meta( $order->id, '_payment_method', true ); | |
$method_1 = "directdebit"; | |
$method_2 = "cecdebit"; |
OlderNewer