Skip to content

Instantly share code, notes, and snippets.

View justinrains's full-sized avatar

Justin Rains justinrains

View GitHub Profile
@justinrains
justinrains / functions.php
Last active February 2, 2021 17:28 — forked from paulcollett/functions.php
Remove Yoast HTML Comments “This site is optimized with the Yoast WordPress SEO plugin”
// https://gist.github.com/justinrains/b00ca879f83c741d0dc139a25ec642c6
// Remove All Yoast HTML Comments
add_filter( 'wpseo_debug_markers', '__return_false' );
add_action('wp_head',function() { ob_start(function($o) {
return preg_replace('/\n?<.*?yoast seo plugin.*?>/mi','',$o);
}); },~PHP_INT_MAX);
@kagg-design
kagg-design / full_list_of_wp_globals.php
Last active April 2, 2024 06:34
Full list of WordPress global variables, extracted from WP Coding Standards
<?php
/**
* List of global WP variables.
*
* @since 0.3.0
* @since 0.11.0 Changed visibility from public to protected.
* @since 0.12.0 Renamed from `$globals` to `$wp_globals` to be more descriptive.
* @since 0.12.0 Moved from WordPress_Sniffs_Variables_GlobalVariablesSniff to WordPress_Sniff
*
* @var array
<?php
$args = array (
'post_type' => 'pp_questions',
'meta_key' => 'order_number',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'posts_per_page' => -1,
);
?>
<form method="post" id="download_form" action="">
@paulcollett
paulcollett / functions.php
Last active December 19, 2023 04:42
Remove Yoast HTML Comments “This site is optimized with the Yoast WordPress SEO plugin”
// For Yoast SEO Plugin Version: 14.1+ add to your Wordpress Theme's functions.php...
// Remove All Yoast HTML Comments
// https://gist.github.com/paulcollett/4c81c4f6eb85334ba076
// Credit @devendrabhandari (https://gist.github.com/paulcollett/4c81c4f6eb85334ba076#gistcomment-3303423)
add_filter( 'wpseo_debug_markers', '__return_false' );
// For Yoast SEO Plugin Version: < 14.1 add to your Wordpress Theme's functions.php...
@malarkey
malarkey / Contract Killer 3.md
Last active May 17, 2024 15:28
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@corydorning
corydorning / Cross-Browser ::before and ::after pseudo-class polyfill
Last active February 18, 2022 00:24
Cross-Browser ::before and ::after pseudo-class polyfill
/* =============================================================================
CSS Declarations
========================================================================== */
/* ==|== The Standard Way =================================================== */
.foo::before {
/* ...css rules... */
}
@corydorning
corydorning / ie6-bgcache.js
Created May 17, 2011 13:26
Fix IE6 Background Caching
try {
$.browser.msie && $.browser.version < 7
&& document.execCommand( 'BackgroundImageCache', false, true );
} catch(e) { };
@corydorning
corydorning / jquery-stripeRows.js
Created May 12, 2011 15:53
Simple jQuery table striping
/*
* jQuery Table Striping - v0.1 - 05/12/2011
* http://corydorning.com, http://justinrains.com
*
* Dual licensed under 'Use it like you stole it'
* and 'We Don't Care'.
*
* Description: Stripe table rows easily by calling 'stripeRows'
* on any collection of <tr> elements and passing in the desired
* colors.