Skip to content

Instantly share code, notes, and snippets.

View screamwork's full-sized avatar

screamwork screamwork

  • Parts Unknown
  • 11:25 (UTC +02:00)
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@screamwork
screamwork / custom-menu-items.php
Created August 17, 2017 07:35 — forked from daggerhart/custom-menu-items.php
WordPress class for easily adding custom menu items dynamically to a menu.
<?php
class custom_menu_items {
// only register with wp hooks once
protected $has_registered = false;
// internal list of menus affected
public $menus = array();
// internal list of new menu items
@screamwork
screamwork / post-process.php
Created August 12, 2012 15:17 — forked from bueltge/post-process.php
WordPress Custom Post Type: Insert post via Frontend
<?php
/**
* post-process.php
* make sure to include post-process.php in your functions.php. Use this in functions.php:
*
* get_template_part('post-process');
*
*/
function do_insert() {
if( 'POST' == $_SERVER['REQUEST_METHOD']