@@ -1496,6 +1804,14 @@ function type_form_file() {
}
// support a GET parameter for disabling the flash uploader
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $flash
+ * @return unknown
+ */
function media_upload_use_flash($flash) {
if ( array_key_exists('flash', $_REQUEST) )
$flash = !empty($_REQUEST['flash']);
@@ -1504,6 +1820,11 @@ function media_upload_use_flash($flash) {
add_filter('flash_uploader', 'media_upload_use_flash');
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ */
function media_upload_flash_bypass() {
echo '
';
printf( __('You are using the Flash uploader. Problems? Try the Browser uploader instead.'), clean_url(add_query_arg('flash', 0)) );
@@ -1512,6 +1833,11 @@ function media_upload_flash_bypass() {
add_action('post-flash-upload-ui', 'media_upload_flash_bypass');
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ */
function media_upload_html_bypass() {
echo '
';
if ( array_key_exists('flash', $_REQUEST) )
@@ -1528,6 +1854,14 @@ add_action('post-flash-upload-ui', 'media_upload_flash_bypass');
add_action('post-html-upload-ui', 'media_upload_html_bypass');
// make sure the GET parameter sticks when we submit a form
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $url
+ * @return unknown
+ */
function media_upload_bypass_url($url) {
if ( array_key_exists('flash', $_REQUEST) )
$url = add_query_arg('flash', intval($_REQUEST['flash']));
diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php
index ba7e8ff39f..f08103e950 100644
--- a/wp-admin/includes/misc.php
+++ b/wp-admin/includes/misc.php
@@ -1,12 +1,32 @@
get_error_data() )
@@ -171,14 +239,44 @@ function show_message($message) {
}
/* Whitelist functions */
+
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $option_group
+ * @param unknown_type $option_name
+ * @param unknown_type $sanitize_callback
+ * @return unknown
+ */
function register_setting($option_group, $option_name, $sanitize_callback = '') {
return add_option_update_handler($option_group, $option_name, $sanitize_callback);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $option_group
+ * @param unknown_type $option_name
+ * @param unknown_type $sanitize_callback
+ * @return unknown
+ */
function unregister_setting($option_group, $option_name, $sanitize_callback = '') {
return remove_option_update_handler($option_group, $option_name, $sanitize_callback);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $option_group
+ * @param unknown_type $option_name
+ * @param unknown_type $sanitize_callback
+ */
function add_option_update_handler($option_group, $option_name, $sanitize_callback = '') {
global $new_whitelist_options;
$new_whitelist_options[ $option_group ][] = $option_name;
@@ -186,6 +284,15 @@ function add_option_update_handler($option_group, $option_name, $sanitize_callba
add_filter( "sanitize_option_{$option_name}", $sanitize_callback );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $option_group
+ * @param unknown_type $option_name
+ * @param unknown_type $sanitize_callback
+ */
function remove_option_update_handler($option_group, $option_name, $sanitize_callback = '') {
global $new_whitelist_options;
$pos = array_search( $option_name, $new_whitelist_options );
@@ -195,6 +302,14 @@ function remove_option_update_handler($option_group, $option_name, $sanitize_cal
remove_filter( "sanitize_option_{$option_name}", $sanitize_callback );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $options
+ * @return unknown
+ */
function option_update_filter( $options ) {
global $new_whitelist_options;
@@ -205,6 +320,15 @@ function option_update_filter( $options ) {
}
add_filter( 'whitelist_options', 'option_update_filter' );
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $new_options
+ * @param unknown_type $options
+ * @return unknown
+ */
function add_option_whitelist( $new_options, $options = '' ) {
if( $options == '' ) {
global $whitelist_options;
@@ -221,6 +345,15 @@ function add_option_whitelist( $new_options, $options = '' ) {
return $whitelist_options;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $del_options
+ * @param unknown_type $options
+ * @return unknown
+ */
function remove_option_whitelist( $del_options, $options = '' ) {
if( $options == '' ) {
global $whitelist_options;
diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php
index c36c554f07..a6df0bfae8 100644
--- a/wp-admin/includes/post.php
+++ b/wp-admin/includes/post.php
@@ -1,4 +1,10 @@
$updated, 'skipped' => $skipped, 'locked' => $locked );
}
-// Default post information to use when populating the "Write Post" form.
+/**
+ * Default post information to use when populating the "Write Post" form.
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function get_default_post_to_edit() {
if ( !empty( $_REQUEST['post_title'] ) )
$post_title = wp_specialchars( stripslashes( $_REQUEST['post_title'] ));
@@ -306,13 +333,27 @@ function get_default_post_to_edit() {
return $post;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function get_default_page_to_edit() {
$page = get_default_post_to_edit();
$page->post_type = 'page';
return $page;
}
-// Get an existing post and format it for editing.
+/**
+ * Get an existing post and format it for editing.
+ *
+ * @since unknown
+ *
+ * @param unknown_type $id
+ * @return unknown
+ */
function get_post_to_edit( $id ) {
$post = get_post( $id, OBJECT, 'edit' );
@@ -323,6 +364,16 @@ function get_post_to_edit( $id ) {
return $post;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $title
+ * @param unknown_type $content
+ * @param unknown_type $post_date
+ * @return unknown
+ */
function post_exists($title, $content = '', $post_date = '') {
global $wpdb;
@@ -338,7 +389,13 @@ function post_exists($title, $content = '', $post_date = '') {
return 0;
}
-// Creates a new post from the "Write Post" form using $_POST information.
+/**
+ * Creates a new post from the "Write Post" form using $_POST information.
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function wp_write_post() {
global $user_ID;
@@ -405,6 +462,13 @@ function wp_write_post() {
return $post_ID;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function write_post() {
$result = wp_write_post();
if( is_wp_error( $result ) )
@@ -417,6 +481,14 @@ function write_post() {
// Post Meta
//
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $post_ID
+ * @return unknown
+ */
function add_meta( $post_ID ) {
global $wpdb;
$post_ID = (int) $post_ID;
@@ -451,6 +523,14 @@ function add_meta( $post_ID ) {
return false;
} // add_meta
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $mid
+ * @return unknown
+ */
function delete_meta( $mid ) {
global $wpdb;
$mid = (int) $mid;
@@ -461,7 +541,13 @@ function delete_meta( $mid ) {
return $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id = %d", $mid) );
}
-// Get a list of previously defined keys
+/**
+ * Get a list of previously defined keys.
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function get_meta_keys() {
global $wpdb;
@@ -474,6 +560,14 @@ function get_meta_keys() {
return $keys;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $mid
+ * @return unknown
+ */
function get_post_meta_by_id( $mid ) {
global $wpdb;
$mid = (int) $mid;
@@ -484,7 +578,16 @@ function get_post_meta_by_id( $mid ) {
return $meta;
}
-// Some postmeta stuff
+/**
+ * {@internal Missing Short Description}}
+ *
+ * Some postmeta stuff.
+ *
+ * @since unknown
+ *
+ * @param unknown_type $postid
+ * @return unknown
+ */
function has_meta( $postid ) {
global $wpdb;
@@ -494,6 +597,16 @@ function has_meta( $postid ) {
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $meta_id
+ * @param unknown_type $meta_key
+ * @param unknown_type $meta_value
+ * @return unknown
+ */
function update_meta( $meta_id, $meta_key, $meta_value ) {
global $wpdb;
@@ -518,7 +631,15 @@ function update_meta( $meta_id, $meta_key, $meta_value ) {
// Private
//
-// Replace hrefs of attachment anchors with up-to-date permalinks.
+/**
+ * Replace hrefs of attachment anchors with up-to-date permalinks.
+ *
+ * @since unknown
+ * @access private
+ *
+ * @param unknown_type $post_ID
+ * @return unknown
+ */
function _fix_attachment_links( $post_ID ) {
$post = & get_post( $post_ID, ARRAY_A );
@@ -559,7 +680,16 @@ function _fix_attachment_links( $post_ID ) {
return wp_update_post( $post);
}
-// Move child posts to a new parent
+/**
+ * Move child posts to a new parent.
+ *
+ * @since unknown
+ * @access private
+ *
+ * @param unknown_type $old_ID
+ * @param unknown_type $new_ID
+ * @return unknown
+ */
function _relocate_children( $old_ID, $new_ID ) {
global $wpdb;
$old_ID = (int) $old_ID;
@@ -567,12 +697,28 @@ function _relocate_children( $old_ID, $new_ID ) {
return $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_parent = %d WHERE post_parent = %d", $new_ID, $old_ID) );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $type
+ * @return unknown
+ */
function get_available_post_statuses($type = 'post') {
$stati = wp_count_posts($type);
return array_keys(get_object_vars($stati));
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $q
+ * @return unknown
+ */
function wp_edit_posts_query( $q = false ) {
global $wpdb;
if ( false === $q )
@@ -613,6 +759,14 @@ function wp_edit_posts_query( $q = false ) {
return array($post_stati, $avail_post_stati);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $type
+ * @return unknown
+ */
function get_available_post_mime_types($type = 'attachment') {
global $wpdb;
@@ -620,6 +774,14 @@ function get_available_post_mime_types($type = 'attachment') {
return $types;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $q
+ * @return unknown
+ */
function wp_edit_attachments_query( $q = false ) {
global $wpdb;
if ( false === $q )
@@ -647,6 +809,15 @@ function wp_edit_attachments_query( $q = false ) {
return array($post_mime_types, $avail_post_mime_types);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $id
+ * @param unknown_type $page
+ * @return unknown
+ */
function postbox_classes( $id, $page ) {
$current_user = wp_get_current_user();
if ( $closed = get_usermeta( $current_user->ID, 'closedpostboxes_'.$page ) ) {
@@ -658,6 +829,16 @@ function postbox_classes( $id, $page ) {
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $id
+ * @param unknown_type $title
+ * @param unknown_type $name
+ * @return unknown
+ */
function get_sample_permalink($id, $title=null, $name = null) {
$post = &get_post($id);
if (!$post->ID) {
@@ -701,6 +882,16 @@ function get_sample_permalink($id, $title=null, $name = null) {
return $permalink;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $id
+ * @param unknown_type $new_title
+ * @param unknown_type $new_slug
+ * @return unknown
+ */
function get_sample_permalink_html($id, $new_title=null, $new_slug=null) {
$post = &get_post($id);
list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
@@ -720,8 +911,14 @@ function get_sample_permalink_html($id, $new_title=null, $new_slug=null) {
return $return;
}
-// false: not locked or locked by current user
-// int: user ID of user with lock
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $post_id
+ * @return bool|int False: not locked or locked by current user. Int: user ID of user with lock.
+ */
function wp_check_post_lock( $post_id ) {
global $current_user;
@@ -738,6 +935,14 @@ function wp_check_post_lock( $post_id ) {
return false;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $post_id
+ * @return unknown
+ */
function wp_set_post_lock( $post_id ) {
global $current_user;
if ( !$post = get_post( $post_id ) )
@@ -754,11 +959,11 @@ function wp_set_post_lock( $post_id ) {
}
/**
- * wp_create_post_autosave() - creates autosave data for the specified post from $_POST data
+ * Creates autosave data for the specified post from $_POST data.
*
* @package WordPress
- * @subpackage Post Revisions
- * @since 2.6
+ * @subpackage Post_Revisions
+ * @since 2.6.0
*
* @uses _wp_translate_postdata()
* @uses _wp_post_revision_fields()
@@ -780,10 +985,10 @@ function wp_create_post_autosave( $post_id ) {
}
/**
- * wp_teeny_mce() - adds a trimmed down version of the tinyMCE editor used on the Write -> Post screen.
+ * Adds a trimmed down version of the tinyMCE editor used on the Write -> Post screen.
*
* @package WordPress
- * @since 2.6
+ * @since 2.6.0
*/
function wp_teeny_mce( $args = null ) {
if ( !user_can_richedit() )
diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php
index b62a4a5db5..1461dcd994 100644
--- a/wp-admin/includes/schema.php
+++ b/wp-admin/includes/schema.php
@@ -1,6 +1,14 @@
has_cap( 'collation' ) ) {
$charset_collate .= " COLLATE $wpdb->collate";
}
-$wp_queries="CREATE TABLE $wpdb->terms (
+/** Create WordPress database tables SQL */
+$wp_queries = "CREATE TABLE $wpdb->terms (
term_id bigint(20) NOT NULL auto_increment,
name varchar(200) NOT NULL default '',
slug varchar(200) NOT NULL default '',
@@ -152,6 +161,13 @@ CREATE TABLE $wpdb->usermeta (
KEY meta_key (meta_key)
) $charset_collate;";
+/**
+ * Create WordPress options and set the default values.
+ *
+ * @since unknown
+ * @uses $wpdb
+ * @uses $wp_db_version
+ */
function populate_options() {
global $wpdb, $wp_db_version;
@@ -280,6 +296,11 @@ function populate_options() {
endforeach;
}
+/**
+ * Execute WordPress role creation for the various WordPress versions.
+ *
+ * @since unknown (2.0.0)
+ */
function populate_roles() {
populate_roles_160();
populate_roles_210();
@@ -289,6 +310,11 @@ function populate_roles() {
populate_roles_270();
}
+/**
+ * Create the roles for WordPress 2.0
+ *
+ * @since 2.0.0
+ */
function populate_roles_160() {
// Add roles
@@ -384,6 +410,11 @@ function populate_roles_160() {
$role->add_cap('level_0');
}
+/**
+ * Create and modify WordPress roles for WordPress 2.1.
+ *
+ * @since 2.1.0
+ */
function populate_roles_210() {
$roles = array('administrator', 'editor');
foreach ($roles as $role) {
@@ -426,6 +457,11 @@ function populate_roles_210() {
}
}
+/**
+ * Create and modify WordPress roles for WordPress 2.3.
+ *
+ * @since 2.3.0
+ */
function populate_roles_230() {
$role = get_role( 'administrator' );
@@ -434,6 +470,11 @@ function populate_roles_230() {
}
}
+/**
+ * Create and modify WordPress roles for WordPress 2.5.
+ *
+ * @since 2.5.0
+ */
function populate_roles_250() {
$role = get_role( 'administrator' );
@@ -442,6 +483,11 @@ function populate_roles_250() {
}
}
+/**
+ * Create and modify WordPress roles for WordPress 2.6.
+ *
+ * @since 2.6.0
+ */
function populate_roles_260() {
$role = get_role( 'administrator' );
@@ -451,6 +497,11 @@ function populate_roles_260() {
}
}
+/**
+ * Create and modify WordPress roles for WordPress 2.7.
+ *
+ * @since 2.7.0
+ */
function populate_roles_270() {
$role = get_role( 'administrator' );
diff --git a/wp-admin/includes/taxonomy.php b/wp-admin/includes/taxonomy.php
index a0b95a7af6..667ff04427 100644
--- a/wp-admin/includes/taxonomy.php
+++ b/wp-admin/includes/taxonomy.php
@@ -1,9 +1,23 @@
$cat_name, 'category_parent' => $parent) );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $categories
+ * @param unknown_type $post_id
+ * @return unknown
+ */
function wp_create_categories($categories, $post_id = '') {
$cat_ids = array ();
foreach ($categories as $category) {
@@ -39,6 +79,14 @@ function wp_create_categories($categories, $post_id = '') {
return $cat_ids;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $cat_ID
+ * @return unknown
+ */
function wp_delete_category($cat_ID) {
$cat_ID = (int) $cat_ID;
$default = get_option('default_category');
@@ -50,6 +98,15 @@ function wp_delete_category($cat_ID) {
return wp_delete_term($cat_ID, 'category', array('default' => $default));
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $catarr
+ * @param unknown_type $wp_error
+ * @return unknown
+ */
function wp_insert_category($catarr, $wp_error = false) {
$cat_defaults = array('cat_ID' => 0, 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => '');
$cat_arr = wp_parse_args($cat_arr, $cat_defaults);
@@ -99,6 +156,14 @@ function wp_insert_category($catarr, $wp_error = false) {
return $cat_ID['term_id'];
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $catarr
+ * @return unknown
+ */
function wp_update_category($catarr) {
$cat_ID = (int) $catarr['cat_ID'];
@@ -121,6 +186,14 @@ function wp_update_category($catarr) {
// Tags
//
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $post_id
+ * @return unknown
+ */
function get_tags_to_edit( $post_id ) {
$post_id = (int) $post_id;
if ( !$post_id )
@@ -139,10 +212,26 @@ function get_tags_to_edit( $post_id ) {
return $tags_to_edit;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $tag_name
+ * @return unknown
+ */
function tag_exists($tag_name) {
return is_term($tag_name, 'post_tag');
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $tag_name
+ * @return unknown
+ */
function wp_create_tag($tag_name) {
if ( $id = tag_exists($tag_name) )
return $id;
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 5024a34511..cc95ca0858 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -1,15 +1,43 @@
0);
@@ -72,6 +100,16 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p
echo $output;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $category
+ * @param unknown_type $level
+ * @param unknown_type $name_override
+ * @return unknown
+ */
function _cat_row( $category, $level, $name_override = false ) {
global $class;
@@ -144,6 +182,15 @@ function _cat_row( $category, $level, $name_override = false ) {
return apply_filters('cat_row', $output);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $category
+ * @param unknown_type $name_override
+ * @return unknown
+ */
function link_cat_row( $category, $name_override = false ) {
global $class;
@@ -214,11 +261,27 @@ function link_cat_row( $category, $name_override = false ) {
return apply_filters( 'link_cat_row', $output );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $checked
+ * @param unknown_type $current
+ */
function checked( $checked, $current) {
if ( $checked == $current)
echo ' checked="checked"';
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $selected
+ * @param unknown_type $current
+ */
function selected( $selected, $current) {
if ( $selected == $current)
echo ' selected="selected"';
@@ -228,12 +291,27 @@ function selected( $selected, $current) {
// Category Checklists
//
-// Deprecated. Use wp_link_category_checklist
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ * @deprecated Use {@link wp_link_category_checklist()}
+ * @see wp_link_category_checklist()
+ *
+ * @param unknown_type $default
+ * @param unknown_type $parent
+ * @param unknown_type $popular_ids
+ */
function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
global $post_ID;
wp_category_checklist($post_ID);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ */
class Walker_Category_Checklist extends Walker {
var $tree_type = 'category';
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
@@ -260,6 +338,16 @@ class Walker_Category_Checklist extends Walker {
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $post_id
+ * @param unknown_type $descendants_and_self
+ * @param unknown_type $selected_cats
+ * @param unknown_type $popular_cats
+ */
function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false ) {
$walker = new Walker_Category_Checklist;
$descendants_and_self = (int) $descendants_and_self;
@@ -301,6 +389,17 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select
echo call_user_func_array(array(&$walker, 'walk'), array($categories, 0, $args));
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $taxonomy
+ * @param unknown_type $default
+ * @param unknown_type $number
+ * @param unknown_type $echo
+ * @return unknown
+ */
function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
global $post_ID;
if ( $post_ID )
@@ -329,13 +428,28 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech
return $popular_ids;
}
-// Deprecated. Use wp_link_category_checklist
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ * @deprecated Use {@link wp_link_category_checklist()}
+ * @see wp_link_category_checklist()
+ *
+ * @param unknown_type $default
+ */
function dropdown_link_categories( $default = 0 ) {
global $link_id;
wp_link_category_checklist($link_id);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $link_id
+ */
function wp_link_category_checklist( $link_id = 0 ) {
$default = 1;
@@ -367,6 +481,15 @@ function wp_link_category_checklist( $link_id = 0 ) {
// Returns a single tag row (see tag_rows below)
// Note: this is also used in admin-ajax.php!
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $tag
+ * @param unknown_type $class
+ * @return unknown
+ */
function _tag_row( $tag, $class = '' ) {
$count = number_format_i18n( $tag->count );
$count = ( $count > 0 ) ? "$count" : $count;
@@ -422,6 +545,16 @@ function _tag_row( $tag, $class = '' ) {
// Outputs appropriate rows for the Nth page of the Tag Management screen,
// assuming M tags displayed at a time on the page
// Returns the number of tags displayed
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $page
+ * @param unknown_type $pagesize
+ * @param unknown_type $searchterms
+ * @return unknown
+ */
function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
// Get a page worth of tags
@@ -449,6 +582,13 @@ function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
}
// define the columns to display, the syntax is 'internal name' => 'display name'
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function wp_manage_posts_columns() {
$posts_columns = array();
$posts_columns['cb'] = '';
@@ -471,6 +611,13 @@ function wp_manage_posts_columns() {
}
// define the columns to display, the syntax is 'internal name' => 'display name'
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function wp_manage_media_columns() {
$posts_columns = array();
$posts_columns['cb'] = '';
@@ -488,6 +635,13 @@ function wp_manage_media_columns() {
return $posts_columns;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function wp_manage_pages_columns() {
$posts_columns = array();
$posts_columns['cb'] = '';
@@ -516,6 +670,14 @@ function wp_manage_pages_columns() {
return $posts_columns;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $page
+ * @return unknown
+ */
function get_column_headers($page) {
switch ($page) {
case 'post':
@@ -590,6 +752,14 @@ function get_column_headers($page) {
return $columns;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $type
+ * @param unknown_type $id
+ */
function print_column_headers( $type, $id = true ) {
$columns = get_column_headers( $type );
$hidden = (array) get_user_option( "manage-$type-columns-hidden" );
@@ -626,6 +796,13 @@ function print_column_headers( $type, $id = true ) {
post_type, $post->ID) )
@@ -933,6 +1124,13 @@ function get_inline_data($post) {
echo '';
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $posts
+ */
function post_rows( $posts = array() ) {
global $wp_query, $post, $mode;
@@ -959,6 +1157,15 @@ function post_rows( $posts = array() ) {
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $a_post
+ * @param unknown_type $pending_comments
+ * @param unknown_type $mode
+ */
function _post_row($a_post, $pending_comments, $mode) {
global $post;
static $rowclass;
@@ -1174,6 +1381,14 @@ function _post_row($a_post, $pending_comments, $mode) {
* display one row if the page doesn't have any children
* otherwise, display the row and its children in subsequent rows
*/
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $page
+ * @param unknown_type $level
+ */
function display_page_row( $page, $level = 0 ) {
global $post;
static $rowclass;
@@ -1329,6 +1544,16 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
/*
* displays pages in hierarchical order with paging support
*/
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $pages
+ * @param unknown_type $pagenum
+ * @param unknown_type $per_page
+ * @return unknown
+ */
function page_rows($pages, $pagenum = 1, $per_page = 20) {
global $wpdb;
@@ -1406,6 +1631,18 @@ function page_rows($pages, $pagenum = 1, $per_page = 20) {
* Given a top level page ID, display the nested hierarchy of sub-pages
* together with paging support
*/
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $children_pages
+ * @param unknown_type $count
+ * @param unknown_type $parent
+ * @param unknown_type $level
+ * @param unknown_type $pagenum
+ * @param unknown_type $per_page
+ */
function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_page ) {
if ( ! isset( $children_pages[$parent] ) )
@@ -1448,6 +1685,16 @@ function _page_rows( &$children_pages, &$count, $parent, $level, $pagenum, $per_
unset( $children_pages[$parent] ); //required in order to keep track of orphans
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $user_object
+ * @param unknown_type $style
+ * @param unknown_type $role
+ * @return unknown
+ */
function user_row( $user_object, $style = '', $role = '' ) {
global $wp_roles;
@@ -1531,6 +1778,19 @@ function user_row( $user_object, $style = '', $role = '' ) {
return $r;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $status
+ * @param unknown_type $s
+ * @param unknown_type $start
+ * @param unknown_type $num
+ * @param unknown_type $post
+ * @param unknown_type $type
+ * @return unknown
+ */
function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) {
global $wpdb;
@@ -1583,6 +1843,16 @@ function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0
return array($comments, $total);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $comment_id
+ * @param unknown_type $mode
+ * @param unknown_type $comment_status
+ * @param unknown_type $checkbox
+ */
function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true ) {
global $comment, $post;
$comment = get_comment( $comment_id );
@@ -1707,6 +1977,15 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
echo "\n";
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $position
+ * @param unknown_type $checkbox
+ * @param unknown_type $mode
+ */
function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single') {
global $current_user;
@@ -1750,6 +2029,18 @@ function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single')
0) );
@@ -1771,6 +2062,13 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $meta
+ */
function list_meta( $meta ) {
// Exit if no meta
if (!$meta ) {
@@ -1793,6 +2091,15 @@ function list_meta( $meta ) {
echo "\n\t
";
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $entry
+ * @param unknown_type $count
+ * @return unknown
+ */
function _list_meta_row( $entry, &$count ) {
static $update_nonce = false;
if ( !$update_nonce )
@@ -1835,6 +2142,11 @@ function _list_meta_row( $entry, &$count ) {
return $r;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ */
function meta_form() {
global $wpdb;
$limit = (int) apply_filters( 'postmeta_form_limit', 30 );
@@ -1881,6 +2193,16 @@ function meta_form() {
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $edit
+ * @param unknown_type $for_post
+ * @param unknown_type $tab_index
+ * @param unknown_type $multi
+ */
function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
global $wp_locale, $post, $comment;
@@ -1931,6 +2253,13 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) );
@@ -1969,6 +2308,11 @@ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ */
function browse_happy() {
$getit = __( 'WordPress recommends a better browser' );
echo '
@@ -1979,6 +2323,14 @@ function browse_happy() {
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
add_action( 'in_admin_footer', 'browse_happy' );
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $id
+ * @return unknown
+ */
function the_attachment_links( $id = false ) {
$id = (int) $id;
$post = & get_post( $id );
@@ -2022,6 +2374,13 @@ function the_attachment_links( $id = false ) {
'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' );
$log = log( $bytes, 1024 );
@@ -2056,6 +2431,13 @@ function wp_convert_bytes_to_hr( $bytes ) {
return $size . $units[$power];
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function wp_max_upload_size() {
$u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
$p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
@@ -2063,6 +2445,13 @@ function wp_max_upload_size() {
return $bytes;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $action
+ */
function wp_import_upload_form( $action ) {
$bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
$size = wp_convert_bytes_to_hr( $bytes );
@@ -2082,6 +2471,11 @@ function wp_import_upload_form( $action ) {
post_name); // just in case
@@ -2090,16 +2484,16 @@ function wp_remember_old_slug() {
}
/**
- * add_meta_box() - Add a meta box to an edit form
+ * Add a meta box to an edit form.
*
- * @since 2.5
+ * @since 2.5.0
*
* @param string $id String for use in the 'id' attribute of tags.
- * @param string $title Title of the meta box
+ * @param string $title Title of the meta box.
* @param string $callback Function that fills the box with the desired content. The function should echo its output.
- * @param string $page The type of edit page on which to show the box (post, page, link)
- * @param string $context The context within the page where the boxes should show ('normal', 'advanced')
- * @param string $priority The priority within the context where the boxes should show ('high', 'low')
+ * @param string $page The type of edit page on which to show the box (post, page, link).
+ * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
+ * @param string $priority The priority within the context where the boxes should show ('high', 'low').
*/
function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default') {
global $wp_meta_boxes;
@@ -2151,6 +2545,16 @@ function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $pri
$wp_meta_boxes[$page][$context][$priority][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $page
+ * @param unknown_type $context
+ * @param unknown_type $object
+ * @return unknown
+ */
function do_meta_boxes($page, $context, $object) {
global $wp_meta_boxes;
static $already_sorted = false;
@@ -2202,13 +2606,13 @@ function do_meta_boxes($page, $context, $object) {
}
/**
- * remove_meta_box() - Remove a meta box from an edit form
+ * Remove a meta box from an edit form.
*
- * @since 2.6
+ * @since 2.6.0
*
* @param string $id String for use in the 'id' attribute of tags.
- * @param string $page The type of edit page on which to show the box (post, page, link)
- * @param string $context The context within the page where the boxes should show ('normal', 'advanced')
+ * @param string $page The type of edit page on which to show the box (post, page, link).
+ * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
*/
function remove_meta_box($id, $page, $context) {
global $wp_meta_boxes;
@@ -2224,6 +2628,13 @@ function remove_meta_box($id, $page, $context) {
$wp_meta_boxes[$page][$context][$priority][$id] = false;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $page
+ */
function meta_box_prefs($page) {
global $wp_meta_boxes;
@@ -2250,14 +2661,14 @@ function meta_box_prefs($page) {
}
/**
- * Add a new section to a settings page
+ * Add a new section to a settings page.
*
- * @since 2.7
+ * @since 2.7.0
*
* @param string $id String for use in the 'id' attribute of tags.
- * @param string $title Title of the section
+ * @param string $title Title of the section.
* @param string $callback Function that fills the section with the desired content. The function should echo its output.
- * @param string $page The type of settings page on which to show the section (general, reading, writing, ...)
+ * @param string $page The type of settings page on which to show the section (general, reading, writing, ...).
*/
function add_settings_section($id, $title, $callback, $page) {
global $wp_settings_sections;
@@ -2273,15 +2684,15 @@ function add_settings_section($id, $title, $callback, $page) {
}
/**
- * Add a new field to a settings page
+ * Add a new field to a settings page.
*
- * @since 2.7
+ * @since 2.7.0
*
* @param string $id String for use in the 'id' attribute of tags.
- * @param string $title Title of the field
+ * @param string $title Title of the field.
* @param string $callback Function that fills the field with the desired content. The function should echo its output.
- * @param string $page The type of settings page on which to show the field (general, reading, writing, ...)
- * @param string $section The section of the settingss page in which to show the box (default, ...)
+ * @param string $page The type of settings page on which to show the field (general, reading, writing, ...).
+ * @param string $section The section of the settingss page in which to show the box (default, ...).
* @param array $args Additional arguments
*/
function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) {
@@ -2297,6 +2708,13 @@ function add_settings_field($id, $title, $callback, $page, $section = 'default',
$wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $page
+ */
function do_settings_sections($page) {
global $wp_settings_sections, $wp_settings_fields;
@@ -2314,6 +2732,14 @@ function do_settings_sections($page) {
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $page
+ * @param unknown_type $section
+ */
function do_settings_fields($page, $section) {
global $wp_settings_fields;
@@ -2333,6 +2759,13 @@ function do_settings_fields($page, $section) {
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $page
+ */
function manage_columns_prefs($page) {
$columns = get_column_headers($page);
@@ -2354,6 +2787,13 @@ function manage_columns_prefs($page) {
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $found_action
+ */
function find_posts_div($found_action = '') {
?>
@@ -2484,8 +2924,8 @@ function find_posts_div($found_action = '') {
/**
* Display the post password.
*
- * The password is passed through {@link attribute_escape()}
- * to ensure that it is safe for placing in an html attribute.
+ * The password is passed through {@link attribute_escape()} to ensure that it
+ * is safe for placing in an html attribute.
*
* @uses attribute_escape
* @since 2.7.0
@@ -2495,6 +2935,11 @@ function the_post_password() {
if ( isset( $post->post_password ) ) echo attribute_escape( $post->post_password );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ */
function favorite_actions() {
$actions = array(
'page-new.php' => __('Add New Page'),
@@ -2512,13 +2957,15 @@ function favorite_actions() {
}
echo "
\n";
}
+
/**
* Get the post title.
*
- * The post title is fetched and if it is blank then a default string is returned.
+ * The post title is fetched and if it is blank then a default string is
+ * returned.
*
* @since 2.7.0
- * @param int $id The post id. If not supplied the global $post is used..
+ * @param int $id The post id. If not supplied the global $post is used.
*
*/
function _draft_or_post_title($post_id = 0)
@@ -2528,4 +2975,5 @@ function _draft_or_post_title($post_id = 0)
$title = __('(no title)');
return $title;
}
+
?>
diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php
index 18a77b37fd..8b883e23ab 100644
--- a/wp-admin/includes/theme.php
+++ b/wp-admin/includes/theme.php
@@ -1,5 +1,18 @@
user_email;
@@ -132,6 +180,15 @@ http://wordpress.org/
endif;
if ( !function_exists('wp_upgrade') ) :
+/**
+ * Run WordPress Upgrade functions.
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @return null
+ */
function wp_upgrade() {
global $wp_current_db_version, $wp_db_version;
@@ -141,7 +198,7 @@ function wp_upgrade() {
if ( $wp_db_version == $wp_current_db_version )
return;
- if(!is_blog_installed())
+ if( ! is_blog_installed() )
return;
wp_check_mysql_version();
@@ -152,7 +209,13 @@ function wp_upgrade() {
}
endif;
-// Functions to be called in install and upgrade scripts
+/**
+ * Functions to be called in install and upgrade scripts.
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ */
function upgrade_all() {
global $wp_current_db_version, $wp_db_version, $wp_rewrite;
$wp_current_db_version = __get_option('db_version');
@@ -220,6 +283,11 @@ function upgrade_all() {
update_option('db_version', $wp_db_version);
}
+/**
+ * Execute changes made in WordPress 1.0.
+ *
+ * @since 1.0.0
+ */
function upgrade_100() {
global $wpdb;
@@ -242,7 +310,6 @@ function upgrade_100() {
}
}
-
$wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/')
WHERE option_name LIKE 'links_rating_image%'
AND option_value LIKE 'wp-links/links-images/%'");
@@ -272,6 +339,11 @@ function upgrade_100() {
endif;
}
+/**
+ * Execute changes made in WordPress 1.0.1.
+ *
+ * @since 1.0.1
+ */
function upgrade_101() {
global $wpdb;
@@ -285,7 +357,11 @@ function upgrade_101() {
add_clean_index($wpdb->links , 'link_visible');
}
-
+/**
+ * Execute changes made in WordPress 1.2.
+ *
+ * @since 1.2.0
+ */
function upgrade_110() {
global $wpdb;
@@ -305,7 +381,6 @@ function upgrade_110() {
}
}
-
// Get the GMT offset, we'll use that later on
$all_options = get_alloptions_110();
@@ -342,6 +417,11 @@ function upgrade_110() {
}
+/**
+ * Execute changes made in WordPress 1.5.
+ *
+ * @since 1.5.0
+ */
function upgrade_130() {
global $wpdb;
@@ -419,6 +499,11 @@ function upgrade_130() {
make_site_theme();
}
+/**
+ * Execute changes made in WordPress 2.0.
+ *
+ * @since 2.0.0
+ */
function upgrade_160() {
global $wpdb, $wp_current_db_version;
@@ -497,6 +582,11 @@ function upgrade_160() {
}
}
+/**
+ * Execute changes made in WordPress 2.1.
+ *
+ * @since 2.1.0
+ */
function upgrade_210() {
global $wpdb, $wp_current_db_version;
@@ -536,6 +626,11 @@ function upgrade_210() {
}
}
+/**
+ * Execute changes made in WordPress 2.3.
+ *
+ * @since 2.3.0
+ */
function upgrade_230() {
global $wp_current_db_version, $wpdb;
@@ -706,6 +801,11 @@ function upgrade_230() {
}
}
+/**
+ * Remove old options from the database.
+ *
+ * @since 2.3.0
+ */
function upgrade_230_options_table() {
global $wpdb;
$old_options_fields = array( 'option_can_override', 'option_type', 'option_width', 'option_height', 'option_description', 'option_admin_level' );
@@ -715,6 +815,11 @@ function upgrade_230_options_table() {
$wpdb->show_errors();
}
+/**
+ * Remove old categories, link2cat, and post2cat database tables.
+ *
+ * @since 2.3.0
+ */
function upgrade_230_old_tables() {
global $wpdb;
$wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'categories');
@@ -722,13 +827,22 @@ function upgrade_230_old_tables() {
$wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'post2cat');
}
+/**
+ * Upgrade old slugs made in version 2.2.
+ *
+ * @since 2.2.0
+ */
function upgrade_old_slugs() {
// upgrade people who were using the Redirect Old Slugs plugin
global $wpdb;
$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'");
}
-
+/**
+ * Execute changes made in WordPress 2.5.0.
+ *
+ * @since 2.5.0
+ */
function upgrade_250() {
global $wp_current_db_version;
@@ -738,6 +852,11 @@ function upgrade_250() {
}
+/**
+ * Execute changes made in WordPress 2.5.1.
+ *
+ * @since 2.5.1
+ */
function upgrade_251() {
global $wp_current_db_version;
@@ -745,12 +864,22 @@ function upgrade_251() {
update_option('secret', wp_generate_password(64));
}
+/**
+ * Execute changes made in WordPress 2.5.2.
+ *
+ * @since 2.5.2
+ */
function upgrade_252() {
global $wpdb;
$wpdb->query("UPDATE $wpdb->users SET user_activation_key = ''");
}
+/**
+ * Execute changes made in WordPress 2.6.
+ *
+ * @since 2.6.0
+ */
function upgrade_260() {
global $wp_current_db_version;
@@ -763,6 +892,11 @@ function upgrade_260() {
}
}
+/**
+ * Execute changes made in WordPress 2.7.
+ *
+ * @since 2.7.0
+ */
function upgrade_270() {
global $wpdb, $wp_current_db_version;
@@ -778,6 +912,18 @@ function upgrade_270() {
// The functions we use to actually do stuff
// General
+
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param string $table_name Database table name to create.
+ * @param string $create_ddl SQL statement to create table.
+ * @return bool If table already exists or was created by function.
+ */
function maybe_create_table($table_name, $create_ddl) {
global $wpdb;
foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
@@ -796,6 +942,17 @@ function maybe_create_table($table_name, $create_ddl) {
return false;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param string $table Database table name.
+ * @param string $index Index name to drop.
+ * @return bool True, when finished.
+ */
function drop_index($table, $index) {
global $wpdb;
$wpdb->hide_errors();
@@ -808,6 +965,17 @@ function drop_index($table, $index) {
return true;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param string $table Database table name.
+ * @param string $index Database table index column.
+ * @return bool True, when done with execution.
+ */
function add_clean_index($table, $index) {
global $wpdb;
drop_index($table, $index);
@@ -840,8 +1008,13 @@ function maybe_add_column($table_name, $column_name, $create_ddl) {
return false;
}
-
-// get_alloptions as it was for 1.2.
+/**
+ * Retrieve all options as it was for 1.2.
+ *
+ * @since 1.2.0
+ *
+ * @return array List of options.
+ */
function get_alloptions_110() {
global $wpdb;
if ($options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options")) {
@@ -857,7 +1030,15 @@ function get_alloptions_110() {
return $all_options;
}
-// Version of get_option that is private to install/upgrade.
+/**
+ * Version of get_option that is private to install/upgrade.
+ *
+ * @since unknown
+ * @access private
+ *
+ * @param string $setting Option name.
+ * @return mixed
+ */
function __get_option($setting) {
global $wpdb;
@@ -884,6 +1065,16 @@ function __get_option($setting) {
return $option;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param string $content
+ * @return string
+ */
function deslash($content) {
// Note: \\\ inside a regex denotes a single backslash.
@@ -901,6 +1092,17 @@ function deslash($content) {
return $content;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $queries
+ * @param unknown_type $execute
+ * @return unknown
+ */
function dbDelta($queries, $execute = true) {
global $wpdb;
@@ -1102,6 +1304,13 @@ function dbDelta($queries, $execute = true) {
return $for_update;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ */
function make_db_current() {
global $wp_queries;
@@ -1111,12 +1320,30 @@ function make_db_current() {
echo "\n";
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ */
function make_db_current_silent() {
global $wp_queries;
$alterations = dbDelta($wp_queries);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $theme_name
+ * @param unknown_type $template
+ * @return unknown
+ */
function make_site_theme_from_oldschool($theme_name, $template) {
$home_path = get_home_path();
$site_dir = WP_CONTENT_DIR . "/themes/$template";
@@ -1185,6 +1412,17 @@ function make_site_theme_from_oldschool($theme_name, $template) {
return true;
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param unknown_type $theme_name
+ * @param unknown_type $template
+ * @return unknown
+ */
function make_site_theme_from_default($theme_name, $template) {
$site_dir = WP_CONTENT_DIR . "/themes/$template";
$default_dir = WP_CONTENT_DIR . '/themes/default';
@@ -1240,6 +1478,15 @@ function make_site_theme_from_default($theme_name, $template) {
}
// Create a site theme from the default theme.
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function make_site_theme() {
// Name the theme after the blog.
$theme_name = __get_option('blogname');
@@ -1281,6 +1528,14 @@ function make_site_theme() {
return $template;
}
+/**
+ * Translate user level to user role name.
+ *
+ * @since unknown
+ *
+ * @param int $level User level.
+ * @return string User role name.
+ */
function translate_level_to_role($level) {
switch ($level) {
case 10:
@@ -1302,6 +1557,13 @@ function translate_level_to_role($level) {
}
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ */
function wp_check_mysql_version() {
global $wpdb;
$result = $wpdb->check_database_version();
@@ -1309,6 +1571,13 @@ function wp_check_mysql_version() {
die( $result->get_error_message() );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ */
function maybe_disable_automattic_widgets() {
$plugins = __get_option( 'active_plugins' );
diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php
index 4400008d55..aa0d7c0692 100644
--- a/wp-admin/includes/user.php
+++ b/wp-admin/includes/user.php
@@ -1,6 +1,21 @@
prefix . 'user_level';
return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param int $user_id User ID.
+ * @return array|bool List of editable authors. False if no editable users.
+ */
function get_editable_authors( $user_id ) {
global $wpdb;
@@ -163,6 +207,17 @@ function get_editable_authors( $user_id ) {
return apply_filters('get_editable_authors', $authors);
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @param int $user_id User ID.
+ * @param bool $exclude_zeros Optional, default is true. Whether to exclude zeros.
+ * @return unknown
+ */
function get_editable_user_ids( $user_id, $exclude_zeros = true ) {
global $wpdb;
@@ -184,6 +239,15 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true ) {
return $wpdb->get_col( $query );
}
+/**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
function get_nonauthor_user_ids() {
global $wpdb;
$level_key = $wpdb->prefix . 'user_level';
@@ -191,6 +255,15 @@ function get_nonauthor_user_ids() {
return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) );
}
+/**
+ * Retrieve editable posts from other users.
+ *
+ * @since unknown
+ *
+ * @param int $user_id User ID to not retrieve posts from.
+ * @param string $type Optional, defaults to 'any'. Post type to retrieve, can be 'draft' or 'pending'.
+ * @return array List of posts from others.
+ */
function get_others_unpublished_posts($user_id, $type='any') {
global $wpdb;
@@ -213,14 +286,38 @@ function get_others_unpublished_posts($user_id, $type='any') {
return apply_filters('get_others_drafts', $other_unpubs);
}
+/**
+ * Retrieve drafts from other users.
+ *
+ * @since unknown
+ *
+ * @param int $user_id User ID.
+ * @return array List of drafts from other users.
+ */
function get_others_drafts($user_id) {
return get_others_unpublished_posts($user_id, 'draft');
}
+/**
+ * Retrieve pending review posts from other users.
+ *
+ * @since unknown
+ *
+ * @param int $user_id User ID.
+ * @return array List of posts with pending review post type from other users.
+ */
function get_others_pending($user_id) {
return get_others_unpublished_posts($user_id, 'pending');
}
+/**
+ * Retrieve user data and filter it.
+ *
+ * @since unknown
+ *
+ * @param int $user_id User ID.
+ * @return object WP_User object with user data.
+ */
function get_user_to_edit( $user_id ) {
$user = new WP_User( $user_id );
$user->user_login = attribute_escape($user->user_login);
@@ -238,6 +335,14 @@ function get_user_to_edit( $user_id ) {
return $user;
}
+/**
+ * Retrieve the user's drafts.
+ *
+ * @since unknown
+ *
+ * @param int $user_id User ID.
+ * @return array
+ */
function get_users_drafts( $user_id ) {
global $wpdb;
$query = $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = %d ORDER BY post_modified DESC", $user_id);
@@ -245,6 +350,20 @@ function get_users_drafts( $user_id ) {
return $wpdb->get_results( $query );
}
+/**
+ * Remove user and optionally reassign posts and links to another user.
+ *
+ * If the $reassign parameter is not assigned to an User ID, then all posts will
+ * be deleted of that user. The action 'delete_user' that is passed the User ID
+ * being deleted will be run after the posts are either reassigned or deleted.
+ * The user meta will also be deleted that are for that User ID.
+ *
+ * @since unknown
+ *
+ * @param int $id User ID.
+ * @param int $reassign Optional. Reassign posts and links to new User ID.
+ * @return bool True when finished.
+ */
function wp_delete_user($id, $reassign = 'novalue') {
global $wpdb;
@@ -279,6 +398,13 @@ function wp_delete_user($id, $reassign = 'novalue') {
return true;
}
+/**
+ * Remove all capabilities from user.
+ *
+ * @since unknown
+ *
+ * @param int $id User ID.
+ */
function wp_revoke_user($id) {
$id = (int) $id;
@@ -286,28 +412,161 @@ function wp_revoke_user($id) {
$user->remove_all_caps();
}
-// WP_User_Search class
-// by Mark Jaquith
-
if ( !class_exists('WP_User_Search') ) :
+/**
+ * WordPress User Search class.
+ *
+ * @since unknown
+ * @author Mark Jaquith
+ */
class WP_User_Search {
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var unknown_type
+ */
var $results;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var unknown_type
+ */
var $search_term;
+
+ /**
+ * Page number.
+ *
+ * @since unknown
+ * @access private
+ * @var int
+ */
var $page;
+
+ /**
+ * Role name that users have.
+ *
+ * @since unknown
+ * @access private
+ * @var string
+ */
var $role;
+
+ /**
+ * Raw page number.
+ *
+ * @since unknown
+ * @access private
+ * @var int|bool
+ */
var $raw_page;
+
+ /**
+ * Amount of users to display per page.
+ *
+ * @since unknown
+ * @access public
+ * @var int
+ */
var $users_per_page = 50;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var unknown_type
+ */
var $first_user;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var int
+ */
var $last_user;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var unknown_type
+ */
var $query_limit;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var unknown_type
+ */
var $query_sort;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var unknown_type
+ */
var $query_from_where;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var int
+ */
var $total_users_for_query = 0;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var bool
+ */
var $too_many_total_users = false;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var unknown_type
+ */
var $search_errors;
+
+ /**
+ * {@internal Missing Description}}
+ *
+ * @since unknown
+ * @access private
+ * @var unknown_type
+ */
var $paging_text;
- function WP_User_Search ($search_term = '', $page = '', $role = '') { // constructor
+ /**
+ * PHP4 Constructor - Sets up the object properties.
+ *
+ * @since unknown
+ *
+ * @param string $search_term Search terms string.
+ * @param int $page Optional. Page ID.
+ * @param string $role Role name.
+ * @return WP_User_Search
+ */
+ function WP_User_Search ($search_term = '', $page = '', $role = '') {
$this->search_term = $search_term;
$this->raw_page = ( '' == $page ) ? false : (int) $page;
$this->page = (int) ( '' == $page ) ? 1 : $page;
@@ -319,6 +578,14 @@ class WP_User_Search {
$this->do_paging();
}
+ /**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ * @access public
+ */
function prepare_query() {
global $wpdb;
$this->first_user = ($this->page - 1) * $this->users_per_page;
@@ -343,6 +610,14 @@ class WP_User_Search {
}
+ /**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ * @access public
+ */
function query() {
global $wpdb;
$this->results = $wpdb->get_col('SELECT ID ' . $this->query_from_where . $this->query_sort . $this->query_limit);
@@ -353,10 +628,26 @@ class WP_User_Search {
$this->search_errors = new WP_Error('no_matching_users_found', __('No matching users were found!'));
}
+ /**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ * @access public
+ */
function prepare_vars_for_template_usage() {
$this->search_term = stripslashes($this->search_term); // done with DB, from now on we want slashes gone
}
+ /**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ * @access public
+ */
function do_paging() {
if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
$args = array();
@@ -375,20 +666,56 @@ class WP_User_Search {
}
}
+ /**
+ * {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since unknown
+ * @access public
+ *
+ * @return unknown
+ */
function get_results() {
return (array) $this->results;
}
+ /**
+ * Displaying paging text.
+ *
+ * @see do_paging() Builds paging text.
+ *
+ * @since unknown
+ * @access public
+ */
function page_links() {
echo $this->paging_text;
}
+ /**
+ * Whether paging is enabled.
+ *
+ * @see do_paging() Builds paging text.
+ *
+ * @since unknown
+ * @access public
+ *
+ * @return bool
+ */
function results_are_paged() {
if ( $this->paging_text )
return true;
return false;
}
+ /**
+ * Whether there are search terms.
+ *
+ * @since unknown
+ * @access public
+ *
+ * @return bool
+ */
function is_search() {
if ( $this->search_term )
return true;
diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php
index c6050960aa..b87d58aefc 100644
--- a/wp-admin/includes/widgets.php
+++ b/wp-admin/includes/widgets.php
@@ -9,10 +9,12 @@
/**
* Display list of widgets, either all or matching search.
*
+ * The search parameter are search terms separated by spaces.
+ *
* @since unknown
*
- * @param unknown_type $show
- * @param unknown_type $_search Optional. Search for widgets. Should be unsanitized.
+ * @param string $show Optional, default is all. What to display, can be 'all', 'unused', or 'used'.
+ * @param string $_search Optional. Search for widgets. Should be unsanitized.
*/
function wp_list_widgets( $show = 'all', $_search = false ) {
global $wp_registered_widgets, $sidebars_widgets, $wp_registered_widget_controls;
@@ -168,7 +170,7 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
*
* @since unknown
*
- * @param unknown_type $sidebar
+ * @param string $sidebar
*/
function wp_list_widget_controls( $sidebar ) {
add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' );
@@ -188,8 +190,8 @@ function wp_list_widget_controls( $sidebar ) {
*
* @since unknown
*
- * @param unknown_type $params
- * @return unknown
+ * @param array $params
+ * @return array
*/
function wp_list_widget_controls_dynamic_sidebar( $params ) {
global $wp_registered_widgets;
@@ -216,8 +218,8 @@ function wp_list_widget_controls_dynamic_sidebar( $params ) {
*
* @since unknown
*
- * @param unknown_type $sidebar_args
- * @return unknown
+ * @param array $sidebar_args
+ * @return array
*/
function wp_widget_control( $sidebar_args ) {
global $wp_registered_widgets, $wp_registered_widget_controls, $sidebars_widgets, $edit_widget;
@@ -322,8 +324,8 @@ function wp_widget_control( $sidebar_args ) {
*
* @since unknown
*
- * @param unknown_type $string
- * @return unknown
+ * @param string $string
+ * @return string
*/
function wp_widget_control_ob_filter( $string ) {
if ( false === $beg = strpos( $string, '%BEG_OF_TITLE%' ) )