Ticket #7037: basedoc.phpdoc.r7989.patch
File basedoc.phpdoc.r7989.patch, 23.9 KB (added by , 17 years ago) |
---|
-
index.php
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 ?> 20 No newline at end of file -
wp-app.php
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; 26 60 if ($app_logging) { … … 32 66 } 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; 37 83 … … 44 90 } 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 56 115 var $ATOM_CONTENT_TYPE = 'application/atom+xml'; … … 170 229 $entries_url = attribute_escape($this->get_entries_url()); 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'); 178 237 $service_doc = <<<EOD … … 1124 1183 $server = new AtomServer(); 1125 1184 $server->handle_request(); 1126 1185 1127 ?> 1186 ?> 1187 No newline at end of file -
wp-atom.php
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)) { 4 15 require_once('./wp-load.php'); -
wp-blog-header.php
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) ) { 4 9 … … 12 17 13 18 } 14 19 15 ?> 20 ?> 21 No newline at end of file -
wp-comments-post.php
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'); 4 10 header('HTTP/1.1 405 Method Not Allowed'); 5 11 header('Content-Type: text/plain'); 6 12 exit; 7 13 } 14 15 /** Sets up the WordPress Environment. */ 8 16 require( dirname(__FILE__) . '/wp-load.php' ); 9 17 10 18 nocache_headers(); … … 74 82 75 83 wp_redirect($location); 76 84 77 ?> 85 ?> 86 No newline at end of file -
wp-commentsrss2.php
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)) { 4 17 require_once('./wp-load.php'); -
wp-config-sample.php
1 1 <?php 2 // ** MySQL settings ** // 3 define('DB_NAME', 'putyourdbnamehere'); // The name of the database 4 define('DB_USER', 'usernamehere'); // Your MySQL username 5 define('DB_PASSWORD', 'yourpasswordhere'); // ...and password 6 define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value 2 /** 3 * The base configurations of the WordPress 4 * 5 * This file has the following configurations: MySQL settings, Table Prefix, 6 * Secret Key, WordPress Language, and ABSPATH. 7 * 8 * @package WordPress 9 */ 10 11 /** 12 *The name of the database 13 * 14 * @var string 15 * @package WordPress 16 */ 17 define('DB_NAME', 'putyourdbnamehere'); 18 19 /** 20 * Your MySQL username 21 * 22 * @var string 23 * @package WordPress 24 */ 25 define('DB_USER', 'usernamehere'); 26 27 /** 28 * The MySQL user's password 29 * 30 * @var string 31 * @package WordPress 32 */ 33 define('DB_PASSWORD', 'yourpasswordhere'); 34 35 /** 36 * The host location to the database server. 37 * 38 * @var string 39 * @package WordPress 40 */ 41 define('DB_HOST', 'localhost'); 42 43 /** 44 * DB Charset to use in creating database tables. 45 * 46 * Should not change this value, unless you really need to and know what you 47 * are doing. 48 * 49 * @var string 50 * @package WordPress 51 */ 7 52 define('DB_CHARSET', 'utf8'); 53 54 /** 55 * The DB Collate type. 56 * 57 * @var string 58 * @package WordPress 59 */ 8 60 define('DB_COLLATE', ''); 9 61 10 // Change SECRET_KEY to a unique phrase. You won't have to remember it later, 11 // so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/ 12 // to get a secret key generated for you, or just make something up. 13 define('SECRET_KEY', 'put your unique phrase here'); // Change this to a unique phrase. 62 /** 63 * Change SECRET_KEY to a unique phrase. You won't have to remember it later, 64 * so make it long and complicated. You can visit 65 * {@link http://api.wordpress.org/secret-key/1.0/ Secret Key} to get a secret 66 * key generated for you, or just make something up. 67 * 68 * @var string 69 * @package WordPress 70 */ 71 define('SECRET_KEY', 'put your unique phrase here'); 14 72 15 // You can have multiple installations in one database if you give each a unique prefix 16 $table_prefix = 'wp_'; // Only numbers, letters, and underscores please! 73 /** 74 * Sets the table prefix for all of the WordPress tables. This can be used to 75 * set up multiple blogs on the same Database, but different URLs. You can have 76 * multiple installations in one database if you give each a unique prefix. 77 * 78 * Only numbers, letters, and underscores please! 79 * 80 * This should not be 81 * 82 * @name table_prefix 83 * @var string 84 * @package WordPress 85 */ 86 $table_prefix = 'wp_'; 17 87 18 // Change this to localize WordPress. A corresponding MO file for the 19 // chosen language must be installed to wp-content/languages. 20 // For example, install de.mo to wp-content/languages and set WPLANG to 'de' 21 // to enable German language support. 88 /** 89 * Change this to localize WordPress. A corresponding MO file for the chosen 90 * language must be installed to wp-content/languages. For example, install 91 * de.mo to wp-content/languages and set WPLANG to 'de' to enable German 92 * language support. 93 * 94 * @package WordPress 95 */ 22 96 define ('WPLANG', ''); 23 97 24 98 /* That's all, stop editing! Happy blogging. */ 25 99 26 100 if ( !defined('ABSPATH') ) 27 101 define('ABSPATH', dirname(__FILE__) . '/'); 102 103 /** Sets up the WordPress environment, including all WordPress files. */ 28 104 require_once(ABSPATH . 'wp-settings.php'); 29 105 ?> -
wp-cron.php
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 6 23 if ( $_GET['check'] != wp_hash('187425') ) … … 15 32 $keys = array_keys($crons); 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; 20 38 foreach ($cronhooks as $hook => $keys) { … … 32 50 33 51 update_option('doing_cron', 0); 34 52 35 ?> 53 ?> 54 No newline at end of file -
wp-feed.php
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)) { 4 18 $doing_rss = 1; -
wp-links-opml.php
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)) { 4 16 require_once('./wp-load.php'); -
wp-load.php
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 16 32 } else { … … 29 45 30 46 } 31 47 32 ?> 48 ?> 49 No newline at end of file -
wp-login.php
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; 7 29 … … 56 78 } 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; 61 92 … … 110 141 return true; 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; 115 156 … … 144 185 return true; 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(); 149 199 -
wp-mail.php
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 8 18 $time_difference = get_option('gmt_offset') * 3600; … … 193 203 194 204 $pop3->quit(); 195 205 196 ?> 206 ?> 207 No newline at end of file -
wp-pass.php
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 4 12 if ( get_magic_quotes_gpc() ) -
wp-rdf.php
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)) { 4 17 require_once('./wp-load.php'); -
wp-register.php
1 1 <?php 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 */ 2 11 3 # This file is deprecated, but you shouldn't have been linking to it directly anyway :P4 # Use wp_register() to create a registration link instead, it's much better ;)5 6 12 require('./wp-load.php'); 7 13 wp_redirect('wp-login.php?action=register'); 8 14 -
wp-rss.php
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)) { 4 17 require_once('./wp-load.php'); -
wp-rss2.php
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)) { 4 15 require_once('./wp-load.php'); -
wp-trackback.php
1 1 <?php 2 /** 3 * Handle Trackbacks and Pingbacks sent to WordPress 4 * 5 * @package WordPress 6 */ 2 7 3 8 if (empty($wp)) { 4 9 require_once('./wp-load.php'); 5 10 wp('tb=1'); 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') ); 10 21 if ($error) { … … 97 108 do_action('trackback_post', $wpdb->insert_id); 98 109 trackback_response(0); 99 110 } 100 ?> 111 ?> 112 No newline at end of file -
xmlrpc.php
1 1 <?php 2 /** 3 * XML-RPC protocol support for WordPress 4 * 5 * @license GPL v2 <./license.txt> 6 * @package WordPress 7 */ 2 8 9 /** 10 * Whether this is a XMLRPC Request 11 * 12 * @var bool 13 */ 3 14 define('XMLRPC_REQUEST', true); 4 15 5 16 // Some browser-embedded clients send cookies. We don't want them. … … 11 22 $HTTP_RAW_POST_DATA = file_get_contents( 'php://input' ); 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 20 32 if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd … … 45 57 // Turn off all warnings and errors. 46 58 // error_reporting(0); 47 59 48 $post_default_title = ""; // posts submitted via the xmlrpc interface get that title 60 /** 61 * Posts submitted via the xmlrpc interface get that title 62 * @name post_default_title 63 * @var string 64 */ 65 $post_default_title = ""; 49 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; 54 88 if ($xmlrpc_logging) { … … 62 96 } 63 97 64 98 if ( isset($HTTP_RAW_POST_DATA) ) 65 99 logIO("I", $HTTP_RAW_POST_DATA); 66 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 69 110 function wp_xmlrpc_server() { … … 2418 2459 2419 2460 $wp_xmlrpc_server = new wp_xmlrpc_server(); 2420 2461 2421 ?> 2462 ?> 2463 No newline at end of file