Skip to content

Instantly share code, notes, and snippets.

View Ramoonus's full-sized avatar
🏠
Working from home

Ramon van Belzen Ramoonus

🏠
Working from home
View GitHub Profile
@Ramoonus
Ramoonus / template-stock-report.php
Created December 7, 2011 13:55 — forked from mikejolley/template-stock-report.php
WooCommerce - Stock Report. A template page snippet to (if you are logged in as admin) output a list of products/stock (which you are managing stock for) ready for printing.
<?php
/*
Template Name: Stock Report :)
*/
if (!is_user_logged_in() || !current_user_can('manage_options')) wp_die('This page is private.');
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@Ramoonus
Ramoonus / parse-word-footnotes.php
Created August 21, 2011 13:24
Function which uses regular expression to parse Microsoft Word footnotes into WordPress's Simple Footnotes format
/**
* Function which uses regular expression to parse Microsoft Word footnotes
* into WordPress's Simple Footnotes format
*
* @param string $content post content from filter hook
* @returns string post content with parsed footnotes
* @link http://ben.balter.com/2011/03/20/regular-expression-to-parse-word-style-footnotes/
*/
function bb_parse_footnotes( $content ) {
global $post;