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,32 @@
|
||||
<?php
|
||||
|
||||
class us_migration_2_2 extends US_Migration_Translator {
|
||||
|
||||
// Content
|
||||
public function translate_content( &$content ) {
|
||||
return $this->_translate_content( $content );
|
||||
}
|
||||
|
||||
public function translate_us_gmaps( &$name, &$params, &$content ) {
|
||||
$changed = FALSE;
|
||||
$markers = array();
|
||||
|
||||
for ( $i = 2; $i <= 5; $i ++ ) {
|
||||
if ( ( ! empty( $params['marker' . $i . '_address'] ) ) AND ( ! empty( $params['marker' . $i . '_text'] ) ) ) {
|
||||
$markers[] = array(
|
||||
'marker_address' => $params['marker' . $i . '_address'],
|
||||
'marker_text' => rawurldecode( base64_decode( $params['marker' . $i . '_text'] ) ),
|
||||
);
|
||||
unset( $params['marker' . $i . '_address'] );
|
||||
unset( $params['marker' . $i . '_text'] );
|
||||
$changed = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $changed ) {
|
||||
$params['markers'] = rawurlencode( json_encode( $markers ) );
|
||||
}
|
||||
|
||||
return $changed;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user