This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('ABSPATH') or die(); | |
/* | |
* Plugin Name: Bad Matt | |
* Plugin URI: https://gschoppe.com | |
* Description: A protest plugin that removes (or replaces via filter) the Automattic-owned woocommerce stripe gateway partner id. | |
* Version: 1.0.0 | |
* Requires at least: 4.0 | |
* Requires PHP: 7.2 | |
* Author: Greg Schoppe | |
* Author URI: https://gschoppe.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CropInterface(el, w, h, resolutionMultiple) { | |
// handle parameters | |
this.el = el; | |
if (!w) { w = 100; } | |
this.w = w; | |
if (!h) { h = 100; } | |
this.h = h; | |
this.r = w / h; | |
if (!resolutionMultiple) { resolutionMultiple = 1; } | |
this.resolutionMultiple = resolutionMultiple; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ImageScaler(canvas, focus, zoom) { | |
if (canvas) { | |
this.canvas = canvas; | |
} else { | |
this.canvas = document.createElement("CANVAS"); | |
} | |
if (focus) { | |
this.focus = focus; | |
} else { | |
this.focus = {x:.5,y:.5}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function IntervalManager() { | |
this.intervals = []; | |
// Public | |
this.setInterval = function(callback, interval, name) { | |
if (!name) { | |
name = "" + Date.now() + "|" + Math.random(); | |
} | |
var newInterval = { | |
'name': name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function DB(projectID) { | |
this.projectID = projectID; | |
this.types = { | |
'INT64' : "INT64", | |
'NUMERIC' : "NUMERIC", | |
'BIGNUMERIC': "BIGNUMERIC", | |
'FLOAT64' : "FLOAT64", | |
'BOOL' : "BOOL", | |
'STRING' : "STRING", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( !empty($_GET['request']) ) { | |
$current_version = ""; | |
$url = "https://api.wordpress.org/core/version-check/1.7/"; | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_RETURNTRANSFER => 1, | |
CURLOPT_URL => $url | |
)); | |
$result = curl_exec($curl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_multibox_dimension_output( $product_id = false ) { | |
$product = wc_get_product( $product_id ); | |
if( !$product ) { | |
return; | |
} | |
$output = ''; | |
$boxes = get_post_meta( $product->ID, '_wc-multibox-additional-boxes', true ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(!defined('ABSPATH')) { die(); } | |
/* | |
Plugin Name: Admin Bar for WeGlot | |
Plugin URI: https://gschoppe.com | |
Description: Adds an admin bar link to translate any page on your site | |
Version: 0.1.0 | |
Author: Greg Schoppe | |
Author URI: https://gschoppe.com | |
Text Domain: weglotadminbar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// moved to https://wordpress.org/plugins/classic-editor-addon/ |
NewerOlder