View Class-CropInterface.js
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; |
View Class-ImageScaler.js
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}; |
View Class-IntervalManager.js
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, |
View Class-DB.gs
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", |
View wp_update_watch.php
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); |
View multibox_display_box_dimensions.php
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 ); |
View functions.php
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; | |
}); | |
View admin-bar-for-weglot.php
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 |
View classic-editor-addon.php
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/ |
View wp-jslabify-titles.php
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 | |
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'; |
NewerOlder