Skip to content

Instantly share code, notes, and snippets.

View DeveloperWil's full-sized avatar

Wil Brown DeveloperWil

View GitHub Profile
@DeveloperWil
DeveloperWil / proud-sponsor-of-wcsyd-2016-transparent-bg-300x300.txt
Created May 26, 2016 04:41
WCSyd Proud sponsor of WordCamp Sydney 2016 PNG
<a href="https://2016.sydney.wordcamp.org" title="Proud sponsor of WordCamp Sydney 2016" target="_blank"><img src="https://2016.sydney.wordcamp.org/files/2016/05/proud-sponsor-of-wcsyd-2016-transparent-bg-300x300.png"></a>
@DeveloperWil
DeveloperWil / proud-sponsor-of-wcsyd-2016-white-bg-300x300.txt
Created May 26, 2016 04:42
WCSyd Proud sponsor of WordCamp Sydney 2016 JPG
<a href="https://2016.sydney.wordcamp.org" title="Proud sponsor of WordCamp Sydney 2016" target="_blank"><img src="https://2016.sydney.wordcamp.org/files/2016/05/proud-sponsor-of-wcsyd-2016-white-bg-300x300.jpg"></a>
@DeveloperWil
DeveloperWil / im-volunteering-at-wcsyd-2016-transparent-bg-300x300.txt
Created May 26, 2016 04:44
WCSyd I'm volunteering at WordCamp Sydney 2016 PNG
<a href="https://2016.sydney.wordcamp.org" title="I'm volunteering at WordCamp Sydney 2016" target="_blank"><img src="https://2016.sydney.wordcamp.org/files/2016/05/im-volunteering-at-wcsyd-2016-transparent-bg-300x300.png"></a>
@DeveloperWil
DeveloperWil / im-volunteering-at-wcsyd-2016-white-bg-300x300.txt
Created May 26, 2016 04:45
WCSyd I'm volunteering at WordCamp Sydney 2016 JPG
<a href="https://2016.sydney.wordcamp.org" title="I'm volunteering at WordCamp Sydney 2016" target="_blank"><img src="https://2016.sydney.wordcamp.org/files/2016/05/im-volunteering-at-wcsyd-2016-white-bg-300x300.jpg"></a>
@DeveloperWil
DeveloperWil / gist:ab749f762821b3ce7b01e6cc0c323ada
Created August 6, 2017 07:13
Find php.ini file on Ubuntu 15.x
sudo php -i | grep 'Configuration File'
@DeveloperWil
DeveloperWil / code-snippet-1.php
Last active August 10, 2017 05:12 — forked from zeropointdevelopment/code-snippet-1.php
[WordPress] Code from our blog post Adding Custom Image Sizes to WordPress 3.5 Media Manager - https://zeropointdevelopment.com/adding-custom-image-sizes-to-wordpress-3-5-media-manager/
// Add new image sizes
function zpd_insert_custom_image_sizes( $image_sizes ) {
// get the custom image sizes
global $_wp_additional_image_sizes;
// if there are none, just return the built-in sizes
if ( empty( $_wp_additional_image_sizes ) )
return $image_sizes;
// add all the custom sizes to the built-in sizes
foreach ( $_wp_additional_image_sizes as $id => $data ) {
/** Jetpack Share Buttons **/
function zpd_add_jetpack_share_buttons(){
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
if ( function_exists( 'sharing_display' ) ) {
echo sharing_display();
}
}
add_action( 'genesis_before_post_content', 'zps_add_jetpack_share_buttons' ); /* Old Genesis */
@DeveloperWil
DeveloperWil / ZPD Contract.md
Last active July 29, 2023 22:50 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Zero Point Development Contract

  • Revised date: November 5th, 2017

Between [company name]

And [customer name].

@DeveloperWil
DeveloperWil / add-features-image-to-wordpress-rss-feed
Last active October 6, 2020 08:14
Add Featured Image To WP RSS Feed
<?php
//This will prepend your WordPress RSS feed content with the featured image
function wbd_featured_image_in_rss_feed( $content ) {
global $post;
if( is_feed() ) {
if ( has_post_thumbnail( $post->ID ) ){
$prepend = '<div>' . get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'margin-bottom: 10px;' ) ) . '</div>';
$content = $prepend . $content;
}
}
@DeveloperWil
DeveloperWil / woocommerce-add-privacy-policy-checkbox-to-checkout.php
Created November 13, 2020 04:16
WooCommerce: Add Privacy Policy checkbox to checkout form
/**
* Add a privacy policy checkbox on the checkout form
*
* @author Wil Brown zeropointdevelopment.com
*/
function zpd_add_checkout_privacy_policy() {
woocommerce_form_field( 'privacy_policy', array(
'type' => 'checkbox',
'class' => array('form-row privacy'),