'.__('These details will be used to pre fill the information for your website.
All fields are OPTIONAL and can be edited later.').'
';
}
function setup_complete(){
global $sitepad;
// Reset the setup
if(isset($_POST['reset_setup'])){
update_option('sp_setup_current_status', 0);
delete_option('sp_setup_done');
sm_redirect('spurl=/site-admin/setup.php', 0);
return true;
}
echo '
'.__('Setup Completed Successfully !').'
'.__('You will now be redirected to the editor').'
';
}
// If the site was reset we need to delete all the setup data
function setup_clear_data(){
global $setup_fields;
foreach($setup_fields as $sk => $sv){
if(preg_match('/^sp_/is', $sk)){
delete_option($sk);
}
}
delete_option('sp_setup_selected_theme');
delete_option('sp_setup_current_status');
delete_option('sp_setup_clear_data');
return true;
}
$setup_fields = array('blogname' => array('heading' => __('Title'),
'exp' => __('Short Title or your company name'),
'default' => get_option('blogname') ? get_option('blogname') : 'My Website'),
'blogdescription' => array('heading' => __('Description'),
'exp' => __('Short description of your site / company'),
'default' => get_option('blogdescription') ? get_option('blogdescription') : 'Built with SitePad'),
'pagelayer_cf_to_email' => array('heading' => __('Email'),
'exp' => __('Used on the Contact page'),
'default' => get_option('pagelayer_cf_to_email') ? get_option('pagelayer_cf_to_email') : 'mail@example.com'),
'pagelayer-phone' => array('heading' => __('Phone'),
'exp' => __('Used on the Contact page'),
'default' => '+1(123)456-7890'),
'pagelayer-address' => array('heading' => __('Address'),
'exp' => __('Used on the Contact page'),
'default' => __('123, Street name, City, State, Pin, Country')),
'pagelayer-facebook-url' => array('heading' => __('Facebook'),
'exp' => __('Link to your Facebook page'),
'default' => 'https://facebook.com/yourhandle'),
'pagelayer-twitter-url' => array('heading' => __('Twitter'),
'exp' => __('Link to your Twitter profile'),
'default' => 'https://twitter.com/yourhandle'),
'pagelayer-instagram-url' => array('heading' => __('Instagram'),
'exp' => __('Link to your Instagram page'),
'default' => 'https://instagram.com/yourhandle'),
'pagelayer-linkedin-url' => array('heading' => __('LinkedIn'),
'exp' => __('Link to your LinkedIn page'),
'default' => 'https://linkedin.com/yourhandle'),
'pagelayer-youtube-url' => array('heading' => __('YouTube'),
'exp' => __('Link to your YouTube channel'),
'default' => 'https://youtube.com/yourchannel'),
'pagelayer-gplus-url' => array('heading' => __('Google+'),
'exp' => __('Link to your Google+ page'),
'default' => 'https://plus.google.com/yourhandle'),
'sitepad_dev_mode' => array('heading' => __('Enable Dev Mode'),
'exp' => __('(If checked, your site will be visible only if you are logged in !)'),
),
);
//r_print($setup_fields);
/*function died(){
print_r(error_get_last());
}
register_shutdown_function('died');*/
set_time_limit(500);
$sp_setup_clear_data = get_option('sp_setup_clear_data');
// If the site was reset we need to delete all the setup data
if(!empty($sp_setup_clear_data)){
setup_clear_data();
}
$current_status = (int) get_option('sp_setup_current_status');
$setup_done = (int) get_option('sp_setup_done');
if(!empty($setup_done)){
wp_redirect(admin_url());
}
//echo $current_status;
$title = __('Setup Site');
wp_register_style('setup-wizard', sitepad_assets_url().'/css/setup.css');
wp_enqueue_style('setup-wizard');
require_once( ABSPATH . 'site-admin/admin-header.php' );
?>
Overview
Theme
Details
Complete