public function column_headline_image($alt) { $src = ''; $size = array(48, 48); $post_id = 0; if (is_object($alt)) { $post_id = $alt->get_value(); } if (function_exists('uses_nelioefi') && uses_nelioefi($post_id)) { $src = nelioab_admin_asset_link('/images/feat-image-placeholder.png'); } elseif (has_post_thumbnail($post_id)) { $src = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), $size); } else { $src = nelioab_admin_asset_link('/images/feat-image-placeholder.png'); } $html = sprintf('<img class="feat-image" ' . 'src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" ' . 'style="background:url(\'%s\') no-repeat center center;' . '-webkit-background-size:cover;' . '-moz-background-size:cover;' . '-o-background-size:cover;' . 'background-size:cover;' . 'width:%dpx;height:%dpx;" />', $src, $size[0], $size[1]); return $html; }
function nelioefi_replace_thumbnail($html, $post_id, $post_image_id, $size, $attr) { if (uses_nelioefi($post_id)) { $html = nelioefi_get_html_thumbnail($post_id, $size, $attr); } return $html; }