Skip to content
Snippets Groups Projects
Commit 88467ec2 authored by ale's avatar ale
Browse files

Fix warnings

parent bb959fae
No related branches found
Tags v0.1.14
No related merge requests found
Pipeline #45067 passed
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment