• Resolved alex05

    (@alex05)


    Hello, i’m building a custom script which auto imports demo content (posts, pages etc..) and it also imports demo settings however i’m not at php expert so i would like some suggestion.

    This is an excerpt of the script

    // default options array
    	$optionval = ':16:"ft_contact_email";s:13:"test@test.com";s:19:"ft_contact_show_map";s:1:"1";s:22:"ft_contact_google_icon";s:0:"";s:26:"ft_contact_google_location";s:29:"3 test test, ls23 6dz";s:22:"ft_contact_google_zoom";s:2:"13";}';
    
    	global $wpdb;
    	$wpdb->query("UPDATE $wpdb->options SET option_value='".$optionval."' WHERE option_name = 'something here'");

    Now i would like to know is possible to unserialize the settings data from option tree… and also, when i update the database what should i use as option name ?

    Thank you

    http://wordpress.org/extend/plugins/option-tree/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Option tree auto settings auto import’ is closed to new replies.