Skip to content

Instantly share code, notes, and snippets.

View lordmatt's full-sized avatar

Matthew lordmatt

View GitHub Profile
@georgiecel
georgiecel / wp-comment-walker
Last active December 28, 2022 15:16
Custom comment walker for HTML5 friendly WordPress comment and threaded replies. To be inserted in functions.php.
<?php
class comment_walker extends Walker_Comment {
var $tree_type = 'comment';
var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' );
// constructor – wrapper for the comments list
function __construct() { ?>
<section class="comments-list">
@lordmatt
lordmatt / NP_ItemLicense.php
Last active December 15, 2015 14:49
This is a fork of Graeme Cook's 0.1.0 ItemLicense plugin for NucleusCMSwhich can be found here: http://wakka.xiffy.nl/itemlicense_code The purpose of the fork is to make changes including depreciating all support for PHP4 and standardised on PHP5 style coding. Also it means that his code is available on github.
<?php
/**
* Apply a license of your choice to NucleusCMS blogs on an item-by-item basis.
*
* Copyright (C) ???? Graeme Cook, 2013 Matthew Brown aka Lord Matt
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or