This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function soundst_numeric_posts_nav() { | |
if( is_singular() ) | |
return; | |
global $wp_query; | |
/** Stop execution if there's only 1 page */ | |
if( $wp_query->max_num_pages <= 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useContext } from 'react' | |
import { ACTION_TYPES, StoreContext } from '../pages/_app' | |
const useTrackLocation = () => { | |
const [locationErrorMsg, setLocationErrorMsg] = useState(''); | |
//const [latlong, setLatLong] = useState(''); | |
const [isFindingLocation, setIsFindingLoaction] = useState(false); | |
const { dispatch } = useContext(StoreContext); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", function() { | |
// Discount sidebar disclaimer on subscriptions. | |
var discountDiv = document.querySelector('#discount_inactive'), | |
child = document.createElement('div'); | |
child.innerHTML = `<p style="padding-top:10px;">Good news, you’re earning rewards for you order. Unfortunately, due to software limitations, rewards can’t be redeemed for orders with subscriptions. If you’d like to use rewards towards a purchase, please make sure to not have any Subscribe & Save products in your cart.</p>`; | |
discountDiv.appendChild(child); | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Load the Placement API class | |
* These methods can be used to interact with | |
* the peta_placements db table | |
* | |
* @package PETA\Placement_Plugin\inc | |
* @since 4.0.0 | |
* @author adamc | |
* @licence GNU-2.0+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Track pageviews when the page is translated directly from translate.google.com or bing.com/translator | |
* and return an individual query parameter. | |
* | |
* @param string name | |
* @return string results | |
*/ | |
const getUrlParameter = ( name ) => { | |
name = name.replace( /[\[]/, '\\[').replace(/[\]]/, '\\]' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Install placement table | |
* upon plugin activation, create custom table to store user placements | |
* | |
* @since 4.0.0 | |
* @author acarter | |
* | |
* @return void | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var gulp = require( 'gulp' ), | |
maps = require( 'gulp-sourcemaps' ), | |
autoprefixer = require( 'gulp-autoprefixer' ), | |
concat = require( 'gulp-concat' ), | |
uglify = require( 'gulp-uglify' ), | |
rename = require( 'gulp-rename' ), | |
sass = require( 'gulp-sass' ), | |
cleanCSS = require( 'gulp-clean-css' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin bootstrap file | |
* | |
* @link https://github.com/PETAF/plugin-get-prod-images | |
* @since 1.0.0 | |
* @package PETA\Plugin_Get_Prod_Images\ | |
* | |
* @wordpress-plugin | |
* Plugin Name: Plugin Get Prod Images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var gulp = require( 'gulp' ), | |
maps = require( 'gulp-sourcemaps' ), | |
autoprefixer = require( 'gulp-autoprefixer' ), | |
concat = require( 'gulp-concat' ), | |
uglify = require( 'gulp-uglify' ), | |
rename = require( 'gulp-rename' ), | |
sass = require( 'gulp-sass' ), | |
cleanCSS = require( 'gulp-clean-css' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery( function( $ ) { | |
"use strict"; | |
/** | |
* Open media library in modal | |
*/ | |
function imageModal( metaBoxSelector ) { | |
let frame, | |
metaBox = $( metaBoxSelector ), |
NewerOlder