Skip to content

Instantly share code, notes, and snippets.

Avatar
🕶️
busy, busy

Mike Bijon mbijon

🕶️
busy, busy
View GitHub Profile
@staylor
staylor / yolo.php
Last active Aug 29, 2015
React is weird/awesome
View yolo.php
<?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' ) );
}
@Lowgain
Lowgain / svn.php
Created Jun 24, 2011
Tiny PHP svn script
View svn.php
<?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 Dec 3, 2011
Kissmetrics plugin for WordPress with a simplified class based on their default library
View kissmetrics.php
<?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 Jan 3, 2012
Improved default system messages for WP-Contact-Form-7
View gist:1557177
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
View moderation-buddy.php
<?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 {
View edd_change_uploads.php
<?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 Jun 3, 2012 — forked from tollmanz/gist.css
Add Cacheable Gists to Your WordPress Site
View gist.css
.gist {
color: #e4322e;
}
.gistdiv {
padding: 0;
margin: 0;
}
.gist .gist-file {
@alexkingorg
alexkingorg / add-term-if-not-exists.php
Created Sep 14, 2012
Treat WordPress custom taxonomy as meta data
View add-term-if-not-exists.php
<?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 Jan 31, 2013
Make your dashboard your secret place.
View secretplace.php
<?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/
*/
View gist:5467372