Import legacy nurinda.co.id website
This commit is contained in:
1 parent
3f59bb9038
commit
6e21646ac4
13389 files changed
+3246690
No files matched your search
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
class us_migration_4_5 extends US_Migration_Translator {
|
||||
|
||||
// Options
|
||||
public function translate_theme_options( &$options ) {
|
||||
$changed = FALSE;
|
||||
|
||||
if ( isset( $options['preloader'] ) AND $options['preloader'] == 2 ) {
|
||||
$options['preloader'] = 1;
|
||||
$changed = TRUE;
|
||||
}
|
||||
|
||||
if ( ! empty( $options['heading_font_family'] ) ) {
|
||||
$result_variant = 0;
|
||||
$font = explode( '|', $options['heading_font_family'], 2 );
|
||||
if ( ! empty( $font[1] ) ) {
|
||||
$selected_font_variants = explode( ',', $font[1] );
|
||||
if ( is_array( $selected_font_variants ) ) {
|
||||
foreach ( $selected_font_variants as $variant ) {
|
||||
if ( strpos( $variant, 'italic' ) === FALSE AND ( $result_variant == 0 OR $result_variant > $variant ) ) {
|
||||
$result_variant = $variant;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $result_variant != 0 ) {
|
||||
$options['h1_fontweight'] = $result_variant;
|
||||
$options['h2_fontweight'] = $result_variant;
|
||||
$options['h3_fontweight'] = $result_variant;
|
||||
$options['h4_fontweight'] = $result_variant;
|
||||
$options['h5_fontweight'] = $result_variant;
|
||||
$options['h6_fontweight'] = $result_variant;
|
||||
$changed = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return $changed;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user