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: Disable Attachment Pages | |
* Plugin URI: https://gschoppe.com/wordpress/disable-attachment-pages | |
* Description: Completely disable attachment pages the right way. No forced redirects or 404s, no reserved slugs. | |
* Author: Greg Schoppe | |
* Author URI: https://gschoppe.com/ | |
* Version: 1.0.0 | |
**/ |
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(); } // Include in all php files, to prevent direct execution | |
/** | |
* Class Name : WP Persistent Notices | |
* Description : Implements a Standardized messaging system that allows admin messages to be passed across page redirects. | |
* Class URI : http://gschoppe.com/wordpress/pass-wordpress-admin-notices-across-page-redirects/ | |
* Version : 1.0.0 | |
* Author : Greg Schoppe | |
* Author URI : http://gschoppe.com | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
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 | |
// Event taxonomies | |
add_action( 'init', function() { | |
$labels = array( | |
'name' => _x( 'Terms', 'taxonomy general name' ), | |
'singular_name' => _x( 'Term', 'taxonomy singular name' ), | |
); | |
register_taxonomy( 'taxonomy_name', array( 'post' ), array( | |
'hierarchical' => false, |
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
// moved to https://wordpress.org/plugins/classic-editor-addon/ |
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 |
NewerOlder