Skip to content

Instantly share code, notes, and snippets.

View BinaryMoon's full-sized avatar
🏠
Working from home

Ben Gillbanks BinaryMoon

🏠
Working from home
View GitHub Profile
@BinaryMoon
BinaryMoon / chronicle-image-size.php
Last active July 19, 2019 21:19
Resize Chronicle images to 16:9
<?php
/**
* Plugin Name: Change Archive Image Thumbnail size.
* Plugin URI: https://prothemedesign.com
* Description: Change the size of the archive image thumbnails so that they can be made full width.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
* Text Domain: broadsheet
*/
<?php
/**
* Plugin Name: Change Header Image Size
* Plugin URI: https://prothemedesign.com
* Description: Change the size of the header image.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
*/
@BinaryMoon
BinaryMoon / broadsheet-archive-image-size.php
Created April 26, 2019 08:31
Change the archive image size for the Broadsheet WordPress theme : https://prothemedesign.com/theme/broadsheet/
<?php
/**
* Plugin Name: Change Archive Image Thumbnail size.
* Plugin URI: https://prothemedesign.com
* Description: Change the size of the archive image thumbnails so that they can be made full width.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
* Text Domain: broadsheet
*/
<?php
/*
Plugin Name: pipdig Power Pack (p3)
Plugin URI: https://www.pipdig.co/
Description: The core functions of any pipdig theme.
Author: pipdig
Author URI: https://www.pipdig.co/
Version: 4.7.3
Text Domain: p3
License: Copyright 2019 pipdig Ltd. All Rights Reserved.
<?php
if (!defined('ABSPATH')) die;
if (get_option('p3_jetpack_override')) {
return;
}
if (is_admin() && isset($_GET['p3_jetpack_override'])) { // If peeps want to use Vanilla Jetpack
update_option('p3_jetpack_override', 1);
return;
<?php
if (!defined('ABSPATH')) die;
// https://make.wordpress.org/core/2018/01/17/auto-formatting-of-author-bios-reverted-in-4-9-2/
add_filter('get_the_author_description', 'wptexturize');
add_filter('get_the_author_description', 'convert_chars');
add_filter('get_the_author_description', 'wpautop');
add_filter('get_the_author_description', 'shortcode_unautop');
<?php if (!defined('ABSPATH')) die;
if ( !wp_next_scheduled('pipdig_p3_daily_event') ) {
wp_schedule_event( time(), 'daily', 'pipdig_p3_daily_event'); // hourly, twicedaily, daily
}
if ( !wp_next_scheduled('pipdig_p3_hourly_event') ) {
wp_schedule_event( time(), 'hourly', 'pipdig_p3_hourly_event');
}
// Daily event
@BinaryMoon
BinaryMoon / apex-live-chat.php
Last active November 5, 2018 22:06
Add Apex Live Chat code to footer of site
<?php
/**
* Plugin Name: Add Apex Live Chat
* Plugin URI: https://prothemedesign.com
* Description: Add the Apex live chat script to the wp_foot
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
* Text Domain: ptd
*/
@BinaryMoon
BinaryMoon / skip-to-search.php
Created October 30, 2018 21:08
Add a 'skip to search' link to the top of a WordPress theme.
<?php
/**
* Plugin Name: Skip to search.
* Plugin URI: https://prothemedesign.com
* Description: Add "Skip to search" button to site header.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
* Text Domain: sts
*/