Skip to content

Instantly share code, notes, and snippets.

View derpixler's full-sized avatar

DerPixler derpixler

View GitHub Profile
@derpixler
derpixler / wp-action-plugin-link-hook.php
Created May 25, 2011 06:41
Wordpress Hook into the plugin action links and filter them!
@derpixler
derpixler / wp-coustom-term-options.php
Created May 25, 2011 07:02
Wordpress Hooks to add coustom term Options
<?php
/**
*
* Add only for parents coustom term Options
* @author rene reimann
* @home http://www.rene-reimann.de
*
* @hook category_add_form_fields Hooks into the category edit page
* @hook edit_tag_form_fields Hooks into the category frontpage
@derpixler
derpixler / wp-manage_category_custom_column.php
Created May 26, 2011 12:28
Wordpress: hook in the tag-list table
add_filter( 'manage_category_custom_column','myTestC');
function myTestC($content){
return $content;
}
@derpixler
derpixler / wp-custom-excerpt.php
Created June 7, 2011 14:57
Custom Excerpt with Image and some other stuff from a Post.
function custom_excerpt($excerpt){
preg_match_all('/<img.*?src="(.+?)"(.*?)>/i',get_the_content(),$match);
$image = $match[0][0];
$link = '<h2><a href="'.get_permalink().'" title="'.get_the_title().'"></a></h2>';
$excerpt = '<p>'.$excerpt.'</p>';
return $image . $link . $excerpt;
}
@derpixler
derpixler / pacman.html
Created June 8, 2011 07:08
Purple Pacman
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Purple Pacman</title>
</head>
<style>
#pacman{
width: 0px;
height: 0px;
@derpixler
derpixler / modifier.parseXML.php
Created June 9, 2011 19:00
Smarty Modifier parseXML to Array
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty {$xml|parseXML} function plugin
*
@derpixler
derpixler / a Link to Wordpress Plugin Directory
Created June 15, 2011 07:17
G-Lock Double Opt-in Manager without js and Hooks
@derpixler
derpixler / easy_debug_actions_filter.php
Created July 12, 2011 09:05
Easy Debug Action and Filter Hooks in Wordpress
<?
/*
* add the following code to the add_filter and do_action function in the wp-includes/plugin.php
function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
global $wp_filter, $merged_filters;
*/
@derpixler
derpixler / windowCache.html
Created August 17, 2011 08:10
Clint Side Caching
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Clint Side Caching</title>
</head>
<body>
<div id="iframe"></div>
@derpixler
derpixler / plugin-options.php
Created August 29, 2011 12:45
Create a Wordpress Plugin option page in the plugin page.
<?php
/**
* Plugin Name: Plugin Options
* Description: Jo Fetzt wa?
* Version: 0.88
* Author: René Reimann
*/
add_filter( 'plugin_action_links_plugin-options.php', 'po_plugin_action_links', 10, 3 );