phpdoc for wp-admin/includes from jacobsantos. see #7527

git-svn-id: http://svn.automattic.com/wordpress/trunk@8912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-09-17 00:40:10 +00:00
parent 86db7961b7
commit e3f6b2b271
9 changed files with 549 additions and 127 deletions

View File

@@ -1,8 +1,28 @@
<?php
/**
* WordPress Export Administration API
*
* @package WordPress
* @subpackage Administration
*/
// version number for the export format. bump this when something changes that might affect compatibility.
/**
* Version number for the export format.
*
* Bump this when something changes that might affect compatibility.
*
* @since unknown
* @var string
*/
define('WXR_VERSION', '1.0');
/**
* {@internal Missing Short Description}}
*
* @since unknown
*
* @param unknown_type $author
*/
function export_wp($author='') {
global $wpdb, $post_ids, $post;
@@ -26,6 +46,13 @@ $post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts $where ORDER BY post_dat
$categories = (array) get_categories('get=all');
$tags = (array) get_tags('get=all');
/**
* {@internal Missing Short Description}}
*
* @since unknown
*
* @param unknown_type $categories
*/
function wxr_missing_parents($categories) {
if ( !is_array($categories) || empty($categories) )
return array();
@@ -61,6 +88,13 @@ while ( ( $cat = array_shift($categories) ) && ++$pass < $passes ) {
}
unset($categories);
/**
* Place string in CDATA tag.
*
* @since unknown
*
* @param string $str String to place in XML CDATA tag.
*/
function wxr_cdata($str) {
if ( seems_utf8($str) == false )
$str = utf8_encode($str);
@@ -72,6 +106,13 @@ function wxr_cdata($str) {
return $str;
}
/**
* {@internal Missing Short Description}}
*
* @since unknown
*
* @return string Site URL.
*/
function wxr_site_url() {
global $current_site;
@@ -85,6 +126,13 @@ function wxr_site_url() {
}
}
/**
* {@internal Missing Short Description}}
*
* @since unknown
*
* @param object $c Category Object
*/
function wxr_cat_name($c) {
if ( empty($c->name) )
return;
@@ -92,6 +140,13 @@ function wxr_cat_name($c) {
echo '<wp:cat_name>' . wxr_cdata($c->name) . '</wp:cat_name>';
}
/**
* {@internal Missing Short Description}}
*
* @since unknown
*
* @param object $c Category Object
*/
function wxr_category_description($c) {
if ( empty($c->description) )
return;
@@ -99,6 +154,13 @@ function wxr_category_description($c) {
echo '<wp:category_description>' . wxr_cdata($c->description) . '</wp:category_description>';
}
/**
* {@internal Missing Short Description}}
*
* @since unknown
*
* @param object $t Tag Object
*/
function wxr_tag_name($t) {
if ( empty($t->name) )
return;
@@ -106,6 +168,13 @@ function wxr_tag_name($t) {
echo '<wp:tag_name>' . wxr_cdata($t->name) . '</wp:tag_name>';
}
/**
* {@internal Missing Short Description}}
*
* @since unknown
*
* @param object $t Tag Object
*/
function wxr_tag_description($t) {
if ( empty($t->description) )
return;
@@ -113,6 +182,11 @@ function wxr_tag_description($t) {
echo '<wp:tag_description>' . wxr_cdata($t->description) . '</wp:tag_description>';
}
/**
* {@internal Missing Short Description}}
*
* @since unknown
*/
function wxr_post_taxonomy() {
$categories = get_the_category();
$tags = get_the_tags();