Skip to content

Commit 67bbd9f

Browse files
authored
Merge pull request #984 from cloudinary/feature/update-wording
Update wording so it is clear it is a Cloudinary feature
2 parents b3eb4b8 + 83091b5 commit 67bbd9f

4 files changed

Lines changed: 50 additions & 11 deletions

File tree

php/media/class-global-transformations.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public function load_preview( $video = false ) {
319319
*/
320320
public function taxonomy_ordering( $type, $post ) {
321321
if ( $this->has_public_taxonomies( $post ) ) {
322-
add_meta_box( 'cld-taxonomy-order', __( 'Categories/Tags transformations', 'cloudinary' ), array( $this, 'render_ordering_box' ), null, 'side', 'core' );
322+
add_meta_box( 'cld-taxonomy-order', __( 'Cloudinary terms transformations', 'cloudinary' ), array( $this, 'render_ordering_box' ), null, 'side', 'core' );
323323
}
324324
}
325325

@@ -451,7 +451,7 @@ private function init_taxonomy_manager( $post ) {
451451

452452
$out = array();
453453
$out[] = '<div class="cld-tax-order">';
454-
$out[] = '<p style="font-size: 12px; font-style: normal; color: rgb( 117, 117, 117 );">' . esc_html__( 'If you placed custom transformations on categories/tags you may order them below. ', 'cloudinary' ) . '</li>';
454+
$out[] = '<p style="font-size: 12px; font-style: normal; color: rgb( 117, 117, 117 );">' . esc_html__( 'If you placed custom transformations on these terms you may order them below. ', 'cloudinary' ) . '</li>';
455455
$out[] = '<ul class="cld-tax-order-list" id="cld-tax-items">';
456456
$out[] = '<li class="cld-tax-order-list-item no-items">' . esc_html__( 'No terms added', 'cloudinary' ) . '</li>';
457457
if ( ! empty( $terms ) ) {
@@ -464,7 +464,7 @@ private function init_taxonomy_manager( $post ) {
464464
// Get apply Type.
465465
if ( ! empty( $terms ) ) {
466466
$type = get_post_meta( $post->ID, self::META_APPLY_KEY . '_terms', true );
467-
$out[] = '<label class="cld-tax-order-list-type"><input ' . checked( 'overwrite', $type, false ) . ' type="checkbox" value="overwrite" name="cld_apply_type" />' . esc_html__( 'Disable global transformations', 'cloudinary' ) . '</label>';
467+
$out[] = '<label class="cld-tax-order-list-type"><input ' . checked( 'overwrite', $type, false ) . ' type="checkbox" value="overwrite" name="cld_apply_type" />' . esc_html__( 'Disable Cloudinary global transformations', 'cloudinary' ) . '</label>';
468468
}
469469

470470
$out[] = '</div>';

php/templates/taxonomy-term-transformation-fields.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,31 @@
55
* @package Cloudinary
66
*/
77

8+
use Cloudinary\Utils;
9+
10+
$taxonomy_slug = Utils::get_sanitized_text( 'taxonomy' );
11+
$tax_object = get_taxonomy( $taxonomy_slug );
12+
13+
// We should be in the context of a term edit screen.
14+
if ( ! $tax_object instanceof WP_Taxonomy ) {
15+
return;
16+
}
17+
18+
$label = $tax_object->labels->singular_name;
819
?>
920
<?php foreach ( $this->taxonomy_fields as $context => $set ) : ?>
1021
<tr>
1122
<td colspan="2">
1223
<h3>
1324
<?php
14-
// translators: variable is context.
15-
echo esc_html( sprintf( __( 'Global %s Transformations', 'cloudinary' ), ucwords( $context ) ) );
25+
echo esc_html(
26+
sprintf(
27+
// translators: The taxonomy label and the context.
28+
__( 'Cloudinary %1$s %2$s Transformations', 'cloudinary' ),
29+
$label,
30+
ucwords( $context )
31+
)
32+
);
1633
?>
1734
</h3>
1835
</td>

ui-definitions/settings-image.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@
55
* @package Cloudinary
66
*/
77

8+
use Cloudinary\Utils;
89
use function Cloudinary\get_plugin_instance;
910

11+
$transformations_title = __( 'Cloudinary global transformations', 'cloudinary' );
12+
13+
$taxonomy_slug = Utils::get_sanitized_text( 'taxonomy' );
14+
15+
if ( $taxonomy_slug ) {
16+
$transformations_title = __( 'Term transformations', 'cloudinary' );
17+
}
18+
1019
$settings = array(
1120
array(
1221
'type' => 'panel',
@@ -149,16 +158,18 @@
149158
array(
150159
'type' => 'text',
151160
'slug' => 'image_freeform',
152-
'title' => __( 'Additional image transformations', 'cloudinary' ),
161+
'title' => $transformations_title,
153162
'default' => '',
154163
'tooltip_text' => sprintf(
155164
// translators: The link to transformation reference.
156165
__(
157-
'A set of additional transformations to apply to all images. Specify your transformations using Cloudinary URL transformation syntax. See %1$sreference%2$s for all available transformations and syntax.',
166+
'A set of additional transformations to apply to all images. Specify your transformations using Cloudinary URL transformation syntax. See %1$sreference%2$s for all available transformations and syntax.%3$s* The Cloudinary global transformations are only applied to assets managed in the Media Library%4$s.',
158167
'cloudinary'
159168
),
160169
'<a href="https://cloudinary.com/documentation/transformation_reference" target="_blank" rel="noopener noreferrer">',
161-
'</a>'
170+
'</a>',
171+
'<br><br><em>',
172+
'</em>'
162173
),
163174
'link' => array(
164175
'text' => __( 'See examples', 'cloudinary' ),

ui-definitions/settings-video.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@
55
* @package Cloudinary
66
*/
77

8+
use Cloudinary\Utils;
89
use function Cloudinary\get_plugin_instance;
910

11+
$transformations_title = __( 'Cloudinary global transformations', 'cloudinary' );
12+
13+
$taxonomy_slug = Utils::get_sanitized_text( 'taxonomy' );
14+
15+
if ( $taxonomy_slug ) {
16+
$transformations_title = __( 'Term transformations', 'cloudinary' );
17+
}
18+
1019
$settings = array(
1120
array(
1221
'type' => 'panel',
@@ -235,16 +244,18 @@
235244
array(
236245
'type' => 'text',
237246
'slug' => 'video_freeform',
238-
'title' => __( 'Additional video transformations', 'cloudinary' ),
247+
'title' => $transformations_title,
239248
'default' => '',
240249
'tooltip_text' => sprintf(
241250
// translators: The link to transformation reference.
242251
__(
243-
'A set of additional transformations to apply to all videos. Specify your transformations using Cloudinary URL transformation syntax. See %1$sreference%2$s for all available transformations and syntax.',
252+
'A set of additional transformations to apply to all videos. Specify your transformations using Cloudinary URL transformation syntax. See %1$sreference%2$s for all available transformations and syntax.%3$s* The Cloudinary global transformations are only applied to assets managed in the Media Library%4$s.',
244253
'cloudinary'
245254
),
246255
'<a href="https://cloudinary.com/documentation/transformation_reference" target="_blank" rel="noopener noreferrer">',
247-
'</a>'
256+
'</a>',
257+
'<br><br><em>',
258+
'</em>'
248259
),
249260
'link' => array(
250261
'text' => __( 'See examples', 'cloudinary' ),

0 commit comments

Comments
 (0)