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
################# performance snippets ########################################### | |
/** | |
* decrease jpeg quality to 80 | |
*/ | |
add_filter( 'jpeg_quality', create_function( '', 'return 80;' ) ); | |
/** | |
* Disable the emoji's | |
*/ |
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
class WP_HTML_Compression { | |
protected $compress_css = true; | |
protected $compress_js = true; | |
protected $info_comment = true; | |
protected $remove_comments = true; | |
protected $html; | |
public function __construct($html) { | |
if (!empty($html)) { | |
$this->parseHTML($html); |
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
################# SEO Aanpassingen ########################################### | |
# https://gist.github.com/Auke1810/9939b52131bdb2af819143798aba60f2 | |
############################################################################## | |
/** | |
* add_noindex_tags | |
* meta robots tag vullen met de juiste instelling per pagina type | |
* Gepagineerde pagina’s (zonder parameters) moeten index, follow zijn. | |
* Gepagineerde pagina’s met parameters mogen een noindex, nofollow | |
*/ |
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 | |
// File Security Check | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
?> | |
<?php | |
/*----------------------------------------------------------------------------------- | |
TABLE OF CONTENTS | |
- woo_image - Get Image from custom field |
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
<? | |
// VIN API decoder for PHP 4.x+ | |
define('ELEMENT_CONTENT_ONLY', true); | |
define('ELEMENT_PRESERVE_TAGS', false); | |
function getXML($vin) { | |
$curl = curl_init(); | |
curl_setopt ($curl, CURLOPT_URL, 'http://vinapi.skizmo.com/vins/'. $vin.'.xml'); | |
curl_setopt ($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/xml', 'X-VinApiKey: #YOURAPIKEYGOESHERE#')); //use your API key here |
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 | |
/* | |
Plugin Name: wordpress assist clean header | |
Plugin URI: http://www.wordpressassist.nl/ | |
Description: Remove shortlink hook | |
Version: 1.0 | |
Author: AukeJomm | |
Author URI: http://www.aukejongbloed.nl | |
*/ | |
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 | |
/** | |
* More Products Component | |
* | |
* Display X more products. | |
* | |
* @author Matty | |
* @since 1.0.0 | |
* @package WooFramework | |
* @subpackage Component |
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 alter_feed_item( $attributes, $feed_id, $product_id ) { | |
// The $attributes variable is an array that contains all the product data that goes into the feed. Each item | |
// can be accessed by it's feed key. So if in the feed file an item has a key like 'description', you | |
// can access that specific item by $attributes['description']. | |
// The $feed_id (string) makes it possible to only edit a specific feed. You can find the id of a feed in the | |
// url of the Feed Editor, right after id=. | |
// The $product_id (string) makes it possible to select a specific product id that you want to filter. |
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
/** | |
* Alter Product feed item | |
* Use the price including tax in the price attribute | |
*/ | |
function alter_feed_item( $attributes, $feed_id, $product_id ) { | |
global $product; | |
$product = wc_get_product( $product_id ); | |
// show price including tax | |
$attributes['price'] = $product->get_price_including_tax() . " USD"; |
OlderNewer