This file contains hidden or 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 lang="en"> | |
<head> | |
<title>Lonely Women Cooks For Nobody</title> | |
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"> | |
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/"> | |
<meta name="DC.title" content="Lonely Women Cooks For Nobody<"> | |
<meta name="DC.creator" content="William Clinton (http://www.man-has-his-needs.com/"> | |
<meta name="DC.subject" content="Politics"> |
This file contains hidden or 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
/** | |
* Filter team products from main shop only on frontend on shop, category, and tag archives | |
*/ | |
function exclude_team_products( $query ) { | |
$archive_query = $query->is_post_type_archive('product') && $query->is_main_query(); | |
$cat_tag_query = $query->is_tax( array('product_cat', 'product_tag') ) && $query->is_main_query(); | |
if ( !is_admin() && $archive_query || !is_admin() && $cat_tag_query ) { | |
$taxquery = array( | |
array( | |
'taxonomy' => 'product_team', |
This file contains hidden or 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
// Add VAT and SSN fields in billing address display | |
add_filter( 'woocommerce_order_formatted_billing_address', 'custom_add_vat_ssn_formatted_billing_address', 10, 2 ); | |
function custom_add_vat_ssn_formatted_billing_address( $fields, $order ) { | |
$fields['vat'] = $order->billing_vat; | |
$fields['ssn'] = $order->billing_ssn; | |
return $fields; | |
} | |
add_filter( 'woocommerce_my_account_my_address_formatted_address', 'custom_my_account_my_address_formatted_address', 10, 3 ); |
This file contains hidden or 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
/***************************** FRONTEND ****************************************/ | |
/************************** | |
Filter to add a VAT field to: | |
- My Account - Edit Form -- Billing fields | |
- Checkout - Edit Form - Billing Fields | |
This function is also reordering the form fields |
This file contains hidden or 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 | |
/** | |
* Remove [All in One SEO Pack] HTML Comments | |
* @link //gist.github.com/llgruff/a7ab776167aa0ed307ec445df54e5fdb | |
*/ | |
if (defined('AIOSEOP_VERSION')) { | |
add_action('get_header', function() { | |
ob_start( | |
function($o) { | |
return preg_replace('/\n?<.*?One SEO Pack.*?>/mi','',$o); |
This file contains hidden or 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
if(!function_exists('before_header_partnerki_runeta') && !function_exists('after_header_partnerki_runeta') && !function_exists('change_aioseop_tag_partnerki_runeta')){ | |
add_action('template_redirect', 'before_header_partnerki_runeta', 0); | |
add_action('wp_head', 'after_header_partnerki_runeta', 900); | |
function before_header_partnerki_runeta (){ | |
ob_start('change_aioseop_tag_partnerki_runeta'); | |
} | |
function change_aioseop_tag_partnerki_runeta($head) { | |
$head_description = preg_replace("~(<meta name=\"description\" content=\".*\" />)\n~Uis", '$1', $head); | |
if($head_description !== NULL) $head = $head_description; | |
$head_keywords = preg_replace("~(<meta name=\"keywords\" content=\".*\" />)\n~Uis", '$1', $head); |
This file contains hidden or 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 | |
App::after(function($request, $response) | |
{ | |
/** | |
* HTML Minification | |
* https://gist.github.com/zmsaunders/5619519 | |
* https://gist.github.com/garagesocial/6059962 | |
*/ | |
if (Config::get('project.minify.html', false) !== false) |
This file contains hidden or 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
// Writing JS for everything is great and all, but I don't want to see JS | |
// inline in my Jade templates. Thankfully, there are ways of abstrating it | |
// into mixins! | |
// Want some Rails-like helpers? | |
mixin link_to(name, href) | |
- href = href || "#" | |
a(href="#{href}")= name | |
// How about a single editing point for a class name? |
NewerOlder