Skip to content

Instantly share code, notes, and snippets.

<?php
class some_plugin_admin {
public static function plugins_loaded() {
add_action( 'admin_init', 'some_plugin_admin::admin_init' );
add_action( 'admin_menu', 'some_plugin_admin::admin_menu' );
}
public static function admin_init() {
register_setting( 'some_plugin', 'some_plugin_options' );

Keybase proof

I hereby claim:

  • I am skeltoac on github.
  • I am skeltoac (https://keybase.io/skeltoac) on keybase.
  • I have a public key whose fingerprint is 0821 2D94 79E2 FB51 95C9 F607 8044 38D9 E8A9 2D59

To claim this, I am signing this object:

<img src="http://imgs.xkcd.com/clickdrag/1s17w.png" width="64" height="64" style="position: absolute; top: 896px; left: 1984px; "><img src="http://imgs.xkcd.com/clickdrag/1s6w.png" width="64" height="64" style="position: absolute; top: 896px; left: 2688px; "><img src="http://imgs.xkcd.com/clickdrag/1s7e.png" width="64" height="64" style="position: absolute; top: 896px; left: 3456px; "><img src="http://imgs.xkcd.com/clickdrag/2s17w.png" width="64" height="64" style="position: absolute; top: 960px; left: 1984px; "><img src="http://imgs.xkcd.com/clickdrag/2s9w.png" width="64" height="64" style="position: absolute; top: 960px; left: 2496px; "><img src="http://imgs.xkcd.com/clickdrag/2s7e.png" width="64" height="64" style="position: absolute; top: 960px; left: 3456px; "><img src="http://imgs.xkcd.com/clickdrag/3s17w.png" width="64" height="64" style="position: absolute; top: 1024px; left: 1984px; "><img src="http://imgs.xkcd.com/clickdrag/3s7e.png" width="64" height="64" style="position: absolute; top: 1024px; lef
@skeltoac
skeltoac / client-side-comment-fill.php
Created February 4, 2011 16:27
A WordPress plug-in to fill comment form from cookies client-side, eliminating a whole class of uncacheable variants
<?php
/*
Plugin Name: Client-Side Comment Fill
Author: Andy Skelton
Description: Fills comment form from cookies client-side, eliminating a whole class of uncacheable variants
*/
function cscf_get_current_commenter( $commenter ) {
foreach ( $commenter as &$string )
$string = '';