diff --git a/includes/functions/_helpers-templates.php b/includes/functions/_helpers-templates.php
index 4c330aef..96e1c0e2 100644
--- a/includes/functions/_helpers-templates.php
+++ b/includes/functions/_helpers-templates.php
@@ -741,12 +741,13 @@ if ( ! function_exists( 'fictioneer_get_placeholder_image' ) ) {
// Fallback
if ( empty( $image_large ) || empty( $image_full ) ) {
- $svg = fictioneer_get_svg_rect( '#111', 400, 600 );
+ $generated = fictioneer_generate_placeholder( $args );
$cache[ $cache_key ] = array(
- 'thumbnail' => '
',
- 'thumbnail_url' => $svg,
- 'thumbnail_full_url' => $svg,
+ 'thumbnail' => $generated ?
+ '
' : '',
+ 'thumbnail_url' => $generated,
+ 'thumbnail_full_url' => $generated,
'generated' => true
);
@@ -814,7 +815,7 @@ if ( ! function_exists( 'fictioneer_output_small_card_thumbnail' ) ) {
// Link (lightbox) with image tag
echo "{$thumbnails['thumbnail']}";
} elseif ( $vertical ) {
- // Placeholder image or generated SVG
+ // Placeholder image
$placeholder = fictioneer_get_placeholder_image();
$url = $placeholder['thumbnail_full_url'];
$classes .= ' _placeholder';
diff --git a/includes/functions/_utility.php b/includes/functions/_utility.php
index d38fca80..322599f2 100644
--- a/includes/functions/_utility.php
+++ b/includes/functions/_utility.php
@@ -2871,29 +2871,21 @@ if ( ! function_exists( 'fictioneer_get_async_css_loading_pattern' ) ) {
}
// =============================================================================
-// CSS SVG RECT
+// GENERATE PLACEHOLDER
// =============================================================================
-if ( ! function_exists( 'fictioneer_get_svg_rect' ) ) {
+if ( ! function_exists( 'fictioneer_generate_placeholder' ) ) {
/**
- * Returns generated SVG rectangle as base64 data URI
+ * Dummy implementation (currently used a CSS background)
*
* @since 5.14.0
*
- * @param string $color Optional. Color code of the rectangle. Default '#111'.
- * @param int $width Optional. Width of the rectangle. Default 200.
- * @param int $height Optional. Height of the rectangle. Default 300.
+ * @param array|null $args Optional arguments to generate a placeholder.
*
- * @return string SVG as data URI.
+ * @return string The placeholder URL or data URI.
*/
- function fictioneer_get_svg_rect( $color = '#111', $width = 200, $height = 300 ) {
- // Build
- $svg = '';
- $svg .= '';
-
- // Return as data URI
- return 'data:image/svg+xml;base64,' . base64_encode( $svg );
+ function fictioneer_generate_placeholder( $args = [] ) {
+ return '';
}
}