Skip to content

Instantly share code, notes, and snippets.

View peazz's full-sized avatar

Andy Cresswell peazz

View GitHub Profile
@peazz
peazz / gist:4fe0abe0b0d83161aecb7c6b29583d7f
Created December 3, 2016 02:03
Clean WordPress Head Output 2016
function pixel_wp_head_cleanup () {
remove_action('wp_head', 'wlwmanifest_link'); // remove wlwmanifest.xml (needed to support windows live writer)
remove_action('wp_head', 'wp_generator'); // remove wordpress version
remove_action('wp_head', 'rsd_link'); // remove really simple discovery link
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0 ); // remove shortlink
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); // remove emojis
remove_action( 'wp_print_styles', 'print_emoji_styles' ); // remove emojis
@peazz
peazz / pixel-core-cpt.php
Created November 11, 2016 16:13
Minimal Class for creating Custom Post Types
<?php
Class Pixel_Core_Cpt {
private $cpt = array();
private $cat = array();
private $tax = array();
public function addCpt( $singular, $plural, $slug, $args = array()){
@peazz
peazz / functions.php
Created February 12, 2016 23:57 — forked from jaybuys/functions.php
WordPress Visual Composer Mods
function vc_update_defaults() {
// Default single image to size "full"
$param = WPBMap::getParam( 'vc_single_image', 'img_size' );
$param['value'] = 'full';
vc_update_shortcode_param( 'vc_single_image', $param );
// Modify button 2 styles to use custom colors
$colors_arr = array(
__( 'Custom Color #1', 'js_composer' ) => 'custom_classname_1',
__( 'Custom Color #2', 'js_composer' ) => 'custom_classname_2'