Changeset 7991
- Timestamp:
- 05/25/2008 03:50:15 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r4495 r7991 1 1 <?php 2 /* Short and sweet */ 2 /** 3 * Front to the WordPress application. Most of WordPress is loaded through this 4 * file. This file doesn't do anything, but loads the file which does and tells 5 * WordPress to load the theme. 6 * 7 * @package WordPress 8 */ 9 10 /** 11 * Tells WordPress to load the WordPress theme and output it. 12 * 13 * @var bool 14 */ 3 15 define('WP_USE_THEMES', true); 16 17 /** Loads the WordPress Environment and Template */ 4 18 require('./wp-blog-header.php'); 5 19 ?> -
trunk/wp-app.php
r7971 r7991 1 1 <?php 2 /* 3 * wp-app.php - Atom Publishing Protocol support for WordPress 4 * Original code by: Elias Torres, http://torrez.us/archives/2006/08/31/491/ 5 * Modified by: Dougal Campbell, http://dougal.gunters.org/ 2 /** 3 * Atom Publishing Protocol support for WordPress 6 4 * 7 * Version: 1.0.5-dc 5 * @author Original by Elias Torres <http://torrez.us/archives/2006/08/31/491/> 6 * @author Modified by Dougal Campbell <http://dougal.gunters.org/> 7 * @version 1.0.5-dc 8 8 */ 9 9 10 /** 11 * WordPress is handling an Atom Publishing Protocol request. 12 * 13 * @var bool 14 */ 10 15 define('APP_REQUEST', true); 11 16 17 /** Set up WordPress environment */ 12 18 require_once('./wp-load.php'); 19 20 /** Post Template API */ 13 21 require_once(ABSPATH . WPINC . '/post-template.php'); 22 23 /** Atom Publishing Protocol Class */ 14 24 require_once(ABSPATH . WPINC . '/atomlib.php'); 25 26 /** Feed Handling API */ 15 27 require_once(ABSPATH . WPINC . '/feed.php'); 16 28 17 29 $_SERVER['PATH_INFO'] = preg_replace( '/.*\/wp-app\.php/', '', $_SERVER['REQUEST_URI'] ); 18 30 31 /** 32 * Whether to enable Atom Publishing Protocol Logging. 33 * 34 * @name app_logging 35 * @var int|bool 36 */ 19 37 $app_logging = 0; 20 38 21 // TODO: Should be an option somewhere 39 /** 40 * Whether to always authenticate user. Permanently set to true. 41 * 42 * @name always_authenticate 43 * @var int|bool 44 * @todo Should be an option somewhere 45 */ 22 46 $always_authenticate = 1; 23 47 48 /** 49 * log_app() - Writes logging info to a file. 50 * 51 * @uses $app_logging 52 * @package WordPress 53 * @subpackage Logging 54 * 55 * @param string $label Type of logging 56 * @param string $msg Information describing logging reason. 57 */ 24 58 function log_app($label,$msg) { 25 59 global $app_logging; … … 33 67 34 68 if ( !function_exists('wp_set_current_user') ) : 69 /** 70 * wp_set_current_user() - Sets the current WordPress User 71 * 72 * Pluggable function which is also found in pluggable.php. 73 * 74 * @see wp-includes/pluggable.php Documentation for this function. 75 * @uses $current_user Global of current user to test whether $id is the same. 76 * 77 * @param int $id The user's ID 78 * @param string $name Optional. The username of the user. 79 * @return WP_User Current user's User object 80 */ 35 81 function wp_set_current_user($id, $name = '') { 36 82 global $current_user; … … 45 91 endif; 46 92 93 /** 94 * wa_posts_where_include_drafts_filter() - Filter to add more post statuses 95 * 96 * @param string $where SQL statement to filter 97 * @return string Filtered SQL statement with added post_status for where clause 98 */ 47 99 function wa_posts_where_include_drafts_filter($where) { 48 49 100 $where = str_replace("post_status = 'publish'","post_status = 'publish' OR post_status = 'future' OR post_status = 'draft' OR post_status = 'inherit'", $where); 101 return $where; 50 102 51 103 } 52 104 add_filter('posts_where', 'wa_posts_where_include_drafts_filter'); 53 105 106 /** 107 * @internal 108 * Left undocumented to work on later. If you want to finish, then please do so. 109 * 110 * @package WordPress 111 * @subpackage Publishing 112 */ 54 113 class AtomServer { 55 114 … … 171 230 $categories_url = attribute_escape($this->get_categories_url()); 172 231 $media_url = attribute_escape($this->get_attachments_url()); 173 174 175 232 foreach ($this->media_content_types as $med) { 233 $accepted_media_types = $accepted_media_types . "<accept>" . $med . "</accept>"; 234 } 176 235 $atom_prefix="atom"; 177 236 $atom_blogname=get_bloginfo('name'); -
trunk/wp-atom.php
r7971 r7991 1 1 <?php 2 /** 3 * Outputs the Atom feed XML format using the feed-atom.php file in wp-includes 4 * folder. This file only sets the feed format and includes the feed-atom.php. 5 * 6 * This file is no longer used in WordPress and while it is not deprecated now. 7 * This file will most likely be deprecated or removed in a later version. 8 * 9 * The link for the atom feed is /index.php?feed=atom with permalinks off. 10 * 11 * @package WordPress 12 */ 2 13 3 14 if (empty($wp)) { -
trunk/wp-blog-header.php
r7971 r7991 1 1 <?php 2 /** 3 * Loads the WordPress environment and template. 4 * 5 * @package WordPress 6 */ 2 7 3 8 if ( !isset($wp_did_header) ) { -
trunk/wp-comments-post.php
r7971 r7991 1 1 <?php 2 /** 3 * Handles Comment Post to WordPress and prevents duplicate comment posting. 4 * 5 * @package @WordPress 6 */ 7 2 8 if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { 3 9 header('Allow: POST'); … … 6 12 exit; 7 13 } 14 15 /** Sets up the WordPress Environment. */ 8 16 require( dirname(__FILE__) . '/wp-load.php' ); 9 17 -
trunk/wp-commentsrss2.php
r7971 r7991 1 1 <?php 2 /** 3 * Outputs the RSS2 XML format comment feed using the feed-rss2.php file in 4 * wp-includes folder. This file only sets the feed format and includes the 5 * feed-rss2-comments.php. 6 * 7 * This file is no longer used in WordPress and while it is not deprecated now. 8 * This file will most likely be deprecated or removed in a later version. 9 * 10 * The link for the rss2 comment feed is /index.php?feed=rss2&withcomments=1 11 * with permalinks off. 12 * 13 * @package WordPress 14 */ 2 15 3 16 if (empty($wp)) { -
trunk/wp-cron.php
r7971 r7991 1 1 <?php 2 /** 3 * WordPress Cron Implementation for hosts, which do not offer CRON or for which 4 * the user has not setup a CRON job pointing to this file. 5 * 6 * The HTTP request to this file will not slow down the visitor who happens to 7 * visit when the cron job is needed to run. 8 * 9 * @package WordPress 10 */ 11 2 12 ignore_user_abort(true); 3 define('DOING_CRON', TRUE); 13 14 /** 15 * Tell WordPress we are doing the CRON task. 16 * 17 * @var bool 18 */ 19 define('DOING_CRON', true); 20 /** Setup WordPress environment */ 4 21 require_once('./wp-load.php'); 5 22 … … 16 33 if (!is_array($crons) || $keys[0] > time()) 17 34 return; 35 18 36 foreach ($crons as $timestamp => $cronhooks) { 19 37 if ($timestamp > time()) break; -
trunk/wp-feed.php
r4495 r7991 1 1 <?php 2 /** 3 * Outputs the RSS2 feed XML format. This file is a shortcut or compatibility 4 * layer for easily finding the RSS feed for the site. It loads WordPress using 5 * the wp-blog-header.php file and running do_feed() function. 6 * 7 * @see do_feed() Used to display the RSS2 feed 8 * 9 * This file is no longer used in WordPress and while it is not deprecated now. 10 * This file will most likely be deprecated or removed in a later version. 11 * 12 * The link for the rss2 feed is /index.php?feed=rss2 with permalinks off. 13 * 14 * @package WordPress 15 */ 2 16 3 17 if (empty($doing_rss)) { -
trunk/wp-links-opml.php
r7971 r7991 1 1 <?php 2 /** 3 * Outputs the OPML XML format for getting the links defined in the link 4 * administration. This can be used to export links from one blog over to 5 * another. Links aren't exported by the WordPress export, so this file handles 6 * that. 7 * 8 * This file is not added by default to WordPress theme pages when outputting 9 * feed links. It will have to be added manually for browsers and users to pick 10 * up that this file exists. 11 * 12 * @package WordPress 13 */ 2 14 3 15 if (empty($wp)) { -
trunk/wp-load.php
r7971 r7991 1 1 <?php 2 /** 3 * Bootstrap file for setting the ABSPATH constant 4 * and loading the wp-config.php file. The wp-config.php 5 * file will then load the wp-settings.php file, which 6 * will then set up the WordPress environment. 7 * 8 * If the wp-config.php file is not found then an error 9 * will be displayed asking the visitor to set up the 10 * wp-config.php file. 11 * 12 * Also made to work in the wp-admin/ folder, because it 13 * will look in the parent directory if the file is not 14 * found in the current directory. 15 * 16 * @package WordPress 17 */ 2 18 3 / / Define ABSPATH as this files directory19 /** Define ABSPATH as this files directory */ 4 20 define( 'ABSPATH', dirname(__FILE__) . '/' ); 5 21 6 22 if ( file_exists( ABSPATH . 'wp-config.php') ) { 7 23 8 / / The config file resides in ABSPATH24 /** The config file resides in ABSPATH */ 9 25 require_once( ABSPATH . 'wp-config.php' ); 10 26 11 27 } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) ) { 12 28 13 / / The config file resides one level below ABSPATH29 /** The config file resides one level below ABSPATH */ 14 30 require_once( dirname(ABSPATH) . '/wp-config.php' ); 15 31 -
trunk/wp-login.php
r7979 r7991 1 1 <?php 2 /** 3 * 4 * @package WordPress 5 */ 6 7 /** Make sure that the WordPress bootstrap has ran before continuing. */ 2 8 require( dirname(__FILE__) . '/wp-load.php' ); 3 9 4 // Rather than duplicating this HTML all over the place, we'll stick it in function 10 /** 11 * login_header() - Outputs the header for the login page 12 * 13 * @package WordPress 14 * @uses do_action() Calls the 'login_head' for outputting HTML in the Login 15 * header. 16 * @uses apply_filters() Calls 'login_headerurl' for the top login link. 17 * @uses apply_filters() Calls 'login_headertitle' for the top login title. 18 * @uses apply_filters() Calls 'login_message' on the message to display in the 19 * header. 20 * @uses $error The error global, which is checked for displaying errors. 21 * 22 * @param string $title Optional. WordPress Login Page title to display in 23 * <title/> element. 24 * @param string $message Optional. Message to display in header. 25 * @param WP_Error $wp_error Optional. WordPress Error Object 26 */ 5 27 function login_header($title = 'Login', $message = '', $wp_error = '') { 6 28 global $error; … … 57 79 } // End of login_header() 58 80 81 /** 82 * retrieve_password() - Handles sending password retrieval email to user 83 * 84 * {@internal Missing Long Description}} 85 * 86 * @uses $wpdb WordPress Database object 87 * 88 * @return bool|WP_Error True: when finish. WP_Error on error 89 */ 59 90 function retrieve_password() { 60 91 global $wpdb; … … 111 142 } 112 143 144 /** 145 * reset_password() - Handles resetting the user's password 146 * 147 * {@internal Missing Long Description}} 148 * 149 * @uses $wpdb WordPress Database object 150 * 151 * @param string $key Hash to validate sending user's password 152 * @return bool|WP_Error 153 */ 113 154 function reset_password($key) { 114 155 global $wpdb; … … 145 186 } 146 187 188 /** 189 * register_new_user() - Handles registering a new user 190 * 191 * {@internal Missing Long Description}} 192 * 193 * @param string $user_login User's username for logging in 194 * @param string $user_email User's email address to send password and add 195 * @return int|WP_Error Either user's ID or error on failure. 196 */ 147 197 function register_new_user($user_login, $user_email) { 148 198 $errors = new WP_Error(); -
trunk/wp-mail.php
r7971 r7991 1 1 <?php 2 /** 3 * Gets the email message from the user's mailbox to add as 4 * a WordPress post. Will only run if this is setup and enabled. 5 * 6 * @package WordPress 7 */ 8 9 /** Make sure that the WordPress bootstrap has ran before continuing. */ 2 10 require(dirname(__FILE__) . '/wp-load.php'); 3 11 12 /** Get the POP3 class for which to access the mailbox. */ 4 13 require_once(ABSPATH.WPINC.'/class-pop3.php'); 5 14 15 // WTF is this? Use constants instead. 6 16 error_reporting(2037); 7 17 -
trunk/wp-pass.php
r7971 r7991 1 1 <?php 2 /** 3 * Creates the password cookie and redirects back to where the 4 * visitor was before. 5 * 6 * @package WordPress 7 */ 8 9 /** Make sure that the WordPress bootstrap has ran before continuing. */ 2 10 require( dirname(__FILE__) . '/wp-load.php'); 3 11 -
trunk/wp-rdf.php
r7971 r7991 1 <?php /* RDF 1.0 generator, original version by garym@teledyn.com */ 1 <?php 2 /** 3 * Outputs the RDF feed using the feed-rdf.php 4 * file in wp-includes folder. 5 * 6 * This file only sets the feed format and includes the 7 * feed-rdf.php. 8 * 9 * This file is no longer used in WordPress and while it is 10 * not deprecated now. This file will most likely be 11 * deprecated or removed in a later version. 12 * 13 * @package WordPress 14 */ 2 15 3 16 if (empty($wp)) { -
trunk/wp-register.php
r7971 r7991 1 1 <?php 2 3 # This file is deprecated, but you shouldn't have been linking to it directly anyway :P 4 # Use wp_register() to create a registration link instead, it's much better ;) 2 /** 3 * Used to be the page which displayed the registration form. 4 * 5 * This file is no longer used in WordPress and is 6 * deprecated. 7 * 8 * @package WordPress 9 * @deprecated Use wp_register() to create a registration link instead 10 */ 5 11 6 12 require('./wp-load.php'); -
trunk/wp-rss.php
r7971 r7991 1 1 <?php 2 /** 3 * Outputs the RSS feed RDF format using the feed-rss.php 4 * file in wp-includes folder. 5 * 6 * This file only sets the feed format and includes the 7 * feed-rss.php. 8 * 9 * This file is no longer used in WordPress and while it is 10 * not deprecated now. This file will most likely be 11 * deprecated or removed in a later version. 12 * 13 * @package WordPress 14 */ 2 15 3 16 if (empty($wp)) { -
trunk/wp-rss2.php
r7971 r7991 1 1 <?php 2 /** 3 * Outputs the RSS2 feed XML format using the feed-rss2.php file in wp-includes 4 * folder. This file only sets the feed format and includes the feed-rss2.php. 5 * 6 * This file is no longer used in WordPress and while it is not deprecated now. 7 * This file will most likely be deprecated or removed in a later version. 8 * 9 * The link for the rss2 feed is /index.php?feed=rss2 with permalinks off. 10 * 11 * @package WordPress 12 */ 2 13 3 14 if (empty($wp)) { -
trunk/wp-trackback.php
r7971 r7991 1 1 <?php 2 /** 3 * Handle Trackbacks and Pingbacks sent to WordPress 4 * 5 * @package WordPress 6 */ 2 7 3 8 if (empty($wp)) { … … 6 11 } 7 12 13 /** 14 * trackback_response() - Respond with error or success XML message 15 * 16 * @param int|bool $error Whether there was an error or not 17 * @param string $error_message Error message if an error occurred 18 */ 8 19 function trackback_response($error = 0, $error_message = '') { 9 20 header('Content-Type: text/xml; charset=' . get_option('blog_charset') ); -
trunk/xmlrpc.php
r7971 r7991 1 1 <?php 2 2 /** 3 * XML-RPC protocol support for WordPress 4 * 5 * @license GPL v2 <./license.txt> 6 * @package WordPress 7 */ 8 9 /** 10 * Whether this is a XMLRPC Request 11 * 12 * @var bool 13 */ 3 14 define('XMLRPC_REQUEST', true); 4 15 … … 12 23 } 13 24 14 #fix for mozBlog and other cases where '<?xml' isn't on the very first line25 // fix for mozBlog and other cases where '<?xml' isn't on the very first line 15 26 if ( isset($HTTP_RAW_POST_DATA) ) 16 27 $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA); 17 28 29 /** Include the bootstrap for setting up WordPress environment */ 18 30 include('./wp-load.php'); 19 31 … … 46 58 // error_reporting(0); 47 59 48 $post_default_title = ""; // posts submitted via the xmlrpc interface get that title 49 60 /** 61 * Posts submitted via the xmlrpc interface get that title 62 * @name post_default_title 63 * @var string 64 */ 65 $post_default_title = ""; 66 67 /** 68 * Whether to enable XMLRPC Logging. 69 * 70 * @name xmlrpc_logging 71 * @var int|bool 72 */ 50 73 $xmlrpc_logging = 0; 51 74 75 /** 76 * logIO() - Writes logging info to a file. 77 * 78 * @uses $xmlrpc_logging 79 * @package WordPress 80 * @subpackage Logging 81 * 82 * @param string $io Whether input or output 83 * @param string $msg Information describing logging reason. 84 * @return bool Always return true 85 */ 52 86 function logIO($io,$msg) { 53 87 global $xmlrpc_logging; … … 63 97 64 98 if ( isset($HTTP_RAW_POST_DATA) ) 65 logIO("I", $HTTP_RAW_POST_DATA); 66 99 logIO("I", $HTTP_RAW_POST_DATA); 100 101 /** 102 * @internal 103 * Left undocumented to work on later. If you want to finish, then please do so. 104 * 105 * @package WordPress 106 * @subpackage Publishing 107 */ 67 108 class wp_xmlrpc_server extends IXR_Server { 68 109
Note: See TracChangeset
for help on using the changeset viewer.