Skip to content

Instantly share code, notes, and snippets.

googletag.cmd.push(function() {
slot_leaderboard_top = googletag.defineSlot('/8596368/Leaderboard', responsive_home_superleader, 'div-gpt-ad-1491250418056-' + article_id).addService(googletag.pubads());
googletag.display('div-gpt-ad-1491250418056-' + article_id);
slot_rectangle = googletag.defineSlot('/8596368/Rectangle', responsive_rectangle, 'div-gpt-ad-1456437448335-' + article_id).addService(googletag.pubads());
googletag.display('div-gpt-ad-1456437448335-' + article_id);
slot_rectangle_bottom = googletag.defineSlot('/8596368/Rectangle_bottom', [300, 250], 'div-gpt-ad-1367951355269-' + article_id).addService(googletag.pubads());
googletag.display('div-gpt-ad-1367951355269-' + article_id);
});
<div class="post">
<a class="overlay" href="http://dev.liquor.com/articles/culinary-concierge-hugh-daschbach/"></a>
<div class="post-thumb">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/926427/story_thumbnail_3.jpg" class="img-responsive">
</div>
<div class="post-meta">
<span class="label label-sponsored">Sponsored Content</span>
<h3>The Perfect Shower Beer Has Arrived</h3>
</div>
</div>
<script>
var pulpixId=1215;!function(e,t){var i=t.createElement("script"),
r=t.getElementsByTagName("script")[0];i.src="https://cdn.pulpix.com/static/pulpix.js",
i.id="pulpix",i.setAttribute("data-user-id",pulpixId),
r.parentNode.insertBefore(i,r)}(window,document);
</script>
!function(t,e,n){function a(t){var a=e.createElement("script");a.type="text/javascript",a.async=!1,a.src=("https:"===e.location.protocol?"https":"http")+":"+n,(t||e.body||e.head).appendChild(a)}function o(){var t=e.getElementsByTagName("script"),n=t[t.length-1];return n.parentNode} var p=o();t.spotId="sp_HzZnwWye",t.parentElement=p,a(p)}(window.SPOTIM={},document,"//www.spot.im/launcher/bundle.js");
if ( window.SPOTIM && window.SPOTIM.startSSO ) {
startSSO();
} else {
document.addEventListener('spot-im-api-ready', startSSO, false);
}
var startSSO = function() {
var callback = function (codeA, completeSSOCallback) {
<?php
/*
Plugin Name: Front End Registration and Login
Plugin URI: https://pippinsplugins.com/creating-custom-front-end-registration-and-login-forms
Description: Provides simple front end registration and login forms
Version: 1.0
Author: Pippin Williamson
Author URI: https://pippinsplugins.com
*/
@bryan-rojas-liquor
bryan-rojas-liquor / page-custom.php
Created September 20, 2016 15:59
Page to show example of the shortcode to post list
<?php
/**
* Template Name: Custom Template
*/
function posts_lists($atts) {
// Attributes
$atts = shortcode_atts(
<?php
/*--- More Logic Up Here ---*/
if ($keywork) {
$keywork_arr = explode(" recipes ", $keywork);
$query = ninja_fb_bot_chat_format_query($keywork_arr[1]);
}
if (strlen($query) >= 3) {
@bryan-rojas-liquor
bryan-rojas-liquor / callbak.php
Last active August 1, 2016 15:21
FB Messenget Chat Bot Extension
<?php
$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );
require_once(dirname(__FILE__) . '/lid/autoload.php');
use pimax\FbBotApp;
use pimax\Messages\Message;
use pimax\Messages\MessageButton;
use pimax\Messages\StructuredMessage;
use pimax\Messages\MessageElement;
use pimax\Messages\MessageReceiptElement;
@bryan-rojas-liquor
bryan-rojas-liquor / wp-ajax-w-class-file.php
Last active June 2, 2016 16:38
Using Ajax with a Class file
<?php
class MyTheme
{
public function __construct()
{
add_action( 'wp_footer', array( $this, 'aux_function' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'init_plugin' ) );
add_action( 'wp_ajax_process_reservation', array( $this, 'process_reservation' ) );
add_action( 'wp_ajax_nopriv_process_reservation', array( $this, 'process_reservation' ) );
}