Skip to content

Instantly share code, notes, and snippets.

View mbijon's full-sized avatar
🎯
Focusing

Mike Bijon mbijon

🎯
Focusing
View GitHub Profile
@staylor
staylor / yolo.php
Last active August 29, 2015 14:11
React is weird/awesome
<?php
class React_YOLO {
public function __construct() {
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
}
public function admin_menu() {
add_menu_page( 'React', 'React', 'edit_posts', 'react', array( $this, 'page' ) );
}
@averyaube
averyaube / svn.php
Created June 24, 2011 14:56
Tiny PHP svn script
<?php
/**
* Some cool thing that does various little SVN tasks.
* Requires the PECL svn package to be installed!
*
* @author Lowgain / BNOTIONS
*/
// Define some cool parameters here
define('USERNAME', '');
@evansolomon
evansolomon / kissmetrics.php
Created December 3, 2011 23:11
Kissmetrics plugin for WordPress with a simplified class based on their default library
<?php
/*
Plugin Name: WP Kissmetrics
Description: Record events using Kissmetrics' PHP API. Intended to be used by developers only.
Author: evansolomon
Version: 1.0
*/
/* Forked from https://github.com/kissmetrics/KISSmetrics/blob/master/km.php */
@MatthewEppelsheimer
MatthewEppelsheimer / gist:1557177
Created January 3, 2012 22:03
Improved default system messages for WP-Contact-Form-7
Key:
# Message Type
Custom Message (English)
---------
# Sender's message was sent successfully
Your message was sent successfully. Thank you!
# Sender's message was failed to send
@markjaquith
markjaquith / moderation-buddy.php
Created January 17, 2012 10:12
Moderation Buddy
<?php
/*
Plugin Name: Moderation Buddy
Description: A friendly assistent to make sure you don't get behind on your comment moderation tasks.
Version: 0.1
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/
class CWS_Moderation_Buddy_Plugin {
<?php
function edd_change_downloads_upload_dir() {
global $pagenow;
if ( ! empty( $_POST['post_id'] ) && ( 'async-upload.php' == $pagenow || 'media-upload.php' == $pagenow ) ) {
if ( 'download' == get_post_type( $_REQUEST['post_id'] ) ) {
$wp_upload_dir = wp_upload_dir();
$upload_path = $wp_upload_dir['basedir'] . '/edd' . $wp_upload_dir['subdir'];
if (wp_mkdir_p($upload_path) && !file_exists($upload_path.'/.htaccess')) {
@jkudish
jkudish / gist.css
Created June 3, 2012 22:19 — forked from tollmanz/gist.css
Add Cacheable Gists to Your WordPress Site
.gist {
color: #e4322e;
}
.gistdiv {
padding: 0;
margin: 0;
}
.gist .gist-file {
@alexkingorg
alexkingorg / add-term-if-not-exists.php
Created September 14, 2012 18:35
Treat WordPress custom taxonomy as meta data
<?php
// check for a term and insert it if it doesn't exist
if (!get_term_by('slug', $term_slug, $taxonomy)) {
wp_insert_term(__($term_name, 'localization-key'), $taxonomy, array(
'slug' => $term_slug
));
}
@getsource
getsource / secretplace.php
Created January 31, 2013 23:06
Make your dashboard your secret place.
<?php
/*
Plugin Name: Secret Place
Plugin URI: http://github.com/getsource
Description: Make your dashboard your secret place.
Author: Mike Schroder and Jason Cosper
Version: 0.1
Author URI: http://www.getsource.net/
*/
@MZAWeb
MZAWeb / gist:5467372
Last active December 16, 2015 16:59