Skip to content

Instantly share code, notes, and snippets.

View aaronjorbin's full-sized avatar

Aaron Jorbin aaronjorbin

View GitHub Profile
<?php
// embed the javascript file that makes the AJAX request
wp_enqueue_script( 'my-ajax-request', plugin_dir_url( __FILE__ ) . 'js/ajax.js', array( 'jquery' ) );
// declare the URL to the file that handles the AJAX request (wp-admin/admin-ajax.php)
wp_localize_script( 'my-ajax-request', 'ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
@aaronjorbin
aaronjorbin / color-rotator.php
Created December 12, 2013 17:40
Change the WordPress Admin color scheme every time you login.
<?php
/*
Plugin Name: Color Rotator
Description: Change the color scheme every time you login
Author: Aaron Jorbin
Version: 1.0
Author URI: http://aaron.jorb.in/
License: GPLv2 or later
*/
@aaronjorbin
aaronjorbin / jorbin_update.php
Created December 26, 2013 20:53
Example of an update routine for a plugin
<?php
/*
Plugin Name: update versioning
Description: Example of an update routine for a plugin
Author: Aaron Jorbin
Version: 0.1
Author URI: http://aaron.jorb.in
*/
<?php
function jorbin_cap_lock($caps, $cap, $user_id, $args) {
$not_allow = array(
'update_plugins',
'delete_plugins',
'install_plugins',
'activate_plugins',
'edit_plugins',
'update_themes',
<?php
/*
Plugin name: LaFours
Description: Removes caps for actions that should take place in code, not in UI
Author: Aaron Jorbin
Author URI: http://aaron.jorb.in/
Version: 0.1
*/
function lafours_map_meta_cap($caps, $cap, $user_id, $args) {
<?php
/*
Plugin name: Super LaFours
Description: Removes caps for actions that should take place in code, not in UI
Author: Aaron Jorbin
Author URI: http://aaron.jorb.in/
Version: 0.1
*/
function super_lafours_map_meta_cap($caps, $cap, $user_id, $args) {

Keybase proof

I hereby claim:

  • I am aaronjorbin on github.
  • I am jorbin (https://keybase.io/jorbin) on keybase.
  • I have a public key whose fingerprint is D98C 5764 0469 20C1 9997 BB89 1A05 7C76 FD36 DAA9

To claim this, I am signing this object:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/0.10.22/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'publish' ]
2 info using npm@1.3.14
3 info using node@v0.10.22
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
Index: Gruntfile.js
===================================================================
--- Gruntfile.js (revision 5325)
+++ Gruntfile.js (working copy)
@@ -228,6 +228,11 @@
expand: true
}
},
+ patch: {
+ options:{

List developed by the attendees at WordCamp Philly 2014 Contributor Day

Steps to Reproduce

  • List of steps

Enviornment

  • Browser Version
  • PHP Version
  • MySql Version
  • WordPress Version