Created
December 12, 2014 21:11
-
-
Save simplethemes/7329f5d5750e7258ee39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function element_transport_theme_mods() { | |
global $wpdb; | |
$themedata = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", 'element')); | |
if ($themedata) { | |
$wpdb->update( | |
$wpdb->options, // table | |
array( 'option_value' => $themedata ), // column => data | |
array( 'option_name' => 'elementchild' ) // where column | |
); | |
} | |
$thememods = $wpdb->get_var($wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", 'theme_mods_element')); | |
if ($thememods) { | |
$wpdb->update( | |
$wpdb->options, // table | |
array( 'option_value' => $thememods ), // column => data | |
array( 'option_name' => 'theme_mods_element-child' ) // where column | |
); | |
} | |
} | |
add_action ('after_setup_theme', 'element_transport_theme_mods'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment