Skip to content

Instantly share code, notes, and snippets.

View christoferw's full-sized avatar

Christofer Wesseling christoferw

View GitHub Profile
@christoferw
christoferw / remove_admin_menu_items_stage_1.php
Created August 12, 2016 10:32
Remove WordPress Admin Menu Items
if ( ! function_exists( 'weslink_remove_plugin_admin_menu' ) ) {
function weslink_remove_plugin_admin_menu() {
remove_menu_page('edit-comments.php'); // Kommentare
}
}
add_action( 'admin_menu', 'weslink_remove_plugin_admin_menu', 9999 );
@christoferw
christoferw / inputdate.css
Created August 3, 2016 08:02
Placeholder for Input type: date
input[type="date"]:before {
content: attr(placeholder) !important;
color: #aaa;
margin-right: 0.5em;
}
input[type="date"]:focus:before,
input[type="date"]:valid:before {
content: "";
}
<?php
$sites = "http://www.broadcastsolutions.com.au/
http://www.kvm.com.au/
http://www.ambertech.com.au/";
$sites = preg_split('/\r\n|\r|\n/', $sites);
echo "
// This is a test harness for your module
// You should do something interesting in this harness
// to test out the module and to provide instructions
// to users on how to use it by example.
// open a single window
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
@christoferw
christoferw / API.class.php
Created November 9, 2013 11:21
full and fixed class file
<?php
//from: http://coreymaynard.com/blog/creating-a-restful-api-with-php/#toc_5
abstract class API{
/**
* Property: method
* The HTTP method this request was made in, either GET, POST, PUT or DELETE
*/
protected $method = '';
/**
* Property: endpoint