Skip to content

Instantly share code, notes, and snippets.

View NateJLewis's full-sized avatar
🎯
Focusing

Nate Lewis NateJLewis

🎯
Focusing
View GitHub Profile
<?php
function _wgt_scripts() {
// styles and scripts code...
$form_html = array(
'trip_signup_form' => _wgt_get_trip_signup_form_html(),
'request_trip_quote' => _wgt_request_trip_quote_form_html()
);
wp_localize_script(
@NateJLewis
NateJLewis / material-design.php
Last active June 29, 2016 01:22
WordPress theme file to include social media, Google Material, and other svg icons.
<?php
// Include in your theme functions.php:
// require get_template_directory() . '/includes/svg/social-media-icons.php';
// require get_template_directory() . '/includes/svg/material-design.php';
//
// Add the desired function in the appropriate theme file
// _themename_md_expand_more()
//
// If a class or id is needed include them as param1, param 2
// _themename_md_expand_more( 'class1 class2', 'id' )
<section id="author-box" class="col-xs-12 col-md-6">
<?php
$site_url = site_url();
$img_icon_dir = get_template_directory_uri() . '/assets/images/icons/';
$facebook_icon = $img_icon_dir . 'facebook_white_bg.png';
$twitter_icon = $img_icon_dir . 'twitter_white_bg.png';
$youtube_icon = $img_icon_dir . 'youtube_white_bg.png';
$instagram_icon = $img_icon_dir . 'instagram_white_bg.png';
$googleplus_icon = $img_icon_dir . 'google_plus_white_bg.png';
$pinterest_icon = $img_icon_dir . 'pinterest_white_bg.png';
function shareFbUi(data) {
FB.ui({
href: data.href,
hashtag: data.hashtag,
method: 'share_open_graph',
action_type: 'og.shares',
action_properties: JSON.stringify({
object: {
'og:url': data.href,
'og:title': data.title,
<?php
/*
*
*
* Add acf repeater fields that have different classes to style them depending on how many.
*
*
*/
add_action( 'genesis_entry_content', 'contact_page_boxes_row_1', 1 );
function contact_page_boxes_row_1() {
<?php
/**
* Template part for the home page.
*
* @package _njl
*/
// check if the flexible content field has rows of data
if( have_rows('content') ):
// loop through the rows of data
while ( have_rows('content') ) : the_row();
<?php
use net\authorize\api\contract\v1 as AnetAPI;
use net\authorize\api\controller as AnetController;
if ( ! defined( 'ABSPATH' ) ) {
die( 'You are not allowed to call this page directly.' );
}
if ( class_exists( 'FrmAuthNetAim' ) ) {
return;
}
public $type;
public $entry;
public $form;
public $action;
public $invoice_id;
public $invoice;
public $amount;
public $response;
public function __construct( $atts ) {
mc_gross => 15.00
protection_eligibility => Eligible
address_status => confirmed
payer_id => NQALT2U5J9NNS
address_street => 107 Tate Court
payment_date => 10:44:27 Mar 28, 2016 PDT
payment_status => Completed
charset => windows-1252
address_zip => 32828
first_name => Mike