Diff: STRATO-apps/wordpress_03/app/wp-content/themes/blocksy/inc/classes/db-versioning/v2-0-53.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
namespace Blocksy\DbVersioning;
4
+
5
+
class V2053 {
6
+
public function migrate() {
7
+
$maybe_taxonomy = get_taxonomy('product_brands');
8
+
9
+
if (! $maybe_taxonomy) {
10
+
return;
11
+
}
12
+
13
+
$terms = get_terms([
14
+
'taxonomy' => 'product_brands'
15
+
]);
16
+
17
+
foreach ($terms as $term) {
18
+
$options = blocksy_get_taxonomy_options(
19
+
$term->term_id,
20
+
'product_brands'
21
+
);
22
+
23
+
if (! isset($options['image']) || empty($options['image'])) {
24
+
continue;
25
+
}
26
+
27
+
$options['icon_image'] = $options['image'];
28
+
$options['image'] = '';
29
+
30
+
update_term_meta(
31
+
$term->term_id,
32
+
'blocksy_taxonomy_meta_options',
33
+
$options
34
+
);
35
+
}
36
+
}
37
+
}
38
+
39
+