Skip to content

Instantly share code, notes, and snippets.

@svebal
svebal / wp-coustom-term-options.php
Created May 25, 2011 09:55 — forked from derpixler/wp-coustom-term-options.php
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
@svebal
svebal / wp-action-plugin-link-hook.php
Created May 25, 2011 09:58 — forked from derpixler/wp-action-plugin-link-hook.php
Wordpress Hook into the plugin action links and filter them!
@svebal
svebal / modifier.parseXML.php
Created June 10, 2011 05:55 — forked from derpixler/modifier.parseXML.php
Smarty Modifier parseXML to Array
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty {$xml|parseXML} function plugin
*
// ==UserScript==
// @name Ingress Intel: Notify UI
// @namespace https://arantius.com/misc/greasemonkey/
// @description Annotate the Ingress Intel Dashboard with links to control the Ingress Notify app.
// @match http://www.ingress.com/intel*
// @version 1
// @grant none
// ==/UserScript==
//const NOTIFY_SERVER = 'http://localhost:8080/'
<h3>Ferien im Monat <?php echo strftime ('%B' , get_post_meta($post_id , 'Date', true ) ) ?></h3>
<?php
$i = 0;
$nextPeriod = false;
foreach ($days as $day) {
$vacationDataJson = get_post_meta($day->ID, 'Ferien', true );
### Ist dies ein Ferientag? ###
if( strlen($vacationDataJson) > 0 ) {
# Apache Configuration File
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have access
# to the main server config file (usually called `httpd.conf`), you should add
# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html.
# ##############################################################################
# # CROSS-ORIGIN RESOURCE SHARING (CORS) #
# ##############################################################################
<?php
$url = $_GET['url'];
$allowedurls = array(
'http://developer.yahoo.com',
'http://icant.co.uk'
);
if(in_array($url,$allowedurls)){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@svebal
svebal / iitc-export-import-draw.js
Last active June 11, 2019 10:55
Plugin for IITC - let you im- / export your sketches from drawing tools
// ==UserScript==
// @id iitc-export-import-draw@skamander
// @name IITC plugin: export and import data from draw tools
// @version 0.0.1
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @description Import/Export Data from draw tools
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
// @match http://www.ingress.com/intel*
if (navigator && navigator.platform && navigator.platform.match(/^(iPad|iPod|iPhone)$/)) {
//do something magic
}
@svebal
svebal / startpage-posts.php
Last active August 29, 2015 14:01
startpage-posts.php
if (is_sticky() ) {
the_content();
} else {
the_excerpt();
}