Skip to content

Commit 864a4f0

Browse files
author
dugajean
authored
Only show transformations warning once in taxonomy page
2 parents 735c00c + 2470e08 commit 864a4f0

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/css/cloudinary.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/css/src/components/_settings.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@
212212
.settings-warning {
213213
display: inline-block;
214214
padding: 5px 7px;
215-
background-color: #ffea98;
216-
border-left: 4px solid #ffcc00;
217-
box-shadow: 0px 0px 5px 0px rgba(112,112,112,0.4);
215+
background-color: #e9faff;
216+
border: 1px solid #ccd0d4;
217+
border-left: 4px solid #00a0d2;
218+
box-shadow: 0 1px 1px rgba(0,0,0,.04);
218219
}

cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/class-settings-page.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private function register_section( $tab_slug ) {
175175
*
176176
* @since 0.1
177177
*
178-
* @param string $tab The tab to register the section fields for.
178+
* @param array $tab The tab to register the section fields for.
179179
* @param string $setting_slug The slug of the setting to register section for.
180180
*/
181181
private function register_section_fields( $tab, $setting_slug ) {
@@ -226,8 +226,9 @@ public function render() {
226226
*
227227
* @param array $field The field to render.
228228
* @param string|null $value The value to render.
229+
* @param bool $show_description Whether to render the description.
229230
*/
230-
public function render_field( $field, $value = null ) {
231+
public function render_field( $field, $value = null, $show_description = true ) {
231232

232233
if ( null === $value ) {
233234
$value = $this->get_value( $field['slug'] );
@@ -308,7 +309,7 @@ public function render_field( $field, $value = null ) {
308309
<p class="description error-notice" id="<?php echo esc_attr( $setting_slug ); ?>-error"><?php echo wp_kses_post( $field['error_notice'] ); ?></p>
309310
<?php
310311
}
311-
if ( ! empty( $field['description'] ) ) {
312+
if ( ! empty( $field['description'] ) && $show_description ) {
312313
?>
313314
<p class="description" id="<?php echo esc_attr( $setting_slug ); ?>-description"><?php echo wp_kses_post( $field['description'] ); ?></p>
314315
<?php

0 commit comments

Comments
 (0)