Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Special Background Wordpress Plugin
*
* @-wp-header Plugin Name: Special Background
* @-wp-header Plugin URI: http://wordpress.stackexchange.com/questions/972/
* @-wp-header Description: Example to show how to add a special background using exiting background admin page in core.
* @-wp-header Version: 0.2
* @-wp-header Author: Mike Schinkel, hakre
* @-wp-header Author URI: http://mikeschinkel.com/custom-wordpress-plugins/
<?php
/**
* Register an Admin Page - Example
*
* NOTE: MU Plugin.
*
* @author hakre <http://hakre.wordpress.com/>
* @link http://wordpress.stackexchange.com/questions/1778/admin-config-screen-without-menu
*/
@hakre
hakre / change-admin-url.php
Created November 16, 2010 00:37
Change Admin URL
<?php
/**
* Change Admin URL
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
<?php
/**
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/**
@hakre
hakre / endpoint-example.php
Created November 18, 2010 20:20
Wordpress Rewrite Endpoint Example
<?php
/**
* Author Endpoints Example
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
@hakre
hakre / block-category-delete-example.php
Created November 23, 2010 14:56
Wordpress Block Category Delete Example
<?php
/**
* Block deletion of certain categories by their ID.
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
@hakre
hakre / taxonomy-feeds.php
Created February 5, 2011 15:57
WordPress 3.1 Taxonomy Feeds
<?php
/**
* WordPress 3.1 Taxonomy Feeds Plugin (Must-Use)
*
* Copyright (C) 2011 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
@hakre
hakre / theme-napkin.php
Created February 8, 2011 15:32
Theme Napkin Wordpress Plugin - Safeguard unintended output generated by theme bootstrap code (functions.php).
<?php
/**
* Theme Napkin Wordpress Plugin
*
* Safeguard unintended output generated by theme bootstrap code (functions.php).
*
* Copyright 2011 by hakre <http::/hakre.wordpress.com>, some rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@hakre
hakre / gist:826061
Created February 14, 2011 15:48
WP_Query_Columns - Columns for the loop. - http://wordpress.stackexchange.com/q/9308/178
<?php
/**
* get_columns_array
*
* Columns for the loop, single function interface (limited)
*
* Copyright (c) 2011 hakre <http://hakre.wordpress.com/>, some rights reserved
*
* USAGE:
Array (
[GLOBALS] => Array *RECURSION*
[_POST] => Array (
[runFunc] => submitWeightUpdate
[userid] => 1
[weight] => 122 )
[_GET] => Array ( )
[_COOKIE] => Array (
[wp-settings-1] => tml1=0&tml0=0&editor=tinymce&hidetb=1
[wp-settings-time-1] => 1297487732