phpdoc for wp-admin. See #7496 props santosj.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-08-14 06:30:38 +00:00
parent 1ef0029be8
commit 7f894ae416
46 changed files with 1027 additions and 167 deletions

View File

@ -18,6 +18,12 @@ $min_width_pages = array( 'post.php', 'post-new.php', 'page.php', 'page-new.php'
$the_current_page = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']); $the_current_page = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']);
$ie6_no_scrollbar = true; $ie6_no_scrollbar = true;
/**
* Append 'minwidth' to value.
*
* @param mixed $c
* @return string
*/
function add_minwidth($c) { function add_minwidth($c) {
return $c . 'minwidth '; return $c . 'minwidth ';
} }

View File

@ -1,9 +1,46 @@
<?php <?php
/**
* Blogger Importer
*
* @package WordPress
* @subpackage Importer
*/
define( 'MAX_RESULTS', 50 ); // How many records per GData query /**
define( 'MAX_EXECUTION_TIME', 20 ); // How many seconds to let the script run * How many records per GData query
define( 'STATUS_INTERVAL', 3 ); // How many seconds between status bar updates *
* @package WordPress
* @subpackage Blogger_Import
* @var int
* @since unknown
*/
define( 'MAX_RESULTS', 50 );
/**
* How many seconds to let the script run
*
* @package WordPress
* @subpackage Blogger_Import
* @var int
* @since unknown
*/
define( 'MAX_EXECUTION_TIME', 20 );
/**
* How many seconds between status bar updates
*
* @package WordPress
* @subpackage Blogger_Import
* @var int
* @since unknown
*/
define( 'STATUS_INTERVAL', 3 );
/**
* Blogger Importer class
*
* @since unknown
*/
class Blogger_Import { class Blogger_Import {
// Shows the welcome screen and the magic auth link. // Shows the welcome screen and the magic auth link.

View File

@ -1,7 +1,20 @@
<?php <?php
/**
* Blogware XML Importer
*
* @package WordPress
* @subpackage Importer
* @author Shayne Sweeney
* @link http://www.theshayne.com/
*/
/* By Shayne Sweeney - http://www.theshayne.com/ */ /**
* Blogware XML Importer class
*
* Extract posts from Blogware XML export file into your blog.
*
* @since unknown
*/
class BW_Import { class BW_Import {
var $file; var $file;

View File

@ -1,5 +1,19 @@
<?php <?php
/**
* BunnyTags Plugin Tag Importer
*
* @package WordPress
* @subpackage Importer
*/
/**
* BunnyTags Plugin tag converter
*
* This will process the BunnyTags plugin tags and convert them to the WordPress
* 2.3 taxonomy.
*
* @since unknown
*/
class BunnyTags_Import { class BunnyTags_Import {
function header() { function header() {

View File

@ -1,7 +1,11 @@
<?php <?php
/* /**
* DotClear import plugin * DotClear Importer
* by Thomas Quinot - http://thomas.quinot.org/ *
* @package WordPress
* @subpackage Importer
* @author Thomas Quinot
* @link http://thomas.quinot.org/
*/ */
/** /**
@ -10,6 +14,15 @@
if(!function_exists('get_comment_count')) if(!function_exists('get_comment_count'))
{ {
/**
* Get the comment count for posts.
*
* @package WordPress
* @subpackage Dotclear_Import
*
* @param int $post_ID Post ID
* @return int
*/
function get_comment_count($post_ID) function get_comment_count($post_ID)
{ {
global $wpdb; global $wpdb;
@ -19,6 +32,15 @@ if(!function_exists('get_comment_count'))
if(!function_exists('link_exists')) if(!function_exists('link_exists'))
{ {
/**
* Check whether link already exists.
*
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $linkname
* @return int
*/
function link_exists($linkname) function link_exists($linkname)
{ {
global $wpdb; global $wpdb;
@ -40,31 +62,73 @@ if(!function_exists('link_exists'))
// This cries out for a C-implementation to be included in PHP core // This cries out for a C-implementation to be included in PHP core
// //
/**
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $char
* @return string
*/
function valid_1byte($char) { function valid_1byte($char) {
if(!is_int($char)) return false; if(!is_int($char)) return false;
return ($char & 0x80) == 0x00; return ($char & 0x80) == 0x00;
} }
/**
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $char
* @return string
*/
function valid_2byte($char) { function valid_2byte($char) {
if(!is_int($char)) return false; if(!is_int($char)) return false;
return ($char & 0xE0) == 0xC0; return ($char & 0xE0) == 0xC0;
} }
/**
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $char
* @return string
*/
function valid_3byte($char) { function valid_3byte($char) {
if(!is_int($char)) return false; if(!is_int($char)) return false;
return ($char & 0xF0) == 0xE0; return ($char & 0xF0) == 0xE0;
} }
/**
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $char
* @return string
*/
function valid_4byte($char) { function valid_4byte($char) {
if(!is_int($char)) return false; if(!is_int($char)) return false;
return ($char & 0xF8) == 0xF0; return ($char & 0xF8) == 0xF0;
} }
/**
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $char
* @return string
*/
function valid_nextbyte($char) { function valid_nextbyte($char) {
if(!is_int($char)) return false; if(!is_int($char)) return false;
return ($char & 0xC0) == 0x80; return ($char & 0xC0) == 0x80;
} }
/**
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $string
* @return string
*/
function valid_utf8($string) { function valid_utf8($string) {
$len = strlen($string); $len = strlen($string);
$i = 0; $i = 0;
@ -92,6 +156,13 @@ function valid_utf8($string) {
return true; // done return true; // done
} }
/**
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $s
* @return string
*/
function csc ($s) { function csc ($s) {
if (valid_utf8 ($s)) { if (valid_utf8 ($s)) {
return $s; return $s;
@ -100,13 +171,28 @@ function csc ($s) {
} }
} }
/**
* @package WordPress
* @subpackage Dotclear_Import
*
* @param string $s
* @return string
*/
function textconv ($s) { function textconv ($s) {
return csc (preg_replace ('|(?<!<br />)\s*\n|', ' ', $s)); return csc (preg_replace ('|(?<!<br />)\s*\n|', ' ', $s));
} }
/** /**
The Main Importer Class * Dotclear Importer class
**/ *
* Will process the WordPress eXtended RSS files that you upload from the export
* file.
*
* @package WordPress
* @subpackage Importer
*
* @since unknown
*/
class Dotclear_Import { class Dotclear_Import {
function header() function header()
@ -742,5 +828,7 @@ class Dotclear_Import {
} }
$dc_import = new Dotclear_Import(); $dc_import = new Dotclear_Import();
register_importer('dotclear', __('DotClear'), __('Import categories, users, posts, comments, and links from a DotClear blog.'), array ($dc_import, 'dispatch')); register_importer('dotclear', __('DotClear'), __('Import categories, users, posts, comments, and links from a DotClear blog.'), array ($dc_import, 'dispatch'));
?> ?>

View File

@ -1,5 +1,19 @@
<?php <?php
/**
* GreyMatter Importer
*
* @package WordPress
* @subpackage Importer
*/
/**
* GreyMatter Importer class
*
* Basic GreyMatter to WordPress importer, will import posts, comments, and
* posts karma.
*
* @since unknown
*/
class GM_Import { class GM_Import {
var $gmnames = array (); var $gmnames = array ();

View File

@ -1,5 +1,18 @@
<?php <?php
/**
* Jeromes Keyword Plugin Importer
*
* @package WordPress
* @subpackage Importer
*/
/**
* Jeromes Keyword Plugin Importer class
*
* Will convert Jeromes Keyword Plugin tags to WordPress taxonomy tags.
*
* @since 2.3
*/
class JeromesKeyword_Import { class JeromesKeyword_Import {
function header() { function header() {

View File

@ -1,5 +1,18 @@
<?php <?php
/**
* LiveJournal Importer
*
* @package WordPress
* @subpackage Importer
*/
/**
* LiveJournal Importer class
*
* Imports your LiveJournal XML exported file into WordPress.
*
* @since unknown
*/
class LJ_Import { class LJ_Import {
var $file; var $file;

View File

@ -1,5 +1,18 @@
<?php <?php
/**
* Movable Type and Typepad Importer
*
* @package WordPress
* @subpackage Importer
*/
/**
* Moveable Type and Typepad Importer class
*
* Upload your exported Movable Type or Typepad entries into WordPress.
*
* @since unknown
*/
class MT_Import { class MT_Import {
var $posts = array (); var $posts = array ();

View File

@ -1,5 +1,20 @@
<?php <?php
/**
* RSS Importer
*
* @package WordPress
* @subpackage Importer
*/
/**
* RSS Importer
*
* Will process a RSS feed for importing posts into WordPress. This is a very
* limited importer and should only be used as the last resort, when no other
* importer is available.
*
* @since unknown
*/
class RSS_Import { class RSS_Import {
var $posts = array (); var $posts = array ();

View File

@ -1,4 +1,18 @@
<?php <?php
/**
* Simple Tags Plugin Importer
*
* @package WordPress
* @subpackage Importer
*/
/**
* Simple Tags Plugin Tags converter class.
*
* Will convert Simple Tags Plugin tags over to the WordPress 2.3 taxonomy.
*
* @since unknown
*/
class STP_Import { class STP_Import {
function header() { function header() {
echo '<div class="wrap">'; echo '<div class="wrap">';

View File

@ -1,10 +1,22 @@
<?php <?php
/** /**
Add These Functions to make our lives easier * TextPattern Importer
**/ *
* @package WordPress
* @subpackage Importer
*/
if(!function_exists('get_comment_count')) if(!function_exists('get_comment_count'))
{ {
/**
* Get the comment count for posts.
*
* @package WordPress
* @subpackage Textpattern_Import
*
* @param int $post_ID Post ID
* @return int
*/
function get_comment_count($post_ID) function get_comment_count($post_ID)
{ {
global $wpdb; global $wpdb;
@ -14,6 +26,15 @@ if(!function_exists('get_comment_count'))
if(!function_exists('link_exists')) if(!function_exists('link_exists'))
{ {
/**
* Check whether link already exists.
*
* @package WordPress
* @subpackage Textpattern_Import
*
* @param string $linkname
* @return int
*/
function link_exists($linkname) function link_exists($linkname)
{ {
global $wpdb; global $wpdb;
@ -22,8 +43,10 @@ if(!function_exists('link_exists'))
} }
/** /**
The Main Importer Class * TextPattern Importer Class
**/ *
* @since unknown
*/
class Textpattern_Import { class Textpattern_Import {
function header() function header()
@ -670,5 +693,7 @@ class Textpattern_Import {
} }
$txp_import = new Textpattern_Import(); $txp_import = new Textpattern_Import();
register_importer('textpattern', __('Textpattern'), __('Import categories, users, posts, comments, and links from a Textpattern blog.'), array ($txp_import, 'dispatch')); register_importer('textpattern', __('Textpattern'), __('Import categories, users, posts, comments, and links from a Textpattern blog.'), array ($txp_import, 'dispatch'));
?> ?>

View File

@ -1,5 +1,18 @@
<?php <?php
/**
* The Ultimate Tag Warrior Importer.
*
* @package WordPress
* @subpackage Importer
*/
/**
* Ultimate Tag Warrior Converter to 2.3 taxonomy.
*
* This converts the Ultimate Tag Warrior tags to the 2.3 WordPress taxonomy.
*
* @since 2.3.0
*/
class UTW_Import { class UTW_Import {
function header() { function header() {

View File

@ -1,5 +1,19 @@
<?php <?php
/**
* WordPress Importer
*
* @package WordPress
* @subpackage Importer
*/
/**
* WordPress Importer
*
* Will process the WordPress eXtended RSS files that you upload from the export
* file.
*
* @since unknown
*/
class WP_Import { class WP_Import {
var $post_ids_processed = array (); var $post_ids_processed = array ();
@ -746,6 +760,13 @@ class WP_Import {
} }
} }
/**
* Register WordPress Importer
*
* @since unknown
* @var WP_Import
* @name $wp_import
*/
$wp_import = new WP_Import(); $wp_import = new WP_Import();
register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, pages, and categories</strong> from a WordPress export file.'), array ($wp_import, 'dispatch')); register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, pages, and categories</strong> from a WordPress export file.'), array ($wp_import, 'dispatch'));

View File

@ -1,5 +1,19 @@
<?php <?php
/**
* WordPress Categories to Tags Converter.
*
* @package WordPress
* @subpackage Importer
*/
/**
* WordPress categories to tags converter class.
*
* Will convert WordPress categories to tags, removing the category after the
* process is complete and updating all posts to switch to the tag.
*
* @since unknown
*/
class WP_Categories_to_Tags { class WP_Categories_to_Tags {
var $categories_to_convert = array(); var $categories_to_convert = array();
var $all_categories = array(); var $all_categories = array();

View File

@ -11,6 +11,20 @@
* @link http://www.phpclasses.org/browse/package/1743.html Site * @link http://www.phpclasses.org/browse/package/1743.html Site
* @license LGPL License http://www.opensource.org/licenses/lgpl-license.html * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html
*/ */
/**
* FTP implementation using fsockopen to connect.
*
* @package PemFTP
* @subpackage Pure
* @since 2.5
*
* @version 1.0
* @copyright Alexey Dotsenko
* @author Alexey Dotsenko
* @link http://www.phpclasses.org/browse/package/1743.html Site
* @license LGPL License http://www.opensource.org/licenses/lgpl-license.html
*/
class ftp extends ftp_base { class ftp extends ftp_base {
function ftp($verb=FALSE, $le=FALSE) { function ftp($verb=FALSE, $le=FALSE) {
@ -172,4 +186,5 @@ class ftp extends ftp_base {
} }
} }
} }
?> ?>

View File

@ -11,6 +11,20 @@
* @link http://www.phpclasses.org/browse/package/1743.html Site * @link http://www.phpclasses.org/browse/package/1743.html Site
* @license LGPL License http://www.opensource.org/licenses/lgpl-license.html * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html
*/ */
/**
* Socket Based FTP implementation
*
* @package PemFTP
* @subpackage Socket
* @since 2.5
*
* @version 1.0
* @copyright Alexey Dotsenko
* @author Alexey Dotsenko
* @link http://www.phpclasses.org/browse/package/1743.html Site
* @license LGPL License http://www.opensource.org/licenses/lgpl-license.html
*/
class ftp extends ftp_base { class ftp extends ftp_base {
function ftp($verb=FALSE, $le=FALSE) { function ftp($verb=FALSE, $le=FALSE) {

View File

@ -11,15 +11,75 @@
* @link http://www.phpclasses.org/browse/package/1743.html Site * @link http://www.phpclasses.org/browse/package/1743.html Site
* @license LGPL License http://www.opensource.org/licenses/lgpl-license.html * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html
*/ */
/**
* Defines the newline characters, if not defined already.
*
* This can be redefined.
*
* @since 2.5
* @var string
*/
if(!defined('CRLF')) define('CRLF',"\r\n"); if(!defined('CRLF')) define('CRLF',"\r\n");
/**
* Sets whatever to autodetect ASCII mode.
*
* This can be redefined.
*
* @since 2.5
* @var int
*/
if(!defined("FTP_AUTOASCII")) define("FTP_AUTOASCII", -1); if(!defined("FTP_AUTOASCII")) define("FTP_AUTOASCII", -1);
/**
*
* This can be redefined.
* @since 2.5
* @var int
*/
if(!defined("FTP_BINARY")) define("FTP_BINARY", 1); if(!defined("FTP_BINARY")) define("FTP_BINARY", 1);
/**
*
* This can be redefined.
* @since 2.5
* @var int
*/
if(!defined("FTP_ASCII")) define("FTP_ASCII", 0); if(!defined("FTP_ASCII")) define("FTP_ASCII", 0);
if(!defined('FTP_FORCE')) define('FTP_FORCE', TRUE);
/**
* Whether to force FTP.
*
* This can be redefined.
*
* @since 2.5
* @var bool
*/
if(!defined('FTP_FORCE')) define('FTP_FORCE', true);
/**
* @since 2.5
* @var string
*/
define('FTP_OS_Unix','u'); define('FTP_OS_Unix','u');
/**
* @since 2.5
* @var string
*/
define('FTP_OS_Windows','w'); define('FTP_OS_Windows','w');
/**
* @since 2.5
* @var string
*/
define('FTP_OS_Mac','m'); define('FTP_OS_Mac','m');
/**
* PemFTP base class
*
*/
class ftp_base { class ftp_base {
/* Public variables */ /* Public variables */
var $LocalEcho; var $LocalEcho;
@ -838,5 +898,6 @@ if (!extension_loaded('sockets')) {
$prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : ''; $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : '';
if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE; if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE;
} }
require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php"; require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php";
?> ?>

View File

@ -1,51 +1,60 @@
<?php <?php
// -------------------------------------------------------------------------------- /**
// PhpConcept Library - Zip Module 2.5 * PhpConcept Library - Zip Module 2.5
// -------------------------------------------------------------------------------- *
// License GNU/LGPL - Vincent Blavet - March 2006 * Presentation :
// http://www.phpconcept.net * PclZip is a PHP library that manage ZIP archives.
// -------------------------------------------------------------------------------- * So far tests show that archives generated by PclZip are readable by
// * WinZip application and other tools.
// Presentation : *
// PclZip is a PHP library that manage ZIP archives. * Warning :
// So far tests show that archives generated by PclZip are readable by * This library and the associated files are non commercial, non professional
// WinZip application and other tools. * work.
// * It should not have unexpected results. However if any damage is caused by
// Description : * this software the author can not be responsible.
// See readme.txt and http://www.phpconcept.net * The use of this software is at the risk of the user.
// *
// Warning : * @package External
// This library and the associated files are non commercial, non professional * @subpackage PclZip
// work. *
// It should not have unexpected results. However if any damage is caused by * @license License GNU/LGPL
// this software the author can not be responsible. * @copyright March 2006 Vincent Blavet
// The use of this software is at the risk of the user. * @author Vincent Blavet
// * @link http://www.phpconcept.net
// -------------------------------------------------------------------------------- * @version $Id: pclzip.lib.php,v 1.44 2006/03/08 21:23:59 vblavet Exp $
// $Id: pclzip.lib.php,v 1.44 2006/03/08 21:23:59 vblavet Exp $ */
// --------------------------------------------------------------------------------
// ----- Constants /**
define( 'PCLZIP_READ_BLOCK_SIZE', 2048 ); * The read block size for reading zip files.
*
* @since 2.5
*/
define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
// ----- File list separator /**
// In version 1.x of PclZip, the separator for file list is a space * File list separator
// (which is not a very smart choice, specifically for windows paths !). *
// A better separator should be a comma (,). This constant gives you the * In version 1.x of PclZip, the separator for file list is a space(which is not
// abilty to change that. * a very smart choice, specifically for windows paths !). A better separator
// However notice that changing this value, may have impact on existing * should be a comma (,). This constant gives you the abilty to change that.
// scripts, using space separated filenames. *
// Recommanded values for compatibility with older versions : * However notice that changing this value, may have impact on existing scripts,
//define( 'PCLZIP_SEPARATOR', ' ' ); * using space separated filenames. Recommanded values for compatibility with
// Recommanded values for smart separation of filenames. * older versions :
define( 'PCLZIP_SEPARATOR', ',' ); * <code>define( 'PCLZIP_SEPARATOR', ' ' );</code>
* Recommanded values for smart separation of filenames.
*/
define( 'PCLZIP_SEPARATOR', ',' );
// ----- Error configuration /**
// 0 : PclZip Class integrated error handling * Error configuration
// 1 : PclError external library error handling. By enabling this *
// you must ensure that you have included PclError library. * 0 : PclZip Class integrated error handling
// [2,...] : reserved for futur use * 1 : PclError external library error handling. By enabling this you must
define( 'PCLZIP_ERROR_EXTERNAL', 0 ); * ensure that you have included PclError library.
* [2,...] : reserved for future use
*/
define( 'PCLZIP_ERROR_EXTERNAL', 0 );
// ----- Optional static temporary directory // ----- Optional static temporary directory
// By default temporary files are generated in the script current // By default temporary files are generated in the script current
@ -137,7 +146,7 @@
define( 'PCLZIP_CB_POST_EXTRACT', 78002 ); define( 'PCLZIP_CB_POST_EXTRACT', 78002 );
define( 'PCLZIP_CB_PRE_ADD', 78003 ); define( 'PCLZIP_CB_PRE_ADD', 78003 );
define( 'PCLZIP_CB_POST_ADD', 78004 ); define( 'PCLZIP_CB_POST_ADD', 78004 );
/* For futur use /* For future use
define( 'PCLZIP_CB_PRE_LIST', 78005 ); define( 'PCLZIP_CB_PRE_LIST', 78005 );
define( 'PCLZIP_CB_POST_LIST', 78006 ); define( 'PCLZIP_CB_POST_LIST', 78006 );
define( 'PCLZIP_CB_PRE_DELETE', 78007 ); define( 'PCLZIP_CB_PRE_DELETE', 78007 );

View File

@ -1,5 +1,17 @@
<?php <?php
class WP_Filesystem_Base{ /**
* Base WordPress Filesystem.
*
* @package WordPress
* @subpackage Filesystem
*/
/**
* Base WordPress Filesystem class for which Filesystem implementations extend
*
* @since 2.5
*/
class WP_Filesystem_Base {
var $verbose = false; var $verbose = false;
var $cache = array(); var $cache = array();
@ -155,4 +167,5 @@ class WP_Filesystem_Base{
return $newmode; return $newmode;
} }
} }
?> ?>

View File

@ -1,5 +1,19 @@
<?php <?php
/**
* WordPress Direct Filesystem.
*
* @package WordPress
* @subpackage Filesystem
*/
/**
* WordPress Filesystem Class for direct PHP file and folder manipulation.
*
* @since 2.5
* @package WordPress
* @subpackage Filesystem
* @uses WP_Filesystem_Base Extends class
*/
class WP_Filesystem_Direct extends WP_Filesystem_Base { class WP_Filesystem_Direct extends WP_Filesystem_Base {
var $permission = null; var $permission = null;
var $errors = array(); var $errors = array();

View File

@ -1,5 +1,20 @@
<?php <?php
class WP_Filesystem_FTPext extends WP_Filesystem_Base{ /**
* WordPress FTP Filesystem.
*
* @package WordPress
* @subpackage Filesystem
*/
/**
* WordPress Filesystem Class for implementing FTP.
*
* @since 2.5
* @package WordPress
* @subpackage Filesystem
* @uses WP_Filesystem_Base Extends class
*/
class WP_Filesystem_FTPext extends WP_Filesystem_Base {
var $link; var $link;
var $timeout = 5; var $timeout = 5;
var $errors = array(); var $errors = array();

View File

@ -1,4 +1,19 @@
<?php <?php
/**
* WordPress FTP Sockets Filesystem.
*
* @package WordPress
* @subpackage Filesystem
*/
/**
* WordPress Filesystem Class for implementing FTP Sockets.
*
* @since 2.5
* @package WordPress
* @subpackage Filesystem
* @uses WP_Filesystem_Base Extends class
*/
class WP_Filesystem_ftpsockets extends WP_Filesystem_Base { class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
var $ftp = false; var $ftp = false;
var $timeout = 5; var $timeout = 5;
@ -22,7 +37,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
'bmp' => FTP_BINARY 'bmp' => FTP_BINARY
); );
function WP_Filesystem_ftpsockets($opt='') { function WP_Filesystem_ftpsockets($opt = '') {
$this->method = 'ftpsockets'; $this->method = 'ftpsockets';
$this->errors = new WP_Error(); $this->errors = new WP_Error();
@ -86,7 +101,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
$this->permission = $perm; $this->permission = $perm;
} }
function get_contents($file, $type = '', $resumepos = 0){ function get_contents($file, $type = '', $resumepos = 0) {
if( ! $this->exists($file) ) if( ! $this->exists($file) )
return false; return false;
@ -112,7 +127,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
return $contents; return $contents;
} }
function get_contents_array($file){ function get_contents_array($file) {
return explode("\n", $this->get_contents($file) ); return explode("\n", $this->get_contents($file) );
} }
@ -151,7 +166,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
return false; return false;
} }
function chmod($file, $mode = false, $recursive = false ){ function chmod($file, $mode = false, $recursive = false ) {
if( ! $mode ) if( ! $mode )
$mode = $this->permission; $mode = $this->permission;
if( ! $mode ) if( ! $mode )
@ -251,7 +266,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
return $this->ftp->filesize($file); return $this->ftp->filesize($file);
} }
function touch($file, $time = 0, $atime = 0 ){ function touch($file, $time = 0, $atime = 0 ) {
return false; return false;
} }
@ -311,8 +326,9 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
return $ret; return $ret;
} }
function __destruct(){ function __destruct() {
$this->ftp->quit(); $this->ftp->quit();
} }
} }
?> ?>

View File

@ -1,5 +1,15 @@
<?php <?php
/**
* {@internal Missing Short Description}}
*
* @since unknown
* @uses $wpdb
*
* @param string $comment_author
* @param string $comment_date
* @return mixed Comment ID on success.
*/
function comment_exists($comment_author, $comment_date) { function comment_exists($comment_author, $comment_date) {
global $wpdb; global $wpdb;
@ -7,6 +17,10 @@ function comment_exists($comment_author, $comment_date) {
WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) ); WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) );
} }
/**
*
*
*/
function edit_comment() { function edit_comment() {
$comment_post_ID = (int) $_POST['comment_post_ID']; $comment_post_ID = (int) $_POST['comment_post_ID'];

View File

@ -1,5 +1,20 @@
<?php <?php
/**
* WordPress core upgrade functionality.
*
* @package WordPress
* @subpackage Administration
* @since 2.7
*/
/**
* Stores files to be deleted.
*
* @since 2.7
* @global array $_old_files
* @var array
* @name $_old_files
*/
global $_old_files; global $_old_files;
$_old_files = array( $_old_files = array(
@ -117,6 +132,44 @@ $_old_files = array(
'wp-content/plugins/textile1.php', 'wp-content/plugins/textile1.php',
); );
/**
* Upgrade the core of WordPress.
*
* This will create a .maintenance file at the base of the WordPress directory
* to ensure that people can not access the web site, when the files are being
* copied to their locations.
*
* The files in the {@link $_old_files} list will be removed and the new files
* copied from the zip file after the database is upgraded.
*
* The steps for the upgrader for after the new release is downloaded and
* unzipped is:
* 1. Test unzipped location for select files to ensure that unzipped worked.
* 2. Create the .maintenance file in current WordPress base.
* 3. Copy new WordPress directory over old WordPress files.
* 4. Upgrade WordPress to new version.
* 5. Delete new WordPress directory path.
* 6. Delete .maintenance file.
* 7. Remove old files.
* 8. Delete 'update_core' option.
*
* There are several areas of failure. For instance if PHP times out before step
* 6, then you will not be able to access any portion of your site. Also, since
* the upgrade will not continue where it left off, you will not be able to
* automatically remove old files and remove the 'update_core' option. This
* isn't that bad.
*
* If the copy of the new WordPress over the old fails, then the worse is that
* the new WordPress directory will remain.
*
* If it is assumed that every file will be copied over, including plugins and
* themes, then if you edit the default theme, you should rename it, so that
* your changes remain.
*
* @param string $from New release unzipped path.
* @param string $to Path to old WordPress installation.
* @return WP_Error|null WP_Error on failure, null on success.
*/
function update_core($from, $to) { function update_core($from, $to) {
global $wp_filesystem, $_old_files; global $wp_filesystem, $_old_files;

View File

@ -1,15 +1,76 @@
<?php <?php
$wp_only_load_config = true; /**
require_once(dirname(dirname(__FILE__)).'/wp-load.php'); * Plugins may load this file to gain access to special helper functions for
$debug = 0; * plugin installation. This file is not included by WordPress and it is
* recommended, to prevent fatal errors, that this file is included using
* require_once().
*
* These functions are not optimized for speed, but they should only be used
* once in a while, so speed shouldn't be a concern. If it is and you are
* needing to use these functions a lot, you might experience time outs. If you
* do, then it is advised to just write the SQL code yourself.
*
* You can turn debugging on, by setting $debug to 1 after you include this
* file.
*
* <code>
* check_column('wp_links', 'link_description', 'mediumtext');
* if (check_column($wpdb->comments, 'comment_author', 'tinytext'))
* echo "ok\n";
*
* $error_count = 0;
* $tablename = $wpdb->links;
* // check the column
* if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) {
* $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
* $q = $wpdb->query($ddl);
* }
*
* if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
* $res .= $tablename . ' - ok <br />';
* } else {
* $res .= 'There was a problem with ' . $tablename . '<br />';
* ++$error_count;
* }
* </code>
*
* @package WordPress
* @subpackage Plugins
*/
/** /**
** maybe_create_table() * @global bool $wp_only_load_config
** Create db table if it doesn't exist. * @name $wp_only_load_config
** Returns: true if already exists or on successful completion * @var bool
** false on error * @since unknown
*/ */
$wp_only_load_config = true;
/** Load WordPress Bootstrap */
require_once(dirname(dirname(__FILE__)).'/wp-load.php');
/**
* Turn debugging on or off.
* @global bool|int $debug
* @name $debug
* @var bool|int
* @since unknown
*/
$debug = 0;
if ( ! function_exists('maybe_create_table') ) : if ( ! function_exists('maybe_create_table') ) :
/**
* Create database table, if it doesn't already exist.
*
* @since unknown
* @package WordPress
* @subpackage Plugins
* @uses $wpdb
*
* @param string $table_name Database table name.
* @param string $create_ddl Create database table SQL.
* @return bool False on error, true if already exists or success.
*/
function maybe_create_table($table_name, $create_ddl) { function maybe_create_table($table_name, $create_ddl) {
global $wpdb; global $wpdb;
foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
@ -29,20 +90,29 @@ function maybe_create_table($table_name, $create_ddl) {
} }
endif; endif;
/**
** maybe_add_column()
** Add column to db table if it doesn't exist.
** Returns: true if already exists or on successful completion
** false on error
*/
if ( ! function_exists('maybe_add_column') ) : if ( ! function_exists('maybe_add_column') ) :
/**
* Add column to database table, if column doesn't already exist in table.
*
* @since unknown
* @package WordPress
* @subpackage Plugins
* @uses $wpdb
* @uses $debug
*
* @param string $table_name Database table name
* @param string $column_name Table column name
* @param string $create_ddl SQL to add column to table.
* @return bool False on failure. True, if already exists or was successful.
*/
function maybe_add_column($table_name, $column_name, $create_ddl) { function maybe_add_column($table_name, $column_name, $create_ddl) {
global $wpdb, $debug; global $wpdb, $debug;
foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
if ($debug) echo("checking $column == $column_name<br />"); if ($debug) echo("checking $column == $column_name<br />");
if ($column == $column_name) {
return true; if ($column == $column_name) {
} return true;
}
} }
//didn't find it try to create it. //didn't find it try to create it.
$wpdb->query($create_ddl); $wpdb->query($create_ddl);
@ -57,10 +127,17 @@ function maybe_add_column($table_name, $column_name, $create_ddl) {
endif; endif;
/** /**
** maybe_drop_column() * Drop column from database table, if it exists.
** Drop column from db table if it exists. *
** Returns: true if it doesn't already exist or on successful drop * @since unknown
** false on error * @package WordPress
* @subpackage Plugins
* @uses $wpdb
*
* @param string $table_name Table name
* @param string $column_name Column name
* @param string $drop_ddl SQL statement to drop column.
* @return bool False on failure, true on success or doesn't exist.
*/ */
function maybe_drop_column($table_name, $column_name, $drop_ddl) { function maybe_drop_column($table_name, $column_name, $drop_ddl) {
global $wpdb; global $wpdb;
@ -80,20 +157,30 @@ function maybe_drop_column($table_name, $column_name, $drop_ddl) {
return true; return true;
} }
/** /**
** check_column() * Check column matches criteria.
** Check column matches passed in criteria. *
** Pass in null to skip checking that criteria * Uses the SQL DESC for retrieving the table info for the column. It will help
** Returns: true if it matches * understand the parameters, if you do more research on what column information
** false otherwise * is returned by the SQL statement. Pass in null to skip checking that
** (case sensitive) Column names returned from DESC table are: * criteria.
** Field *
** Type * Column names returned from DESC table are case sensitive and are listed:
** Null * Field
** Key * Type
** Default * Null
** Extra * Key
* Default
* Extra
*
* @param string $table_name Table name
* @param string $col_name Column name
* @param string $col_type Column type
* @param bool $is_null Optional. Check is null.
* @param mixed $key Optional. Key info.
* @param mixed $default Optional. Default value.
* @param mixed $extra Optional. Extra value.
* @return bool True, if matches. False, if not matching.
*/ */
function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) { function check_column($table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null) {
global $wpdb, $debug; global $wpdb, $debug;
@ -102,55 +189,33 @@ function check_column($table_name, $col_name, $col_type, $is_null = null, $key =
foreach ($results as $row ) { foreach ($results as $row ) {
if ($debug > 1) print_r($row); if ($debug > 1) print_r($row);
if ($row->Field == $col_name) {
// got our column, check the params if ($row->Field == $col_name) {
if ($debug) echo ("checking $row->Type against $col_type\n"); // got our column, check the params
if (($col_type != null) && ($row->Type != $col_type)) { if ($debug) echo ("checking $row->Type against $col_type\n");
++$diffs; if (($col_type != null) && ($row->Type != $col_type)) {
} ++$diffs;
if (($is_null != null) && ($row->Null != $is_null)) { }
++$diffs; if (($is_null != null) && ($row->Null != $is_null)) {
} ++$diffs;
if (($key != null) && ($row->Key != $key)) { }
++$diffs; if (($key != null) && ($row->Key != $key)) {
} ++$diffs;
if (($default != null) && ($row->Default != $default)) { }
++$diffs; if (($default != null) && ($row->Default != $default)) {
} ++$diffs;
if (($extra != null) && ($row->Extra != $extra)) { }
++$diffs; if (($extra != null) && ($row->Extra != $extra)) {
} ++$diffs;
if ($diffs > 0) { }
if ($debug) echo ("diffs = $diffs returning false\n"); if ($diffs > 0) {
return false; if ($debug) echo ("diffs = $diffs returning false\n");
} return false;
return true; }
} // end if found our column return true;
} // end if found our column
} }
return false; return false;
} }
/*
echo "<p>testing</p>";
echo "<pre>";
//check_column('wp_links', 'link_description', 'mediumtext');
//if (check_column($wpdb->comments, 'comment_author', 'tinytext'))
// echo "ok\n";
$error_count = 0;
$tablename = $wpdb->links;
// check the column
if (!check_column($wpdb->links, 'link_description', 'varchar(255)'))
{
$ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
$q = $wpdb->query($ddl);
}
if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
$res .= $tablename . ' - ok <br />';
} else {
$res .= 'There was a problem with ' . $tablename . '<br />';
++$error_count;
}
echo "</pre>";
*/
?> ?>

View File

@ -1,14 +1,38 @@
<?php <?php
/**
* WordPress Installer
*
* @package WordPress
* @subpackage Administration
*/
/**
* We are installing WordPress.
*
* @since unknown
* @var bool
*/
define('WP_INSTALLING', true); define('WP_INSTALLING', true);
/** Load WordPress Bootstrap */
require_once('../wp-load.php'); require_once('../wp-load.php');
/** Load WordPress Administration Upgrade API */
require_once('./includes/upgrade.php'); require_once('./includes/upgrade.php');
if (isset($_GET['step'])) if (isset($_GET['step']))
$step = $_GET['step']; $step = $_GET['step'];
else else
$step = 0; $step = 0;
function display_header(){
/**
* Display install header.
*
* @since unknown
* @package WordPress
* @subpackage Installer
*/
function display_header() {
header( 'Content-Type: text/html; charset=utf-8' ); header( 'Content-Type: text/html; charset=utf-8' );
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

View File

@ -1,4 +1,12 @@
<?php <?php
/**
* Add Link Administration Panel.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once('admin.php'); require_once('admin.php');
$title = __('Add Link'); $title = __('Add Link');

View File

@ -1,4 +1,15 @@
<?php <?php
/**
* Manage link category administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for category actions.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once('admin.php'); require_once('admin.php');
wp_reset_vars(array('action', 'cat')); wp_reset_vars(array('action', 'cat'));
@ -31,7 +42,7 @@ case 'delete':
$default_cat_id = get_option('default_link_category'); $default_cat_id = get_option('default_link_category');
// Don't delete the default cats. // Don't delete the default cats.
if ( $cat_ID == $default_cat_id ) if ( $cat_ID == $default_cat_id )
wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));
wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id));

View File

@ -1,7 +1,14 @@
<?php <?php
// Links /**
// Copyright (C) 2002 Mike Little -- mike@zed1.com * Links Import Administration Panel.
*
* @copyright 2002 Mike Little <mike@zed1.com>
* @author Mike Little <mike@zed1.com>
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once('admin.php'); require_once('admin.php');
$parent_file = 'edit.php'; $parent_file = 'edit.php';
$title = __('Import Blogroll'); $title = __('Import Blogroll');
@ -98,6 +105,7 @@ foreach ($categories as $category) {
$opml = file_get_contents($opml_url); $opml = file_get_contents($opml_url);
} }
/** Load OPML Parser */
include_once('link-parse-opml.php'); include_once('link-parse-opml.php');
$link_count = count($names); $link_count = count($names);

View File

@ -1,5 +1,12 @@
<?php <?php
/**
* Link Management Administration Panel.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once ('admin.php'); require_once ('admin.php');
// Handle bulk deletes // Handle bulk deletes

View File

@ -1,4 +1,12 @@
<?php <?php
/**
* Parse OPML XML files and store in globals.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Bootstrap */
require_once('../wp-load.php'); require_once('../wp-load.php');
// columns we wish to find are: link_url, link_name, link_target, link_description // columns we wish to find are: link_url, link_name, link_target, link_description
@ -15,9 +23,24 @@ $opml_map = array('URL' => 'link_url',
$map = $opml_map; $map = $opml_map;
/** /**
** startElement() * XML callback function for the start of a new XML tag.
** Callback function. Called at the start of a new xml tag. *
**/ * @since unknown
* @access private
*
* @uses $updated_timestamp Not used inside function.
* @uses $all_links Not used inside function.
* @uses $map Stores names of attributes to use.
* @global array $names
* @global array $urls
* @global array $targets
* @global array $descriptions
* @global array $feeds
*
* @param mixed $parser XML Parser resource.
* @param string $tagName XML element name.
* @param array $attrs XML element attributes.
*/
function startElement($parser, $tagName, $attrs) { function startElement($parser, $tagName, $attrs) {
global $updated_timestamp, $all_links, $map; global $updated_timestamp, $all_links, $map;
global $names, $urls, $targets, $descriptions, $feeds; global $names, $urls, $targets, $descriptions, $feeds;
@ -41,9 +64,16 @@ function startElement($parser, $tagName, $attrs) {
} }
/** /**
** endElement() * XML callback function that is called at the end of a XML tag.
** Callback function. Called at the end of an xml tag. *
**/ * @since unknown
* @access private
* @package WordPress
* @subpackage Dummy
*
* @param mixed $parser XML Parser resource.
* @param string $tagName XML tag name.
*/
function endElement($parser, $tagName) { function endElement($parser, $tagName) {
// nothing to do. // nothing to do.
} }

View File

@ -1,4 +1,15 @@
<?php <?php
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once ('admin.php'); require_once ('admin.php');
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]')); wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));

View File

@ -1,4 +1,15 @@
<?php <?php
/**
* Manage media uploaded file.
*
* There are many filters in here for media. Plugins can extend functionality
* by hooking into the filters.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once('admin.php'); require_once('admin.php');
wp_enqueue_script('swfupload'); wp_enqueue_script('swfupload');
wp_enqueue_script('swfupload-degrade'); wp_enqueue_script('swfupload-degrade');
@ -11,7 +22,7 @@ if (!current_user_can('upload_files'))
wp_die(__('You do not have permission to upload files.')); wp_die(__('You do not have permission to upload files.'));
// IDs should be integers // IDs should be integers
$ID = isset($ID)? (int) $ID : 0; $ID = isset($ID) ? (int) $ID : 0;
$post_id = isset($post_id)? (int) $post_id : 0; $post_id = isset($post_id)? (int) $post_id : 0;
// Require an ID for the edit screen // Require an ID for the edit screen

View File

@ -1,5 +1,12 @@
<?php <?php
/**
* Media management action handler.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once('admin.php'); require_once('admin.php');
$parent_file = 'edit.php'; $parent_file = 'edit.php';

View File

@ -1,4 +1,18 @@
<?php <?php
/**
* Displays Administration Menu.
*
* @package WordPress
* @subpackage Administration
*/
/**
* The current page.
*
* @global string $self
* @name $self
* @var string
*/
$self = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']); $self = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']);
$self = preg_replace('|^.*/plugins/|i', '', $self); $self = preg_replace('|^.*/plugins/|i', '', $self);

View File

@ -1,9 +1,23 @@
<?php <?php
// This array constructs the admin menu bar. /**
// * Build Administration Menu.
// Menu item name *
// The minimum level the user needs to access the item: between 0 and 10 * @package WordPress
// The URL of the item's file * @subpackage Administration
*/
/**
* Constructs the admin menu bar.
*
* The elements in the array are :
* 0: Menu item name
* 1: Minimum level or capability required.
* 2: The URL of the item's file
*
* @global array $menu
* @name $menu
* @var array
*/
$menu[0] = array(__('Dashboard'), 'read', 'index.php'); $menu[0] = array(__('Dashboard'), 'read', 'index.php');
if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false) if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false)

View File

@ -1,4 +1,12 @@
<?php <?php
/**
* Comment Moderation Administration Panel.
*
* Redirects to edit-comments.php?comment_status=moderated.
*
* @package WordPress
* @subpackage Administration
*/
require_once('../wp-load.php'); require_once('../wp-load.php');
wp_redirect('edit-comments.php?comment_status=moderated'); wp_redirect('edit-comments.php?comment_status=moderated');
?> ?>

View File

@ -1,4 +1,16 @@
<?php wp_reset_vars(array('action', 'standalone', 'option_group_id')); ?> <?php
/**
* WordPress Options Header.
*
* Resets variables: 'action', 'standalone', and 'option_group_id'. Displays
* updated message, if updated variable is part of the URL query.
*
* @package WordPress
* @subpackage Administration
*/
wp_reset_vars(array('action', 'standalone', 'option_group_id'));
?>
<?php if (isset($_GET['updated'])) : ?> <?php if (isset($_GET['updated'])) : ?>
<div id="message" class="updated fade"><p><strong><?php _e('Settings saved.') ?></strong></p></div> <div id="message" class="updated fade"><p><strong><?php _e('Settings saved.') ?></strong></p></div>

View File

@ -1,4 +1,12 @@
<?php <?php
/**
* Privacy Options Settings Administration Panel.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once('./admin.php'); require_once('./admin.php');
$title = __('Privacy Settings'); $title = __('Privacy Settings');

View File

@ -1,4 +1,12 @@
<?php <?php
/**
* New Post Administration Panel.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Administration Bootstrap */
require_once('admin.php'); require_once('admin.php');
$title = __('Create New Post'); $title = __('Create New Post');
$parent_file = 'post-new.php'; $parent_file = 'post-new.php';

View File

@ -1,4 +1,19 @@
<?php <?php
/**
* User Profile Administration Panel.
*
* @package WordPress
* @subpackage Administration
*/
/**
* This is a profile page.
*
* @since unknown
* @var bool
*/
define('IS_PROFILE_PAGE', true); define('IS_PROFILE_PAGE', true);
/** Load User Editing Page */
require_once('user-edit.php'); require_once('user-edit.php');
?> ?>

View File

@ -1,4 +1,20 @@
<?php <?php
/**
* Retrieves and creates the wp-config.php file.
*
* The permissions for the base directory must allow for writing files in order
* for the wp-config.php to be created using this page.
*
* @package WordPress
* @subpackage Administration
*/
/**
* We are installing.
*
* @since unknown
* @package WordPress
*/
define('WP_INSTALLING', true); define('WP_INSTALLING', true);
//These three defines are required to allow us to use require_wp_db() to load the database class while being wp-content/wp-db.php aware //These three defines are required to allow us to use require_wp_db() to load the database class while being wp-content/wp-db.php aware
define('ABSPATH', dirname(dirname(__FILE__)).'/'); define('ABSPATH', dirname(dirname(__FILE__)).'/');
@ -30,7 +46,14 @@ if (isset($_GET['step']))
else else
$step = 0; $step = 0;
function display_header(){ /**
* Display setup wp-config.php file header.
*
* @since unknown
* @package WordPress
* @subpackage Installer_WP_Config
*/
function display_header() {
header( 'Content-Type: text/html; charset=utf-8' ); header( 'Content-Type: text/html; charset=utf-8' );
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

View File

@ -1,5 +1,21 @@
<?php <?php
/**
* Send blog links to pingomatic.com to update.
*
* You can disable this feature by deleting the option 'use_linksupdate' or
* setting the option to false. If no links exist, then no links are sent.
*
* Snoopy is included, but is not used. Fsockopen() is used instead to send link
* URLs.
*
* @package WordPress
* @subpackage Administration
*/
/** Load WordPress Bootstrap */
require_once('../wp-load.php'); require_once('../wp-load.php');
/** Load Snoopy HTTP Client class */
require_once( ABSPATH . 'wp-includes/class-snoopy.php'); require_once( ABSPATH . 'wp-includes/class-snoopy.php');
if ( !get_option('use_linksupdate') ) if ( !get_option('use_linksupdate') )

View File

@ -1,5 +1,13 @@
<?php <?php
// Deprecated. Use includes/upgrade.php. /**
* WordPress Upgrade Functions. Old file, must not be used. Include
* wp-admin/includes/upgrade.php instead.
*
* @deprecated 2.5
* @package WordPress
* @subpackage Administration
*/
_deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/upgrade.php' ); _deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/upgrade.php' );
require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
?> ?>

View File

@ -1,7 +1,22 @@
<?php <?php
/**
* Upgrade WordPress Page.
*
* @package WordPress
* @subpackage Administration
*/
/**
* We are upgrading WordPress.
*
* @since unknown
* @var bool
*/
define('WP_INSTALLING', true); define('WP_INSTALLING', true);
/** Load WordPress Bootstrap */
require('../wp-load.php'); require('../wp-load.php');
timer_start(); timer_start();
require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); require_once(ABSPATH . 'wp-admin/includes/upgrade.php');