Skip to content

Instantly share code, notes, and snippets.

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

Raju Ahmmed rajuahmmed

🏠
Working from home
View GitHub Profile
@rajuahmmed
rajuahmmed / wp-comment-callback
Created May 29, 2016 15:20 — forked from georgiecel/wp-comment-callback
Custom callback for HTML5 friendly WordPress comment. Also includes schema.org microdata. To use, insert the following into comments.php: <?php wp_list_comments('callback=better_comment&end-callback=better_comment_close'); ?>
// awesome semantic comment
function better_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ( 'article' == $args['style'] ) {
$tag = 'article';
$add_below = 'comment';
} else {
@rajuahmmed
rajuahmmed / php-html-css-js-minifier.php
Created April 17, 2016 10:39 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {