Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Updates cforms data to reflect the current host that it is on
*
* @return
*/
function update_cforms_data() {
if($cformsSettings['global']['cforms_root'] != WP_PLUGIN_URL . '/cforms') :
$cformsSettings['global']['cforms_root'] = WP_PLUGIN_URL . '/cforms';
update_option('cforms_settings',$cformsSettings);
endif;
if($cformsSettings['global']['tinyURI'] != get_option('siteurl') . '/wp-includes/js/tinymce') :
$cformsSettings['global']['tinyURI'] = get_option('siteurl') . '/wp-includes/js/tinymce';
update_option('cforms_settings',$cformsSettings);
endif;
if($cformsSettings['global']['cforms_root_dir'] != WP_PLUGIN_DIR . '/cforms') :
$cformsSettings['global']['cforms_root_dir'] = WP_PLUGIN_DIR . '/cforms';
update_option('cforms_settings',$cformsSettings);
endif;
if($cformsSettings['global']['cforms_upload_dir'] != WP_PLUGIN_DIR . '/cforms$#$') :
$cformsSettings['global']['cforms_upload_dir'] = WP_PLUGIN_DIR . '/cforms$#$';
update_option('cforms_settings',$cformsSettings);
endif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment