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 / bm_var_dump.php
Created September 29, 2020 19:40
A custom var_dump inspired
<?php
/**
* A custom var_dump that wraps the content in pre elements so it's easier to read.
* Inspired by: https://twitter.com/wpmark/status/1310870151483584514
*
* @param mixed $things A variable length list of things to be output.
* @return void
*/
function bm_var_dump( ...$things ) {
<?php
/**
* Plugin Name: Add post tags to the excerpt.
* Plugin URI: https://prothemedesign.com
* Description: Add post tags to the excerpt.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
* Text Domain: ptd
*/
@BinaryMoon
BinaryMoon / mimbopro-search-fullposts.php
Created July 20, 2020 12:06
Display the full post on search results.
<?php
/**
* Plugin Name: Change Mimbo Pro Search Full Post
* Plugin URI: https://prothemedesign.com
* Description: Display full posts in search results.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
* Text Domain: mimbopro
*/
@BinaryMoon
BinaryMoon / disable-editor-styles.php
Created June 30, 2020 09:38
Disable WordPress editor styles
<?php
/**
* Plugin Name: Disable editor styles.
* Plugin URI: https://prothemedesign.com
* Description: Remove support for editor styles.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
*/
.entry-title {
background: yellow;
color: black;
position: absolute;
padding:2rem 3rem;
font-size: 2.5rem !important;
transform: translate(0, -7rem);
}
header.entry-header {
@BinaryMoon
BinaryMoon / carmack-always-slider.php
Created June 2, 2020 21:18
Always use the slider in Carmack theme.
<?php
/**
* Plugin Name: Always use the slider in Carmack.
* Plugin URI: https://prothemedesign.com
* Description: Don't display posts in the boxes under the slider.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
* Text Domain: broadsheet
*/
@BinaryMoon
BinaryMoon / lens-disabled-more-posts.php
Created June 2, 2020 20:45
Disable 'more posts' list in footer of Lens
@BinaryMoon
BinaryMoon / enable-woocommerce-sidebars.php
Last active May 26, 2020 23:21
Enable broadsheet theme sidebars
<?php
/**
* Plugin Name: Enable Broadsheet Sidebars.
* Plugin URI: https://prothemedesign.com
* Description: Make the sidebars display on WooCommerce sites when using Broadsheet.
* Author: Ben Gillbanks
* Version: 1.1
* Author URI: https://prothemedesign.com
* Text Domain: broadsheet
*/
@BinaryMoon
BinaryMoon / disable-jetpack-breadcrumbs.php
Created March 24, 2020 08:57
Disable Jetpack Breadcrumbs
<?php
/**
* Plugin Name: Disable Breadcrumbs.
* Plugin URI: https://prothemedesign.com
* Description: Automatically disable Jetpack breadcrumb module.
* Author: Ben Gillbanks
* Version: 1.0
* Author URI: https://prothemedesign.com
*/
@BinaryMoon
BinaryMoon / functions.php
Last active March 4, 2020 15:06
Register WordPress sidebars demo
<?php
/**
* Intitiate sidebars
*
* @link https://developer.wordpress.org/reference/functions/register_sidebar/
*/
function mytheme_widgets_init() {
// Sidebar.
register_sidebar(