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
const COLOR_SCHEMES = { | |
success: [ '#FFFFFF', '#009b4b' ], | |
error: [ '#FFFFFF', '#ff3f71' ], | |
info: [ '#333333', '#11c7d7' ], | |
warning: [ '#FFFFFF', '#e87834' ], | |
}; | |
const __sDebugger = ( { | |
type = 'info', | |
msg = null, | |
label = 'No Label', |
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
(function() { | |
const pTable = document.getElementById('the-list'); | |
const pRows = pTable.getElementsByTagName('TR'); | |
let output = '| # | PLUGIN | ACTIVE | INSTALLED | CURRENT |\n'; | |
output += '|-|-|-|-|-|\n'; | |
for (let i = 0, m = pRows.length; i < m; i++) { |
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
window.POLYFILL_ALL_THE_THINGS = { | |
reduce: ['foo', 'bar', 'baz'].reduce( ( acc, v ) => { | |
return { ...acc, [`${v}_key`]: `${v}_value` }; | |
}, [] ), | |
reduceRight: ['foo', 'bar', 'baz'].reduceRight( ( acc, v ) => { | |
return { ...acc, [`${v}_key`]: `${v}_value` }; | |
}, {} ), | |
map: ['foo', 'bar', 'baz'].map( str => { | |
return str += ' 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
<?php | |
/** | |
* Thumbnail Meta | |
*/ | |
class Thumbnail_Meta | |
{ | |
//Holds Media Fields | |
private $media_fields = []; |
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
//Based off - https://gist.github.com/mathetos/1eea92f71934442671a7 | |
class Tax_Images { | |
public function __construct() { | |
//Enqueue Media JS/CSS | |
add_action( 'admin_enqueue_scripts', 'wp_enqueue_media' ); | |
add_action( 'category_add_form_fields' , array( $this, 'ti_add_form_fields' ), 10, 2 ); | |
add_action( 'category_edit_form_fields' , array( $this, 'ti_edit_form_fields' ), 10, 2 ); | |
add_action( 'edited_category' , array( $this, 'ti_save_category_fields' ), 10, 2 ); |
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
// BASED on this article - http://www.bennadel.com/blog/2597-preloading-images-in-angularjs-with-promises.htm | |
// Preloading Images In AngularJS With Promises. | |
// I provide a utility class for preloading image objects. | |
TRMFullScreenApp.factory( | |
"preloader", | |
function( $q, $rootScope, $timeout ) { | |
// I manage the preloading of image objects. Accepts an array of image URLs. | |
function Preloader( imageLocations ) { |
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
function my_user_has_group(){ | |
global $bp; | |
if( !bp_has_groups( bp_ajax_querystring( 'groups' ).'&user_id='.bp_loggedin_user_id())) { | |
return false; | |
}else{ | |
return true; | |
} | |
} |