Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
radision committed Oct 27, 2015
1 parent 5427002 commit 7241838
Show file tree
Hide file tree
Showing 1,839 changed files with 544,650 additions and 0 deletions.
17 changes: 17 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/

/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
385 changes: 385 additions & 0 deletions license.txt

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions readme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WordPress &#8250; 说明</title>
<link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" type="text/css" />
</head>
<body>
<h1 id="logo">
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
<br /> 版本4.3
</h1>
<p style="text-align: center">优美的个人信息发布平台</p>

<h1>写在最前</h1>
<p>欢迎。WordPress对我来说是一个具有特殊意义的项目。大家都能为WordPress添砖加瓦,因此作为其中一员我十分自豪。开发者和贡献者为WordPress奉献了难以估量的时间,我们都在致力于让WordPress更加优秀。现在,感谢您也参与其中。</p>
<p style="text-align: right">&#8212; Matt Mullenweg</p>

<h1>安装:著名的五分钟安装</h1>
<ol>
<li>将WordPress压缩包解压至一个空文件夹,并上传它。</li>
<li>在浏览器中访问<span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span>。它将帮助您把数据库连接信息写入到<code>wp-config.php</code>文件中。
<ol>
<li>如果上述方法无效,也没关系,这很正常。请用文本编辑器(如写字板)手动打开<code>wp-config-sample.php</code>文件,填入数据库信息。</li>
<li>将文件另存为<code>wp-config.php</code>并上传。</li>
<li>在浏览器中访问<span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span></li>
</ol>
</li>
<li>在配置文件就绪之后,WordPress会自动尝试建立数据库表。若发生错误,请检查<code>wp-config.php</code>文件中填写的信息是否准确,然后再试。若问题依然存在,请访问<a href="http://zh-cn.forums.wordpress.org/" title="WordPress支持论坛">中文支持论坛</a>寻求帮助。</li>
<li><strong>若您不设置密码,请牢记生成的随机密码。</strong>若您不输入用户名,用户名将是<code>admin</code></li>
<li>完成后,安装向导会带您到<a href="wp-login.php">登录页面</a>。用刚刚设置的用户名和密码登录。若您使用随机密码,在登录后可以按照页面提示修改密码。</li>
</ol>

<h1>升级</h1>
<h2>自动升级</h2>
<p>若您正在使用WordPress 2.7或以上版本,您可使用内置的自动升级工具进行升级:</p>
<ol>
<li>在浏览器中打开<span class="file"><a href="wp-admin/update-core.php">wp-admin/update-core.php</a></span>,按照提示操作。</li>
<li>还有别的步骤么?——没了!</li>
</ol>

<h2>手动升级</h2>
<ol>
<li>在升级之前,请确保备份旧有数据以及被您修改过的文件,例如<code>index.php</code></li>
<li>删除旧版程序文件,记得备份修改过的内容。</li>
<li>上传新版程序文件。</li>
<li>在浏览器中访问<span class="file"><a href="wp-admin/upgrade.php">/wp-admin/upgrade.php</a></span></li>
</ol>

<h1>从其他内容管理系统“搬家”</h1>
<p>WordPress支持<a href="http://codex.wordpress.org/Importing_Content">导入多种系统的数据</a>。请先按照上述步骤安装WordPress,然后您可在后台使用<a href="wp-admin/import.php" title="导入WordPress">我们提供的导入工具</a></p>

<h1>最低系统需求</h1>
<ul>
<li><a href="http://php.net/">PHP</a> <strong>5.2.4</strong>或更高版本。</li>
<li><a href="http://www.mysql.com/">MySQL</a> <strong>5.0</strong>或更高版本。</li>
</ul>

<h2>系统推荐</h2>
<ul>
<li>启用<a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a>这一Apache模块。</li>
<li>在您的站点设置至<a href="http://cn.wordpress.org/">http://cn.wordpress.org</a>的链接。</li>
<li>Apache模块<a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a></li>
<li>在您的站点上放置一个到<a href="https://cn.wordpress.org/">wordpress.org</a>的链接。</li>
</ul>

<h1>在线资源</h1>
<p>若您遇上文档中未有提及的情况,请首先参考我们为您准备的丰富的WordPress在线资源:</p>
<dl>
<dt><a href="http://codex.wordpress.org/">WordPress Codex文档</a></dt>
<dd>Codex是WordPress的百科全书,它包含现有版本WordPress的海量信息资源,主要文章均有中文译文。</dd>
<dt><a href="https://wordpress.org/news/">WordPress官方博客</a></dt>
<dd>在这里,您将接触到WordPress的最新升级信息和相关新闻,建议加入收藏夹。</dd>
<dt><a href="https://planet.wordpress.org/">WordPress Planet</a></dt>
<dd>WordPress Planet汇集了全球所有WordPress相关的内容。</dd>
<dt><a href="https://zh-cn.forums.wordpress.org/forum/issues">WordPress中文支持论坛</a></dt>
<dd>如果感到束手无策,请将问题提交至中文支持论坛,它有大量的热心的用户和良好的社区氛围。无论求助还是助人,在这里您应该确保自己的问题和答案均准确细致。</dd>
<dt><a href="http://codex.wordpress.org/IRC">WordPress IRC频道</a></dt>
<dd>同样,WordPress也有即时的聊天室用于WordPress用户交流以及部分技术支持。IRC的详细使用方法可以访问前面几个关于技术支持的站点。(<a href="irc://irc.freenode.net/wordpress">irc.freenode.net #wordpress</a></dd>
</dl>

<h1>最后</h1>
<ul>
<li>对WordPress有任何建议、想法、评论或发现了bug,请加入<a href="http://zh-cn.forums.wordpress.org/">中文支持论坛</a></li>
<li>WordPress准备了完善的插件<abbr title="应用编程接口">API</abbr>接口方便您进行扩展开发。作为开发人员,如果你有兴趣了解并加以利用,请参阅<a href="http://codex.wordpress.org/Plugin_API">Codex上的插件文档</a>。请尽量不要更改核心代码。</li>
</ul>

<h1>分享精神</h1>
<p>WordPress没有数百万的市场运作资金,也没有名人赞助。不过我们有更棒的支持,那就是您!如果您喜欢WordPress,请将它介绍给自己的朋友,或者帮助他人安装一个WordPress,又或者写一篇赞扬我们的文章。</p>

<p>WordPress是对Michel V.创建的<a href="http://cafelog.com/">b2/caf&#233;log</a>的官方后续版本。<a href="http://wordpress.org/about/">WordPress开发团队</a>将b2/caf&#233;log发展成如今的WordPress。如果您愿意支持我们的工作,欢迎您对WordPress进行<a href="http://wordpress.org/donate/">捐赠</a></p>

<h1>许可证</h1>
<p>WordPress基于<abbr title="GNU通用公共许可证">GPL</abbr>第二版或(根据您选择的)以后版本发布。详见<a href="license.txt">license.txt</a>(英文)。</p>

</body>
</html>
131 changes: 131 additions & 0 deletions wp-activate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<?php
/**
* Confirms that the activation key that is sent in an email after a user signs
* up for a new blog matches the key for that user and then displays confirmation.
*
* @package WordPress
*/

define( 'WP_INSTALLING', true );

/** Sets up the WordPress Environment. */
require( dirname(__FILE__) . '/wp-load.php' );

require( dirname( __FILE__ ) . '/wp-blog-header.php' );

if ( !is_multisite() ) {
wp_redirect( site_url( '/wp-login.php?action=register' ) );
die();
}

if ( is_object( $wp_object_cache ) )
$wp_object_cache->cache_enabled = false;

// Fix for page title
$wp_query->is_404 = false;

/**
* Fires before the Site Activation page is loaded.
*
* @since 3.0.0
*/
do_action( 'activate_header' );

/**
* Adds an action hook specific to this page that fires on wp_head
*
* @since MU
*/
function do_activate_header() {
/**
* Fires before the Site Activation page is loaded, but on the wp_head action.
*
* @since 3.0.0
*/
do_action( 'activate_wp_head' );
}
add_action( 'wp_head', 'do_activate_header' );

/**
* Loads styles specific to this page.
*
* @since MU
*/
function wpmu_activate_stylesheet() {
?>
<style type="text/css">
form { margin-top: 2em; }
#submit, #key { width: 90%; font-size: 24px; }
#language { margin-top: .5em; }
.error { background: #f66; }
span.h3 { padding: 0 8px; font-size: 1.3em; font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; font-weight: bold; color: #333; }
</style>
<?php
}
add_action( 'wp_head', 'wpmu_activate_stylesheet' );

get_header();
?>

<div id="content" class="widecolumn">
<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>

<h2><?php _e('Activation Key Required') ?></h2>
<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
<p>
<label for="key"><?php _e('Activation Key:') ?></label>
<br /><input type="text" name="key" id="key" value="" size="50" />
</p>
<p class="submit">
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
</p>
</form>

<?php } else {

$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
$result = wpmu_activate_signup( $key );
if ( is_wp_error($result) ) {
if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
$signup = $result->get_error_data();
?>
<h2><?php _e('Your account is now active!'); ?></h2>
<?php
echo '<p class="lead-in">';
if ( $signup->domain . $signup->path == '' ) {
printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() );
} else {
printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() );
}
echo '</p>';
} else {
?>
<h2><?php _e('An error occurred during the activation'); ?></h2>
<?php
echo '<p>'.$result->get_error_message().'</p>';
}
} else {
$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
$user = get_userdata( (int) $result['user_id'] );
?>
<h2><?php _e('Your account is now active!'); ?></h2>

<div id="signup-welcome">
<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $result['password']; ?></p>
</div>

<?php if ( $url && $url != network_home_url( '', 'http' ) ) : ?>
<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>'), $url, $url . 'wp-login.php' ); ?></p>
<?php else: ?>
<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p>
<?php endif;
}
}
?>
</div>
<script type="text/javascript">
var key_input = document.getElementById('key');
key_input && key_input.focus();
</script>
<?php get_footer();
Loading

0 comments on commit 7241838

Please sign in to comment.