get_results("delete from ${table_prefix}options where option_name like 'lp_opt_%'");
$cache_settings = get_alloptions();
}
?>
%s';
require_once 'LightPressOptions.php';
$lp_opts = new LightPressOptions();
if ($lp_opts->htaccess_changed)
echo '
mod_rewrite rules saved
';
?>
LightPress Console
critical === null) {
?>
You have not configured LightPress yet
Please check the folder where you have unpacked LightPress and set your installation type.
';
echo '';
echo '';
echo "\n";
if (get_option('lp_opt_install_type') == 'testing') {
// output rewrite rules if we are in 'testing' mode
echo '\n";
} else {
// output rewrite rules if .htaccess is not writable
echo '\n";
}
echo '\n";
echo '
this screen is a placeholder and will change in the final release
';
?>
Checking Required Options
critical as $opt) {
$value = get_option("lp_opt_$opt");
if (!$value) {
echo '
' . "$opt option not set
";
continue;
}
switch ($opt) {
case 'basedir':
if (!is_readable($value))
echo '
basedir option set to non-readable folder ' . $value . ', ' . sprintf($lp_opts_href, $opt, 'please correct it') . '
';
else if (!is_readable("$value/classes/Frontend.php"))
echo '
classes/Frontend.php not found in basedir' . $value . ', ' . sprintf($lp_opts_href, $opt, 'please correct it') . '
';
else
echo '
' . $opt . ' option set to ' . $value . ', ok
';
break;
case 'url':
if (substr($value, 0, 7) != 'http://' && substr($value, 0, 8) != 'https://')
echo '
' . $opt . ' does not start with http:// or https://, ' . sprintf($lp_opts_href, $opt, 'please check it') . "
";
else
echo '
' . $opt . ' option set to ' . $value . ', ok
';
break;
default:
echo '
' . $opt . ' option set to ' . $value . ', ok
';
break;
}
}
?>
Checking Secondary Options
We only check a few of them here
base as $opt=>$description) {
$value = get_option("lp_opt_$opt");
switch ($opt) {
case 'charset':
if ($value != ($wp_value = get_option('blog_charset')))
echo '
charset is ' . sprintf($lp_opts_href, 'charset', 'set to a different value') . ' (' . $value . ') than WP blog_charset (' . $wp_value . ')
';
else
echo '
' . $opt . ' option set to ' . $value . ', ok
';
break;
case 'template':
$tpldir = get_option('lp_opt_basedir') . "/templates/${value}/" . get_option('lp_opt_lang') . '.' . get_option('lp_opt_charset');
if (!is_readable($tpldir))
echo '
template ' . sprintf($lp_opts_href, 'template', 'folder') . "$tpldir not found or not readable
";
else if (!is_readable("$tpldir/index.xml"))
echo '
template ' . sprintf($lp_opts_href, 'template', 'folder') . "$tpldir does not contain valid/readable templates
";
else
echo '
template option set to ' . $value . ', template folder ' . $tpldir . '/ ok