Skip to content
Commits on Source (2)
......@@ -150,16 +150,16 @@ function the_thumbnail() {
}
function get_all_colors($post) {
include_once("csscolor.php");
//pull from DB
$base->bg = get_post_meta($post->ID, 'image_colors_bg',true);
$base->fg = get_post_meta($post->ID, 'image_colors_fg',true);
$bg = get_post_meta($post->ID, 'image_colors_bg',true);
$fg = get_post_meta($post->ID, 'image_colors_fg',true);
// show return variable if full
if($base->bg != '' && $base->fg != '') {
return $base;
if($bg != '' && $fg != '') {
return new CSS_Color($bg, $fg);
} else {
// else, get the colors
include_once("csscolor.php");
$base = new CSS_Color(base_color($post));
//set bg
$bg = $base->bg;
......@@ -227,6 +227,9 @@ function print_stylesheet() {
function base_color($post) {
$url = get_post_meta($post->ID, 'image_url', true);
if (!$url) {
return rgbhex(0, 0, 0);
}
// get the image name
$imgname = trim($url);
......
......@@ -353,12 +353,12 @@
return stripslashes(wp_filter_post_kses(get_option($this->shortname.'_feed_intro' )));
}
function feedEmail() {
return htmlspecialchars(wp_filter_post_kses(get_option($this->shortname.'_feed_email')), 'UTF-8');
return htmlspecialchars(wp_filter_post_kses(get_option($this->shortname.'_feed_email')));
}
/* TWITTER FUNCTIONS */
function twitter() {
return htmlspecialchars(wp_filter_post_kses(get_option($this->shortname.'_twitter')), 'UTF-8');
return htmlspecialchars(wp_filter_post_kses(get_option($this->shortname.'_twitter')));
}
function twitterToggle() {
return get_option($this->shortname.'_twitter_toggle' );
......