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
/** | |
* @property wpdb $ID | |
* @property wpdb $post_author | |
* @property wpdb $post_date | |
* @property wpdb $post_date_gmt | |
* @property wpdb $post_content | |
* @property wpdb $post_title | |
* @property wpdb $post_excerpt | |
* @property wpdb $post_status |
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
class justified_tagcloud_widget extends WP_Widget { | |
/** constructor */ | |
function justified_tagcloud_widget() { | |
$widget_ops = array( | |
'description' => 'Display\'s a Tag Cloud based on Nextgen, used by Justified Image Grid ' | |
); | |
parent::WP_Widget(false, $name = 'Justified Image Grid Tag Cloud', $widget_ops); | |
} |
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
/* | |
* Hide Nextgen styles and scripts | |
*/ | |
if (!is_admin()) { | |
// goodbye NextGen junk | |
define('NGG_SKIP_LOAD_SCRIPTS', true); | |
function nextgen_styles() { | |
wp_deregister_style('NextGEN'); | |
} | |
add_action('wp_print_styles', 'nextgen_styles', 100); |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 np_replace_howdy($wp_admin_bar){ | |
//New text to replace Howdy | |
$new_text = 'Welcome'; | |
//Call up the 'my-account' menu node for current values. | |
$my_account = $wp_admin_bar->get_node('my-account'); | |
//Replace the 'Howdy' with new text with string replace | |
$new_title = str_replace('Howdy', $new_text, $my_account->title); |
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 | |
/** | |
* Author: Arlo Carreon <http://arlocarreon.com> | |
* Info: http://mexitek.github.io/phpColors/ | |
* License: http://arlo.mit-license.org/ | |
*/ | |
namespace Mexitek\PHPColors; |
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 shadeBlendConvert(p, from, to) { | |
if(typeof(p)!="number"||p<-1||p>1||typeof(from)!="string"||(from[0]!='r'&&from[0]!='#')||(typeof(to)!="string"&&typeof(to)!="undefined"))return null; //ErrorCheck | |
if(!this.sbcRip)this.sbcRip=function(d){ | |
var l=d.length,RGB=new Object(); | |
if(l>9){ | |
d=d.split(","); | |
if(d.length<3||d.length>4)return null;//ErrorCheck | |
RGB[0]=i(d[0].slice(4)),RGB[1]=i(d[1]),RGB[2]=i(d[2]),RGB[3]=d[3]?parseFloat(d[3]):-1; | |
}else{ | |
switch(l){case 8:case 6:case 3:case 2:case 1:return null;} //ErrorCheck |