From 4c13f19af691f6c10cef4fe6a9b7b88a6a85e6f1 Mon Sep 17 00:00:00 2001 From: Fabiano Alencar Date: Tue, 8 Jan 2019 15:02:05 -0200 Subject: [PATCH] added needed esc (attr and html); fix the image thumbnail url --- src/header.php | 2 +- src/template-parts/headercollection.php | 14 ++++++++------ src/template-parts/list-post.php | 6 ++++-- .../loop-tainacan-collection-grid.php | 8 +++++--- .../loop-tainacan-collection-table.php | 8 +++++--- src/template-parts/loop-tainacan-collection.php | 6 ++++-- 6 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/header.php b/src/header.php index d93c727..0e2d66a 100644 --- a/src/header.php +++ b/src/header.php @@ -17,7 +17,7 @@
- +
diff --git a/src/template-parts/headercollection.php b/src/template-parts/headercollection.php index c8595e2..975ea39 100644 --- a/src/template-parts/headercollection.php +++ b/src/template-parts/headercollection.php @@ -8,14 +8,14 @@ $background_color = get_post_meta( tainacan_get_collection_id(), 'tainacan_theme $text_color = get_post_meta( tainacan_get_collection_id(), 'tainacan_theme_collection_color', true ); if ( $background_color ) { echo ".t-bg-collection { - background-color: $background_color !important; + background-color: " . esc_attr($background_color) . " !important; }"; echo ".t-bg-collection h2, .t-bg-collection .t-collection--info-description-text { - color: $text_color !important; + color: " . esc_attr($text_color) . " !important; }"; echo ".t-bg-collection a { - color: $text_color !important; + color: " . esc_attr($text_color) . " !important; opacity: 0.6; }"; } @@ -27,13 +27,15 @@ echo '';
- - + ID ); + $alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?> + <?php echo esc_attr($alt); ?>

diff --git a/src/template-parts/list-post.php b/src/template-parts/list-post.php index e77229c..b623ea4 100644 --- a/src/template-parts/list-post.php +++ b/src/template-parts/list-post.php @@ -1,7 +1,9 @@
- + ID ); + $alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?>
- + <?php echo esc_attr($alt); ?>
diff --git a/src/template-parts/loop-tainacan-collection-grid.php b/src/template-parts/loop-tainacan-collection-grid.php index cf18c46..1c4b81f 100644 --- a/src/template-parts/loop-tainacan-collection-grid.php +++ b/src/template-parts/loop-tainacan-collection-grid.php @@ -7,12 +7,14 @@

- - + ID ); + $alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?> + <?php echo esc_attr($alt); ?>

- +

diff --git a/src/template-parts/loop-tainacan-collection-table.php b/src/template-parts/loop-tainacan-collection-table.php index 3918f64..9b86872 100644 --- a/src/template-parts/loop-tainacan-collection-table.php +++ b/src/template-parts/loop-tainacan-collection-table.php @@ -14,12 +14,14 @@ - - + ID ); + $alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?> + <?php echo esc_attr($alt); ?>

- +

diff --git a/src/template-parts/loop-tainacan-collection.php b/src/template-parts/loop-tainacan-collection.php index cc5bcc5..2ea96d1 100644 --- a/src/template-parts/loop-tainacan-collection.php +++ b/src/template-parts/loop-tainacan-collection.php @@ -6,8 +6,10 @@
- - + ID ); + $alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?> + <?php echo esc_attr($alt); ?>