Skip to content

Instantly share code, notes, and snippets.

View justrjlewis's full-sized avatar

RJ Lewis justrjlewis

View GitHub Profile
<?php
/**
* Simple Example of a client calling WordPress OAuth Server
* Replace the variabls below with your own.
*
* @author Justin Greer <justin@justin-greer.com>
*/
$server_url = 'https://wordpress.dev';
$client_id = '6lkmsGocFcvxVG4S5s3QCHGi5Pvutl8AHtXaalmP';
$client_secret = 'yRntyrmDTquw7bOd0kHuFQ5mj2wtnSjVKGpi8MW2';
@justrjlewis
justrjlewis / functions.php
Created September 2, 2018 21:36 — forked from cliffordp/functions.php
Event Tickets Plus: WooCommerce: Force all tickets to be "Sold Individually".
<?php
/**
* Event Tickets Plus: WooCommerce: Force all tickets to be "Sold Individually".
*
* By default, this limits the purchase quantity to 1, but this is quantity is
* filterable with `woocommerce_add_to_cart_sold_individually_quantity`.
*
* @see Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_event_for_ticket()
* @see WC_Product::is_sold_individually()
* @see WC_Cart::add_to_cart()
<?php
/* Tribe, limit ticket qty */
function tribe_limit_tickets() {
?>
<script type="text/javascript">
jQuery(document).ready( function( $ ) {
// do this if tickets available
if ( $('.tribe-events-tickets').length ) {
// set max qty to 1
@justrjlewis
justrjlewis / code-1.php
Created June 1, 2015 20:23 — forked from hissy/code-1.php
Concrete5 5.7 Pagination
<?php if ($showPagination): ?>
<?php echo $pagination;?>
<?php endif; ?>
<?php
defined('C5_EXECUTE') or die(_('Access Denied'));
class BasePackage extends Package {
/***************************************************************
* The following variables can be defined by child classes.
*
* Only define the ones you need.
@mixin inline-block {
display: -moz-inline-stack; // ff 2
display: inline-block;
zoom:1; *display: inline; _height: 15px; // ie 6-7
}