Skip to content

Commit 032de15

Browse files
author
Ron Rennick
committed
Add mu only (inactive) files
git-svn-id: https://develop.svn.wordpress.org/trunk@12603 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0b87332 commit 032de15

18 files changed

Lines changed: 7128 additions & 0 deletions

wp-activate.php

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?php
2+
define( "WP_INSTALLING", true );
3+
4+
/** Sets up the WordPress Environment. */
5+
require( dirname(__FILE__) . '/wp-load.php' );
6+
7+
require( 'wp-blog-header.php' );
8+
require_once( ABSPATH . WPINC . '/registration.php');
9+
10+
if( is_object( $wp_object_cache ) )
11+
$wp_object_cache->cache_enabled = false;
12+
13+
do_action("activate_header");
14+
15+
function wpmu_activate_stylesheet() {
16+
?>
17+
<style type="text/css">
18+
form { margin-top: 2em; }
19+
#submit, #key { width: 90%; font-size: 24px; }
20+
#language { margin-top: .5em; }
21+
.error { background: #f66; }
22+
span.h3 { padding:0 8px; font-size:1.3em; font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,Sans-Serif; font-weight:700; color:#333333; }
23+
</style>
24+
<?php
25+
}
26+
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
27+
28+
get_header();
29+
?>
30+
31+
<div id="content" class="widecolumn">
32+
<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
33+
34+
<h2><?php _e('Activation Key Required') ?></h2>
35+
<form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php">
36+
<p>
37+
<label for="key"><?php _e('Activation Key:') ?></label>
38+
<br /><input type="text" name="key" id="key" value="" size="50" />
39+
</p>
40+
<p class="submit">
41+
<input id="submit" type="submit" name="Submit" class="submit" value="<?php _e('Activate &raquo;') ?>" />
42+
</p>
43+
</form>
44+
45+
<?php } else {
46+
47+
$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
48+
$result = wpmu_activate_signup($key);
49+
if ( is_wp_error($result) ) {
50+
if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
51+
$signup = $result->get_error_data();
52+
?>
53+
<h2><?php _e('Your account is now active!'); ?></h2>
54+
<?php
55+
if( $signup->domain . $signup->path == '' ) {
56+
printf(__('<p class="lead-in">Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s". 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>.</p>'), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword');
57+
} else {
58+
printf(__('<p class="lead-in">Your blog at <a href="%1$s">%2$s</a> is active. You may now login to your blog using your chosen username of "%3$s". 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>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword');
59+
}
60+
} else {
61+
?>
62+
<h2><?php _e('An error occurred during the activation'); ?></h2>
63+
<?php
64+
echo '<p>'.$result->get_error_message().'</p>';
65+
}
66+
} else {
67+
extract($result);
68+
$url = get_blogaddress_by_id( (int) $blog_id);
69+
$user = new WP_User( (int) $user_id);
70+
?>
71+
<h2><?php _e('Your account is now active!'); ?></h2>
72+
73+
<div id="signup-welcome">
74+
<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
75+
<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
76+
</div>
77+
78+
<?php if( $url != 'http://' . $current_site->domain . $current_site->path ) : ?>
79+
<p class="view"><?php printf(__('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p>
80+
<?php else: ?>
81+
<p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path ); ?></p>
82+
<?php endif;
83+
}
84+
}
85+
?>
86+
</div>
87+
88+
<?php get_footer(); ?>

wp-admin/edit-form.php

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/**
3+
* Edit post form for Write Post and for the Bookmarklet mode.
4+
*
5+
* @package WordPress
6+
* @subpackage Administration
7+
*/
8+
?>
9+
<div class="wrap">
10+
<h2><?php _e('Write Post'); ?></h2>
11+
<form name="post" action="post.php" method="post" id="simple">
12+
13+
<?php if (isset($mode) && 'bookmarklet' == $mode) : ?>
14+
<input type="hidden" name="mode" value="bookmarklet" />
15+
<?php endif; ?>
16+
<input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />
17+
<input type="hidden" name="action" value='post' />
18+
19+
<div id="poststuff">
20+
<fieldset id="titlediv">
21+
<legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
22+
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" /></div>
23+
</fieldset>
24+
25+
<fieldset id="categorydiv">
26+
<legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend>
27+
<div><?php dropdown_categories($post->post_category); ?></div>
28+
</fieldset>
29+
30+
<br />
31+
<fieldset id="postdiv">
32+
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
33+
<?php
34+
$rows = get_option('default_post_edit_rows');
35+
if (($rows < 3) || ($rows > 100)) {
36+
$rows = 10;
37+
}
38+
?>
39+
<div><textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content"><?php echo $post->post_content ?></textarea></div>
40+
<?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?>
41+
</fieldset>
42+
43+
44+
<script type="text/javascript">
45+
<!--
46+
edCanvas = document.getElementById('content');
47+
//-->
48+
</script>
49+
50+
<input type="hidden" name="post_pingback" value="<?php echo (int) get_option('default_pingback_flag') ?>" id="post_pingback" />
51+
52+
<p><label for="trackback"> <?php printf(__('<a href="%s" title="Help on trackbacks"><strong>TrackBack</strong> a <abbr title="Universal Resource Locator">URL</abbr></a>:</label> (Separate multiple <abbr title="Universal Resource Locator">URL</abbr>s with spaces.)'), 'http://wordpress.org/docs/reference/post/#trackback'); echo '<br />'; ?>
53+
<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>
54+
55+
<p class="submit"><input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft') ?>" />
56+
<input name="saveasprivate" type="submit" id="saveasprivate" tabindex="10" value="<?php _e('Save as Private') ?>" />
57+
58+
<?php if ( current_user_can('edit_posts') ) : ?>
59+
<input name="publish" type="submit" id="publish" tabindex="6" value="<?php _e('Publish') ?>" class="button button-highlighted" />
60+
<?php endif; ?>
61+
62+
<?php if ('bookmarklet' != $mode) {
63+
echo '<input name="advanced" type="submit" id="advancededit" tabindex="7" value="' . __('Advanced Editing') . '" />';
64+
} ?>
65+
<input name="referredby" type="hidden" id="referredby" value="<?php if ( $refby = wp_get_referer() ) echo urlencode($refby); ?>" />
66+
</p>
67+
68+
<?php do_action('simple_edit_form', ''); ?>
69+
70+
</div>
71+
</form>
72+
73+
<script type="text/javascript">
74+
try{document.getElementById('title').focus();}catch(e){}
75+
</script>
76+
</div>

wp-admin/edit-page-drafts.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
/**
3+
* Draft Page Administration Panel.
4+
*
5+
* This was created for the administration navigation instead of using a query
6+
* for the drafts.
7+
*
8+
* @package WordPress
9+
* @subpackage Administration
10+
*/
11+
12+
/** Locks the post status to draft to prevent premature posting. */
13+
$locked_post_status = 'draft';
14+
$_GET['post_status'] = 'draft';
15+
require_once('admin.php');
16+
$title = __('View Draft Pages');
17+
require_once('edit-pages.php');
18+
19+
?>

wp-admin/edit-post-drafts.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
/**
3+
* Draft Post Administration Panel.
4+
*
5+
* This was created for the administration navigation instead of using a query
6+
* for the drafts.
7+
*
8+
* @package WordPress
9+
* @subpackage Administration
10+
*/
11+
12+
/** Locks the post status to draft to prevent premature posting. */
13+
$locked_post_status = 'draft';
14+
$_GET['post_status'] = 'draft';
15+
require_once('admin.php');
16+
$title = __('View Drafts');
17+
require_once('edit.php');
18+
19+
?>

0 commit comments

Comments
 (0)