Skip to content

Instantly share code, notes, and snippets.

View aristath's full-sized avatar
🏠

Ari Stathopoulos aristath

🏠
View GitHub Profile
<?php
/*
Plugin Name: MarketPress
Version: 2.8.8
Plugin URI: http://premium.wpmudev.org/project/e-commerce/
Description: The complete WordPress ecommerce plugin - works perfectly with BuddyPress and Multisite too to create a social marketplace, where you can take a percentage! Activate the plugin, adjust your settings then add some products to your store.
Author: Aaron Edwards (Incsub)
Author URI: http://uglyrobot.com
Text Domain: mp
WDP ID: 144
<?php
/**
* Download gravatars locally.
*
* @package wptt/font-loader
* @license https://opensource.org/licenses/MIT
*/
namespace Aristath\LocalGravatars;
<?php
/**
* Kirki Advanced Customizer
*
* This is a sample configuration file to demonstrate all fields & capabilities.
*
* CAUTION:
* USE THIS WITH THE DEVELOP BRANCH ON THE GITHUB REPOSITORY:
* https://github.com/aristath/kirki/tree/develop
*
<?php // phpcs:ignore WordPress.Files.FileName
/**
*
* Add blocks styles inline.
*
* @package WPTRT/BlockAssets
*/
namespace WPTRT;
<?php
class Maera_Timber_Conditionals extends TimberCore {
public $comments_open;
public $has_tag;
public $has_term;
public $in_category;
public $is_404;
public $is_admin;
@aristath
aristath / phpcs.bash
Last active September 19, 2019 08:20 — forked from ilicfilip/tf-checkout.bash
Runs PHPCS on changed files only
if [ $# -lt 0 ]; then
echo "------------------------"
echo "usage: $0 \$1"
echo " \$1: Files to check"
echo "------------------------"
exit 1
fi
if [ "$#" == 1 ]
then
@aristath
aristath / poop.js
Last active September 10, 2019 21:31
jQuery replacement for WordPress themes. Contains the most widely-used functions.
/**
* Find an element.
*
* @param {string|Object} selector - The css selector of the element.
* If object then it can either be document or an element.
* @param {Object} parent - The parent element, or undefined for document.
* @return {Object} - returns the _lm object to allow chaining methods.
*/
var _lm = function( selector, parent ) {
parent = parent || document;
@aristath
aristath / helperEl.js
Last active August 28, 2019 12:05
simple jQuery alternative for common functions, inspired by http://youmightnotneedjquery.com/
/* eslint no-unused-vars:off */
var fusionHelperEl = {
/**
* Find an element.
*
* @param {string|Object} selector - The css selector of the element.
* If object then it can either be document or an element.
* @param {Object} parent - The parent element, or undefined for document.
* @return {Object} - returns the fusionHelperEl object to allow chaining methods.
*/
<?php
/**
* Plugin Name: parent-theme-mods-loader
*/
add_action(
'customize_register',
/**
* Hooks in customize_register to load our control, register settings and do what needs to be done.
*
<?php
/**
* Requires ariColor: https://aristath.github.io/ariColor/
*/
add_action( 'wp', function() {
if ( ! class_exists( 'ariColor' ) ) {
return;
}
$colors = [];