diff --git a/index.php b/index.php
index b1c655cd52..50e2a27889 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,19 @@
\ No newline at end of file
diff --git a/wp-app.php b/wp-app.php
index 5ea5f1d888..03f5d6b8c2 100644
--- a/wp-app.php
+++ b/wp-app.php
@@ -1,26 +1,60 @@
+ * @author Modified by Dougal Campbell
+ * @version 1.0.5-dc
*/
+/**
+ * WordPress is handling an Atom Publishing Protocol request.
+ *
+ * @var bool
+ */
define('APP_REQUEST', true);
+/** Set up WordPress environment */
require_once('./wp-load.php');
+
+/** Post Template API */
require_once(ABSPATH . WPINC . '/post-template.php');
+
+/** Atom Publishing Protocol Class */
require_once(ABSPATH . WPINC . '/atomlib.php');
+
+/** Feed Handling API */
require_once(ABSPATH . WPINC . '/feed.php');
$_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] );
+/**
+ * Whether to enable Atom Publishing Protocol Logging.
+ *
+ * @name app_logging
+ * @var int|bool
+ */
$app_logging = 0;
-// TODO: Should be an option somewhere
+/**
+ * Whether to always authenticate user. Permanently set to true.
+ *
+ * @name always_authenticate
+ * @var int|bool
+ * @todo Should be an option somewhere
+ */
$always_authenticate = 1;
+/**
+ * log_app() - Writes logging info to a file.
+ *
+ * @uses $app_logging
+ * @package WordPress
+ * @subpackage Logging
+ *
+ * @param string $label Type of logging
+ * @param string $msg Information describing logging reason.
+ */
function log_app($label,$msg) {
global $app_logging;
if ($app_logging) {
@@ -32,6 +66,18 @@ function log_app($label,$msg) {
}
if ( !function_exists('wp_set_current_user') ) :
+/**
+ * wp_set_current_user() - Sets the current WordPress User
+ *
+ * Pluggable function which is also found in pluggable.php.
+ *
+ * @see wp-includes/pluggable.php Documentation for this function.
+ * @uses $current_user Global of current user to test whether $id is the same.
+ *
+ * @param int $id The user's ID
+ * @param string $name Optional. The username of the user.
+ * @return WP_User Current user's User object
+ */
function wp_set_current_user($id, $name = '') {
global $current_user;
@@ -44,13 +90,26 @@ function wp_set_current_user($id, $name = '') {
}
endif;
+/**
+ * wa_posts_where_include_drafts_filter() - Filter to add more post statuses
+ *
+ * @param string $where SQL statement to filter
+ * @return string Filtered SQL statement with added post_status for where clause
+ */
function wa_posts_where_include_drafts_filter($where) {
- $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where);
- return $where;
+ $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where);
+ return $where;
}
add_filter('posts_where', 'wa_posts_where_include_drafts_filter');
+/**
+ * @internal
+ * Left undocumented to work on later. If you want to finish, then please do so.
+ *
+ * @package WordPress
+ * @subpackage Publishing
+ */
class AtomServer {
var $ATOM_CONTENT_TYPE = 'application/atom+xml';
@@ -170,9 +229,9 @@ class AtomServer {
$entries_url = attribute_escape($this->get_entries_url());
$categories_url = attribute_escape($this->get_categories_url());
$media_url = attribute_escape($this->get_attachments_url());
- foreach ($this->media_content_types as $med) {
- $accepted_media_types = $accepted_media_types . "" . $med . "";
- }
+ foreach ($this->media_content_types as $med) {
+ $accepted_media_types = $accepted_media_types . "" . $med . "";
+ }
$atom_prefix="atom";
$atom_blogname=get_bloginfo('name');
$service_doc = <<handle_request();
-?>
+?>
\ No newline at end of file
diff --git a/wp-atom.php b/wp-atom.php
index 179ffa2707..9e20eb68ee 100644
--- a/wp-atom.php
+++ b/wp-atom.php
@@ -1,4 +1,15 @@
+?>
\ No newline at end of file
diff --git a/wp-comments-post.php b/wp-comments-post.php
index aa6184b66a..e0a06dc755 100644
--- a/wp-comments-post.php
+++ b/wp-comments-post.php
@@ -1,10 +1,18 @@
+?>
\ No newline at end of file
diff --git a/wp-commentsrss2.php b/wp-commentsrss2.php
index 50e241f0da..9c3b230f62 100644
--- a/wp-commentsrss2.php
+++ b/wp-commentsrss2.php
@@ -1,4 +1,17 @@
time())
return;
+
foreach ($crons as $timestamp => $cronhooks) {
if ($timestamp > time()) break;
foreach ($cronhooks as $hook => $keys) {
@@ -32,4 +50,4 @@ foreach ($crons as $timestamp => $cronhooks) {
update_option('doing_cron', 0);
-?>
+?>
\ No newline at end of file
diff --git a/wp-feed.php b/wp-feed.php
index 260ddd4751..d4f1a5bff0 100644
--- a/wp-feed.php
+++ b/wp-feed.php
@@ -1,4 +1,18 @@
+?>
\ No newline at end of file
diff --git a/wp-login.php b/wp-login.php
index 9de2cb8d2f..8910ba6c9b 100644
--- a/wp-login.php
+++ b/wp-login.php
@@ -1,7 +1,29 @@
element.
+ * @param string $message Optional. Message to display in header.
+ * @param WP_Error $wp_error Optional. WordPress Error Object
+ */
function login_header($title = 'Login', $message = '', $wp_error = '') {
global $error;
@@ -56,6 +78,15 @@ function login_header($title = 'Login', $message = '', $wp_error = '') {
}
} // End of login_header()
+/**
+ * retrieve_password() - Handles sending password retrieval email to user
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @uses $wpdb WordPress Database object
+ *
+ * @return bool|WP_Error True: when finish. WP_Error on error
+ */
function retrieve_password() {
global $wpdb;
@@ -110,6 +141,16 @@ function retrieve_password() {
return true;
}
+/**
+ * reset_password() - Handles resetting the user's password
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @uses $wpdb WordPress Database object
+ *
+ * @param string $key Hash to validate sending user's password
+ * @return bool|WP_Error
+ */
function reset_password($key) {
global $wpdb;
@@ -144,6 +185,15 @@ function reset_password($key) {
return true;
}
+/**
+ * register_new_user() - Handles registering a new user
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @param string $user_login User's username for logging in
+ * @param string $user_email User's email address to send password and add
+ * @return int|WP_Error Either user's ID or error on failure.
+ */
function register_new_user($user_login, $user_email) {
$errors = new WP_Error();
diff --git a/wp-mail.php b/wp-mail.php
index 0fe82a5be3..52d05cb8d3 100644
--- a/wp-mail.php
+++ b/wp-mail.php
@@ -1,8 +1,18 @@
quit();
-?>
+?>
\ No newline at end of file
diff --git a/wp-pass.php b/wp-pass.php
index 58647c235d..1be8095cc0 100644
--- a/wp-pass.php
+++ b/wp-pass.php
@@ -1,4 +1,12 @@
insert_id);
trackback_response(0);
}
-?>
+?>
\ No newline at end of file
diff --git a/xmlrpc.php b/xmlrpc.php
index cec79a00e9..179596d1cf 100644
--- a/xmlrpc.php
+++ b/xmlrpc.php
@@ -1,5 +1,16 @@
+ * @package WordPress
+ */
+/**
+ * Whether this is a XMLRPC Request
+ *
+ * @var bool
+ */
define('XMLRPC_REQUEST', true);
// Some browser-embedded clients send cookies. We don't want them.
@@ -11,10 +22,11 @@ if ( !isset( $HTTP_RAW_POST_DATA ) ) {
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
}
-# fix for mozBlog and other cases where '
+?>
\ No newline at end of file