</strong></p></div> <?php } } else { if (isset($_POST['s4wp_deleteall']) and $_POST['s4wp_deleteall']) { s4wp_delete_all(); ?> <div id="message" class="updated fade"><p><strong><?php _e('All Indexed Pages Deleted!', 'solr4wp'); ?> </strong></p></div> <?php } else { if (isset($_POST['s4wp_repost_schema']) and $_POST['s4wp_repost_schema']) { s4wp_delete_all(); $output = s4wp_submit_schema(); ?> <div id="message" class="updated fade"><p><strong><?php _e('All Indexed Pages Deleted!<br />' . esc_html($output), 'solr4wp'); ?> </strong></p></div> <?php } else { if (isset($_POST['s4wp_optimize']) and $_POST['s4wp_optimize']) { s4wp_optimize(); ?> <div id="message" class="updated fade"><p><strong><?php _e('Index Optimized!', 'solr4wp'); ?> </strong></p></div> <?php
function s4wp_activate() { // Check to see if we have environment variables. If not, bail. If so, create the initial options. if ($errMessage = s4wp_sanity_check()) { wp_die($errMessage); } $schemaSubmit = s4wp_submit_schema(); if (strpos($schemaSubmit, 'Error')) { wp_die('Submitting the schema failed with the message ' . $errorMessage); } $options = s4wp_initalize_options(); s4wp_update_option($options); return; }