Skip to content

Instantly share code, notes, and snippets.

Greg Schoppe gschoppe

Block or report user

Report or block gschoppe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gschoppe / wp_update_watch.php
Created Dec 6, 2018
WordPress Update Watch
View wp_update_watch.php
if( !empty($_GET['request']) ) {
$current_version = "";
$url = "";
$curl = curl_init();
curl_setopt_array($curl, array(
$result = curl_exec($curl);
gschoppe / marvelous-wololo-contact-form.php
Last active Oct 8, 2018 — forked from MarvelousWololo/functions.php
step by step rework of marvelouswololo's contact form code
View marvelous-wololo-contact-form.php
Plugin Name: Marvelous Wololo Contact Form
Plugin URI:
Description: Adds a custom contact form shortcode
Version: 0.0.1
Author: Marvelous Wololo
Author URI:
gschoppe / multibox_display_box_dimensions.php
Last active Sep 20, 2018
This function will return formatted HTML to display box dimensions and weights for multibox and non-multibox products
View multibox_display_box_dimensions.php
function get_multibox_dimension_output( $product_id = false ) {
$product = wc_get_product( $product_id );
if( !$product ) {
$output = '';
$boxes = get_post_meta( $product->ID, '_wc-multibox-additional-boxes', true );
gschoppe / functions.php
Created Aug 21, 2018
Add Featured Image Tag to Timber
View functions.php
/* populates the twig tag {{ featured_image_tag }} */
add_filter('timber_context', function( $context ){
$context['featured_image_tag'] = get_the_post_thumbnail( null, 'full' );
return $context;
gschoppe / admin-bar-for-weglot.php
Last active Oct 12, 2018
Adds a "Translate" button to the admin bar, on post-edit and front end pages, that links directly to the WeGlot visual editor for that page.
View admin-bar-for-weglot.php
<?php if(!defined('ABSPATH')) { die(); }
Plugin Name: Admin Bar for WeGlot
Plugin URI:
Description: Adds an admin bar link to translate any page on your site
Version: 0.1.0
Author: Greg Schoppe
Author URI:
Text Domain: weglotadminbar
gschoppe / wp-jslabify-titles.php
Last active Mar 22, 2018
add to functions.php to allow WP jSlabify to slab post titles
View wp-jslabify-titles.php
add_filter( 'the_title', 'wp_jslabify_title', 10, 2 );
function wp_jslabify_title( $title, $id=0 ) {
$slabbed_post_types = array(
'single' => array( 'post', 'page' ),
'archive' => array(),
'search' => array()
$theme = 'ultra';
gschoppe / upcoming-drafts-alert.php
Created Dec 22, 2017
Sends regular reminder emails to all users with draft posts scheduled for less than X days in the future. Usage: 1. Install and activate WP Utility Script Runner ( 2. Create a "utilities" subfolder in your theme directory 3. Place this file in the utilities folder 4. Go to Tools->Utility Sc…
View upcoming-drafts-alert.php
<?php if(!defined('ABSPATH')) { die(); } // This line ensures that the script is not run directly
* Utility Name: Upcoming Drafts Alert
* Description: Sends an email to blog authors with upcoming or overdue posts
* Author: Greg Schoppe
* Author URI:
* Supports: input, cron
* Version: 1.0.0
* License: GPL-2.0+
* License URI:
gschoppe / gjs-disable-attachment-pages.php
Last active May 25, 2020
WordPress plugin to properly disable attachment pages. This is not a redirect or forced 404. Attachment pages will simply not exist, and the slug will remain available for other posts and pages..
View gjs-disable-attachment-pages.php
<?php if( ! defined( 'ABSPATH' ) ) { die(); }
* Plugin Name: Disable Attachment Pages
* Plugin URI:
* Description: Completely disable attachment pages the right way. No forced redirects or 404s, no reserved slugs.
* Author: Greg Schoppe
* Author URI:
* Version: 1.0.0
gschoppe / mb_string_shim.php
Last active Nov 16, 2017
Shim for servers that do not support mb_string functions. modified from Patchwork. Usage: if(!function_exists('mb_strtolower')) { require_once('mb_string_shim.php'); }
View mb_string_shim.php
* Copyright (C) 2013 Nicolas Grekas -
* This library is free software; you can redistribute it and/or modify it
* under the terms of the (at your option):
* Apache License v2.0 (, or
* GNU General Public License v2.0 (
You can’t perform that action at this time.