Skip to content

Instantly share code, notes, and snippets.

View sunnyratilal's full-sized avatar

Sunny Ratilal sunnyratilal

View GitHub Profile
<!-- OLD MARKUP -->
<div class="edd-review">
<div class="edd-review-h-card">
<p>Testing Reviewer Discount by Sunny Ratilal</p>
<p><a href="http://wp.dev/downloads/sample-product/">Sample Product</a>
</p>
<div class="edd_reviews_rating_box" role="img" aria-label="5 stars">
<div class="edd_star_rating" style="width: 95px"></div>
</div>
<div class="clear"></div>
<!-- OLD MARKUP -->
<ul id="edd_recent_reviews" class="edd_reviews_list edd_widget_list">
<li class="edd_recent_review">Anonymous on <a href="http://wp.dev/downloads/recurring-product/#comment-21">Recurring Product</a>
</li>
<li class="edd_recent_review">Anonymous on <a href="http://wp.dev/downloads/recurring-product/#comment-20">Recurring Product</a>
</li>
<li class="edd_recent_review">Anonymous on <a href="http://wp.dev/downloads/recurring-product/#comment-19">Recurring Product</a>
</li>
<li class="edd_recent_review">Anonymous on <a href="http://wp.dev/downloads/sample-product/#comment-5">Sample Product</a>
</li>
<!-- OLD MARKUP -->
<ul id="edd_per_product_reviews" class="edd_reviews_list edd_widget_list">
<li class="edd_recent_review">
<div role="img" aria-label="5 stars">
<div class="edd_star_rating" style="float: none; width: 95px;"></div>
<div class="edd_recent_review_author"><span class="edd_review_title">Test Review</span> — <span class="edd_review_author">Sunny Ratilal</span>
</div>
</div>
</li>
</ul>
<?php
function query_reviews() {
global $post;
remove_action( 'pre_get_comments', array( edd_reviews(), 'hide_reviews' ) );
remove_filter( 'comments_clauses', array( edd_reviews(), 'hide_reviews_from_comment_feeds_compat' ), 10, 2 );
remove_filter( 'comment_feed_where', array( edd_reviews(), 'hide_reviews_from_comment_feeds' ), 10, 2 );
$reviews = get_comments( array(
'post_id' => $post->ID,
<div class="edd-reviews-form comment-respond" id="edd-reviews-respond">
<h3 id="edd-reviews-review-title" class="comment-reply-title edd-reviews-review-title">Write a Review</h3>
<form action="/downloads/test-title/?review_submitted=1" method="post" name="edd-reviews-form" id="edd-reviews-form" class="comment-form edd-reviews-form">
<fieldset>
<div class="edd-reviews-form-inner">
<p class="edd-reviews-review-form-review-title">
<label for="edd-reviews-review-title">Review Title <span class="required">*</span></label>
<input type="text" id="edd-reviews-review-title" class="edd-reviews-review-title" name="edd-reviews-review-title" value="" size="30" aria-required="true" required="required" />
</p><!-- /.edd-reviews-review-form-review-title -->
<p class="edd-reviews-review-form-rating">
#!/bin/bash
CUR_DIR=$(pwd)
echo "Traversing directories..."
for i in $(find . -name ".git" | cut -c 3-); do
echo $i;
cd "$i";
@sunnyratilal
sunnyratilal / hack.sh
Last active August 29, 2015 14:24 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@sunnyratilal
sunnyratilal / css_resources.md
Created May 31, 2014 16:42 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@sunnyratilal
sunnyratilal / javascript_resources.md
Created May 31, 2014 16:42 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage