Hacks file option and include.
git-svn-id: http://svn.automattic.com/wordpress/trunk@614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
39e68a7a6f
commit
eb2969916c
|
@ -4,7 +4,6 @@ require('install-helper.php');
|
||||||
|
|
||||||
$step = $HTTP_GET_VARS['step'];
|
$step = $HTTP_GET_VARS['step'];
|
||||||
if (!$step) $step = 0;
|
if (!$step) $step = 0;
|
||||||
//update_option('blogdescription', 'hahahah');
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
@ -140,6 +139,17 @@ $wpdb->hide_errors(); // Turn this off for dev and we should probably just fix t
|
||||||
$wpdb->query("UPDATE $tableoptions SET option_description = 'see <a href=\"http://php.net/date\">help</a> for format characters' WHERE option_id = 53");
|
$wpdb->query("UPDATE $tableoptions SET option_description = 'see <a href=\"http://php.net/date\">help</a> for format characters' WHERE option_id = 53");
|
||||||
echo ' .';
|
echo ' .';
|
||||||
flush();
|
flush();
|
||||||
|
if (!$wpdb->get_var("SELECT option_id FROM $tableoptinos WHERE option_name = 'hack_file'")) {
|
||||||
|
$wpdb->query("INSERT INTO `$tableoptions`
|
||||||
|
( `option_id` , `blog_id` , `option_name` , `option_can_override` , `option_type` , `option_value` , `option_width` , `option_height` , `option_description` , `option_admin_level` )
|
||||||
|
VALUES
|
||||||
|
('', '0', 'hack_file', 'Y', '2', '0', '20', '8', 'Set this to true if you plan to use a hacks file. This is a place for you to store code hacks that won’t be overwritten when you upgrade. The file must be in your wordpress root and called <code>my-hacks.php</code>', '8')");
|
||||||
|
$optionid = $wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'hack_file'");
|
||||||
|
$wpdb->query("INSERT INTO $tableoptiongroup_options
|
||||||
|
(group_id, option_id, seq)
|
||||||
|
VALUES
|
||||||
|
(2, $optionid, 5)");
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<strong>Done with the options updates. Now for a bit of comment action</strong></p>
|
<strong>Done with the options updates. Now for a bit of comment action</strong></p>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -1660,4 +1660,9 @@ function add_filter($tag, $function_to_add) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for hacks file if the option is enabled
|
||||||
|
if (get_settings('hack_file')) {
|
||||||
|
if (file_exists($abspath . '/my-hacks.php'))
|
||||||
|
require($abspath . '/my-hacks.php');
|
||||||
|
}
|
||||||
?>
|
?>
|
|
@ -1,15 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
// This is the name of the include directory. No "/" allowed.
|
|
||||||
$b2inc = 'wp-includes';
|
|
||||||
|
|
||||||
require ($abspath . 'wp-config-extra.php');
|
|
||||||
require ($abspath . $b2inc . '/wp-db.php');
|
|
||||||
require ($abspath . $b2inc . '/functions.php');
|
|
||||||
require ($abspath . $b2inc . '/template-functions.php');
|
|
||||||
require ($abspath . $b2inc . '/class-xmlrpc.php');
|
|
||||||
require ($abspath . $b2inc . '/class-xmlrpcs.php');
|
|
||||||
require ($abspath . '/wp-links/links.php');
|
|
||||||
|
|
||||||
$HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
|
$HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
|
||||||
$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
|
$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
|
||||||
$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
|
$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
|
||||||
|
@ -29,6 +18,16 @@ $tableoptionvalues = $table_prefix . 'optionvalues';
|
||||||
$tableoptiongroups = $table_prefix . 'optiongroups';
|
$tableoptiongroups = $table_prefix . 'optiongroups';
|
||||||
$tableoptiongroup_options = $table_prefix . 'optiongroup_options';
|
$tableoptiongroup_options = $table_prefix . 'optiongroup_options';
|
||||||
|
|
||||||
|
// This is the name of the include directory. No "/" allowed.
|
||||||
|
$b2inc = 'wp-includes';
|
||||||
|
|
||||||
|
require ($abspath . 'wp-config-extra.php');
|
||||||
|
require ($abspath . $b2inc . '/wp-db.php');
|
||||||
|
require ($abspath . $b2inc . '/functions.php');
|
||||||
|
require ($abspath . $b2inc . '/template-functions.php');
|
||||||
|
require ($abspath . $b2inc . '/class-xmlrpc.php');
|
||||||
|
require ($abspath . $b2inc . '/class-xmlrpcs.php');
|
||||||
|
require ($abspath . '/wp-links/links.php');
|
||||||
|
|
||||||
//setup the old globals from b2config.php
|
//setup the old globals from b2config.php
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue