Skip to content

Instantly share code, notes, and snippets.

@enejb
enejb / get_sites_on_verf.php
Created October 30, 2012 16:40
WordPress Plugin that we use to generate a host file so that we can update our host file
<?php
/*
Plugin Name: Get Sites On Verf
Plugin URI:
Description: used to generate a host file so that we can update our local host file.
Author: Enej
Version: 0.5
Author URI:
*/
@enejb
enejb / youareonverf.php
Created October 30, 2012 17:19
WordPress Plugin that lets you know that you are on the verification server
<?php
/*
Plugin Name: You are on verf
Plugin URI:
Description: Lets you know that you are on the verification server
Author: Enej
Version: 0.5
Author URI:
*/
@enejb
enejb / remove-rss-dashboard-widgets.php
Created February 5, 2013 00:03
A small plugin to remove the WordPress rss feed that are there by default in on the WordPress Admin Dashboard
<?php
/*
Plugin Name: Remove RSS Dashboard Widgets
Plugin URI: http://ctlt.ubc.ca/
Description: Override the default admin menu
Author: Enej Bajgoric
Version: 1.0
Author URI: http://ctlt.ubc.ca/
*/
@enejb
enejb / remove_plugin.php
Created April 23, 2013 20:57
A WordPress plugin that would allow you to update a plugin folder without producing a alert box for the user
<?php
/**
* olt_rename_plugin function.
* removed the
* @access public
* @param mixed $old_plugin. (default: null)
* @param mixed $new_plugin. (default: null)
* @param bool $add_to_network. (default: false)
* @return void
@enejb
enejb / domain_mapping.php
Created October 16, 2013 21:46
notice fix.
<?php
/*
Plugin Name: WordPress MU Domain Mapping
Plugin URI: http://ocaoimh.ie/wordpress-mu-domain-mapping/
Description: Map any blog on a WordPress website to another domain.
Version: 0.5.4.3
Author: Donncha O Caoimh
Author URI: http://ocaoimh.ie/
*/
/* Copyright Donncha O Caoimh (http://ocaoimh.ie/)
@enejb
enejb / class-example-my_map.php
Created March 25, 2014 18:01
Example Plugin that extend the profile cct plugin
Class My_Profile_CCT_Map extends Profile_CCT_Field {
var $default_options = array(
'type' => 'my_map',
'label' => 'map',
'description' => '',
'width' => 'full',
'before' => '',
'empty' => '',
<?php
/**
* Generates a Photon URL.
*
* @see http://developer.wordpress.com/docs/photon/
*
* @param string $image_url URL to the publicly accessible image you want to manipulate
* @param array|string $args An array of arguments, i.e. array( 'w' => '300', 'resize' => array( 123, 456 ) ), or in string form (w=123&h=456)
* @return string The raw final URL. You should run this through esc_url() before displaying it.
/* Detect-zoom
* -----------
* Cross Browser Zoom and Pixel Ratio Detector
* Version 1.0.4 | Apr 1 2013
* dual-licensed under the WTFPL and MIT license
* Maintained by https://github/tombigel
* Original developer https://github.com/yonran
*/
//AMD and CommonJS initialization copied from https://github.com/zohararad/audio5js
@enejb
enejb / gist:37c1cf33bed400946309
Created July 18, 2014 20:07
transparent-latext.php
<?php
/**
* Plugin Name: Transparent latext
* Plugin URI:
* Description: Makes your latext images transparent.
* Version: 1.0
* Author: Enej
* License: GPL 2
*/
@enejb
enejb / post-formats-for-jetpack-portfolio.php
Last active August 29, 2015 14:06
Add post formats for Jetpack's portfolio post type
<?php
/**
* Plugin Name: Post formats for Jetpack's portfolio
* Description: Add post formats to Jetpack's portfolio post type
* Version: 1.0
* Author: Enej
* License: GPL2
*/
function jetpack_portfolio_add_portfolio_post_formats() {
add_post_type_support( 'jetpack-portfolio', 'post-formats' );