File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,18 @@ public function migrate_conditions( $conditions ): string {
116
116
return '' ;
117
117
}
118
118
119
+ // In shortcodes and blocks, sometimes only the keywords are set, and the fields are not set.
120
+ $ default_field_mappings = array (
121
+ 'keywords_title ' => 'keywords_inc_on ' ,
122
+ 'keywords_ban ' => 'keywords_exc_on ' ,
123
+ );
124
+
125
+ foreach ( $ default_field_mappings as $ old_key => $ new_key ) {
126
+ if ( isset ( $ conditions [ $ old_key ] ) && ( ! isset ( $ conditions [ $ new_key ] ) || empty ( $ conditions [ $ new_key ] ) ) ) {
127
+ $ conditions [ $ new_key ] = 'title ' ;
128
+ }
129
+ }
130
+
119
131
foreach ( array ( 'keywords_title ' => 'keywords_inc ' , 'keywords_ban ' => 'keywords_exc ' ) as $ old_key => $ new_key ) {
120
132
if ( isset ( $ conditions [ $ old_key ] ) ) {
121
133
$ conditions [ $ new_key ] = $ conditions [ $ old_key ];
You can’t perform that action at this time.
0 commit comments