This file contains hidden or 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
const fs = require( 'fs' ) | |
const themeJson = fs.readFileSync( './theme.json' ) | |
const theme = JSON.parse( themeJson ) | |
const colors = theme.settings.color.palette.reduce( ( acc, item ) => { | |
const [color, number] = item.slug.split( '-' ) | |
// If there is a number identifier, make this an object | |
if(undefined !== number) { |
This file contains hidden or 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 | |
/** | |
* Set the number of posts on the Custom Post Type archive for `fe_recipe` to 5. | |
*/ | |
add_action( 'pre_get_posts', 'fe_modify_number_of_posts_per_page' ); | |
/** | |
* Modify Posts Per Page for CPT `fe_recipe` | |
* |
This file contains hidden or 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
// Either create a new empty object, or work with the existing one. | |
window.JPry_CMB2 = window.JPry_CMB2 || {}; | |
(function( window, document, $, app, undefined ) { | |
'use strict'; | |
// Cache specific objects from the DOM so we don't look them up repeatedly. | |
app.cache = function() { | |
app.$ = {}; | |
app.$.select = $( document.getElementById( 'jpry_sample_selection' ) ); |
This file contains hidden or 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
/** | |
* file: wdsjQuery.js | |
* | |
* Handle Foo things for the foo theme. | |
*/ | |
window.wdsFoo = {}; | |
( function( window, $, app ) { | |
// Private variable. | |
var fooVariable = 'foo'; |
This file contains hidden or 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
// We want to adapt the names of views listed within the Tribe Events Bar | |
add_filter( 'tribe-events-bar-views', 'rename_tribe_views_in_selector', 100 ); | |
function rename_tribe_views_in_selector( $views ) { | |
// This lists the original view names you wish to change along | |
// with the substitutes to wish to use in their place | |
$to_change = array( | |
'List' => 'All Events', | |
'Month' => 'Calendar', | |
'Photo' => 'Picture Board', |
This file contains hidden or 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 | |
/* | |
Filter pmpro_has_membership_access based on paid membership access. | |
*/ | |
function my_pmpro_has_membership_access_filter( $hasaccess, $mypost, $myuser, $post_membership_levels ) { | |
$my_paid_level_ids = array(5,6,7); | |
// Check if the user doesn't have access | |
if( ! $hasaccess ) { | |
// If this post has membership levels associated with it and is supposed to be locked by the Addon Plugin |
This file contains hidden or 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
a[target="_blank"]:after { | |
content: "\f08e"; | |
font-family: FontAwesome; | |
font-weight: normal; | |
font-style: normal; | |
display: inline-block; | |
text-decoration: inherit; | |
} |