$description_backup = 'You can save or restore a backup of your widgets. ("' . $button_text_get_backup . '" will overwrite current Widgets.)'; $description_debug = 'Beta-Feature:<br> After activating the Debug-checkbox you will be able to see your widget splitted into code pieces, when using the preview functionality (<img src="' . MCW_get_url('preview') . '">).<br>' . 'This can help to find mistakes inside of your code. A split will be done whenever html-code changes to php-code and vice versa.<br><br>' . 'Known issues: <ul>' . '<li>The debugger is not able to handle "if" statements in combination with HTML-code.</li>' . '<li>Debugger will interpret each "<?php" and "?>" as a php-tag.</li>' . '</ul>'; // initialize technical variables unset($cache_widget); $meta = MCW_get_meta(); if ($meta['initial']) { $meta['initial'] = false; MCW_set_meta($meta); } if ($_POST[$hidden_field_submit] != 'Y') { $cache_all_widgets = MCW_get_all_widgets(); $my_options = MCW_get_option(); $options_are_empty = empty($my_options); if ($options_are_empty) { $my_options = MCW_get_default_options(); MCW_set_options($my_options); echo '<div id="message" class="updated fade"><p>Options have not been configured, yet. <br>Default values have been loaded. Click <a href="' . get_option('siteurl') . '/wp-admin/options-general.php?page=' . MCW_get_mainfile_name() . '">here »</a> to configure plugin.</p></div>'; } } else { /******************/ /*** set backup ***/ /******************/ if ($_POST[$element_widget_backup] == $button_text_set_backup) { if ($_POST[$data_widget_backup] != $data_widget_backup) { echo '<div id="message" class="updated fade"><p>To save backup you have to check the Backup-Checkbox as well.</p></div>'; } else { $cache_all_widgets = MCW_get_all_widgets(); MCW_set_widget_backup($cache_all_widgets); $max = count($cache_all_widgets); echo '<div id="message" class="updated fade"><p>Backup stored successfully.</p></div>'; }
//load Backup Settings $cache_options = MCW_get_option_backup(); if (empty($cache_options)) { ?> <div id="message" class="error fade"> <p> <strong> <?php echo 'Settings have NOT been loaded.'; ?> </strong> </p> </div> <?php } else { MCW_set_options($cache_options); $javascript_is_allowed = $cache_options['allow_js'] == 'yes'; ?> <div id="message" class="updated fade"> <p> <strong> <?php echo 'Settings have been loaded.'; ?> </strong> </p> </div> <?php } } } else {