WordPress.org

Make WordPress Core

Ticket #7527: 7527.r9118.diff

File 7527.r9118.diff, 29.9 KB (added by jacobsantos, 10 years ago)

inline documentation for wp-admin and wp-admin/includes based off of r9118

  • edit-form-advanced.php

     
    5555}
    5656
    5757// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
     58
     59/**
     60 * Display post submit form fields.
     61 *
     62 * @since 2.7.0
     63 *
     64 * @param object $post
     65 */
    5866function post_submit_meta_box($post) {
    5967        global $action;
    6068
     
    186194}
    187195add_meta_box('submitdiv', __('Publish'), 'post_submit_meta_box', 'post', 'side', 'core');
    188196
     197/**
     198 * Display post tags form fields.
     199 *
     200 * @since 2.6.0
     201 *
     202 * @param object $post
     203 */
    189204function post_tags_meta_box($post) {
    190205?>
    191206<p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
     
    195210}
    196211add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'side', 'core');
    197212
     213/**
     214 * Display add post media and current post media form fields and images.
     215 *
     216 * @todo Complete.
     217 * @since 2.7.0
     218 *
     219 * @param object $post
     220 */
    198221function post_media_meta_box($post) {
    199222        echo "<p><small><em>This feature isn't fully functional in this prototype.</em></small></p>";
    200223
     
    231254}
    232255add_meta_box( 'mediadiv', __('Media' ), 'post_media_meta_box', 'post', 'side', 'core' );
    233256
     257/**
     258 * Display post categories form fields.
     259 *
     260 * @since 2.6.0
     261 *
     262 * @param object $post
     263 */
    234264function post_categories_meta_box($post) {
    235265?>
    236266<ul id="category-tabs">
     
    265295}
    266296add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', 'post', 'side', 'core');
    267297
     298/**
     299 * Display post excerpt form fields.
     300 *
     301 * @since 2.6.0
     302 *
     303 * @param object $post
     304 */
    268305function post_excerpt_meta_box($post) {
    269306?>
    270307<label class="hidden" for="excerpt"><?php _e('Excerpt') ?></label><textarea rows="1" cols="40" name="excerpt" tabindex="6" id="excerpt"><?php echo $post->post_excerpt ?></textarea>
     
    273310}
    274311add_meta_box('postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'post', 'normal', 'core');
    275312
     313/**
     314 * Display trackback links form fields.
     315 *
     316 * @since 2.6.0
     317 *
     318 * @param object $post
     319 */
    276320function post_trackback_meta_box($post) {
    277321        $form_trackback = '<input type="text" name="trackback_url" id="trackback_url" tabindex="7" value="'. attribute_escape( str_replace("\n", ' ', $post->to_ping) ) .'" />';
    278322        if ('' != $post->pinged) {
     
    296340}
    297341add_meta_box('trackbacksdiv', __('Trackbacks and Pings'), 'post_trackback_meta_box', 'post', 'normal', 'core');
    298342
     343/**
     344 * Display custom fields for the post form fields.
     345 *
     346 * @since 2.6.0
     347 *
     348 * @param object $post
     349 */
    299350function post_custom_meta_box($post) {
    300351?>
    301352<div id="postcustomstuff">
     
    318369
    319370do_action('dbx_post_advanced');
    320371
     372/**
     373 * Display comment status for post form fields.
     374 *
     375 * @since 2.6.0
     376 *
     377 * @param object $post
     378 */
    321379function post_comment_status_meta_box($post) {
    322380        global $wpdb, $post_ID;
    323381?>
     
    357415}
    358416add_meta_box('commentstatusdiv', __('Comments on this Post'), 'post_comment_status_meta_box', 'post', 'normal', 'core');
    359417
     418/**
     419 * Display post password form fields.
     420 *
     421 * @since 2.6.0
     422 *
     423 * @param object $post
     424 */
    360425function post_password_meta_box($post) {
    361426?>
    362427<p>
     
    369434}
    370435add_meta_box('passworddiv', __('Privacy Options'), 'post_password_meta_box', 'post', 'normal', 'core');
    371436
     437/**
     438 * Display post slug form fields.
     439 *
     440 * @since 2.6.0
     441 *
     442 * @param object $post
     443 */
    372444function post_slug_meta_box($post) {
    373445?>
    374446<label class="hidden" for="post_name"><?php _e('Post Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" />
     
    381453if ( $post->post_author && !in_array($post->post_author, $authors) )
    382454        $authors[] = $post->post_author;
    383455if ( $authors && count( $authors ) > 1 ) :
     456/**
     457 * Display form field with list of authors.
     458 *
     459 * @since 2.6.0
     460 *
     461 * @param object $post
     462 */
    384463function post_author_meta_box($post) {
    385464        global $current_user, $user_ID;
    386465        $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
     
    394473endif;
    395474
    396475if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
     476/**
     477 * Display list of post revisions.
     478 *
     479 * @since 2.6.0
     480 *
     481 * @param object $post
     482 */
    397483function post_revisions_meta_box($post) {
    398484        wp_list_post_revisions();
    399485}
  • edit-form-comment.php

     
    2525<?php
    2626// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action).
    2727
    28 function comment_submit_meta_box($comment) { // not used, but keeping for a bit longer in case it's needed
     28/**
     29 * Display comment edit meta box.
     30 *
     31 * Not used, but keeping for a bit longer in case it's needed.
     32 *
     33 * @since 2.7.0
     34 *
     35 * @param object $comment Comment data.
     36 */
     37function comment_submit_meta_box($comment) {
    2938?>
    3039<div class="submitbox" id="submitcomment">
    3140<div class="inside-submitbox">
  • edit-link-form.php

     
    1818        $nonce_action = 'add-bookmark';
    1919}
    2020
     21/**
     22 * Display checked checkboxes attribute for xfn microformat options.
     23 *
     24 * @since 1.0.1
     25 *
     26 * @param string $class
     27 * @param string $value
     28 * @param mixed $deprecated Not used.
     29 */
    2130function xfn_check($class, $value = '', $deprecated = '') {
    2231        global $link;
    2332
     
    3746}
    3847?>
    3948
    40 <?php function link_submit_meta_box($link) { ?>
     49<?php
     50/**
     51 * Display link create form fields.
     52 *
     53 * @since 2.7.0
     54 *
     55 * @param object $link
     56 */
     57function link_submit_meta_box($link) {
     58?>
    4159<div class="submitbox" id="submitlink">
    4260
    4361<div class="inside-submitbox">
     
    6381}
    6482add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', 'link', 'side', 'core');
    6583
     84/**
     85 * Display link categories form fields.
     86 *
     87 * @since 2.6.0
     88 *
     89 * @param object $link
     90 */
    6691function link_categories_meta_box($link) { ?>
    6792<div id="category-adder" class="wp-hidden-children">
    6893        <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4>
     
    100125}
    101126add_meta_box('linkcategorydiv', __('Categories'), 'link_categories_meta_box', 'link', 'normal', 'core');
    102127
     128/**
     129 * Display form fields for changing link target.
     130 *
     131 * @since 2.6.0
     132 *
     133 * @param object $link
     134 */
    103135function link_target_meta_box($link) { ?>
    104136<fieldset><legend class="hidden"><?php _e('Target') ?></legend>
    105137<label for="link_target_blank" class="selectit">
     
    117149}
    118150add_meta_box('linktargetdiv', __('Target'), 'link_target_meta_box', 'link', 'normal', 'core');
    119151
     152/**
     153 * Display xfn form fields.
     154 *
     155 * @since 2.6.0
     156 *
     157 * @param object $link
     158 */
    120159function link_xfn_meta_box($link) {
    121160?>
    122161<table class="editform" style="width: 100%;" cellspacing="2" cellpadding="5">
     
    230269}
    231270add_meta_box('linkxfndiv', __('Link Relationship (XFN)'), 'link_xfn_meta_box', 'link', 'normal', 'core');
    232271
     272/**
     273 * Display advanced link options form fields.
     274 *
     275 * @since 2.6.0
     276 *
     277 * @param object $link
     278 */
    233279function link_advanced_meta_box($link) {
    234280?>
    235281<table class="form-table" style="width: 100%;" cellspacing="2" cellpadding="5">
  • edit-page-form.php

     
    77 */
    88
    99/**
    10  * Post ID global
     10 * Post ID global.
    1111 * @name $post_ID
    1212 * @var int
    1313 */
     
    4747?>
    4848
    4949<?php
     50/**
     51 * Display submit form fields.
     52 *
     53 * @since 2.7.0
     54 *
     55 * @param object $post
     56 */
    5057function page_submit_meta_box($post) {
    5158        global $action;
    5259
     
    172179}
    173180add_meta_box('pagesubmitdiv', __('Publish'), 'page_submit_meta_box', 'page', 'side', 'core');
    174181
     182/**
     183 * Display custom field for page form fields.
     184 *
     185 * @since 2.6.0
     186 *
     187 * @param object $post
     188 */
    175189function page_custom_meta_box($post){
    176190?>
    177191<div id="postcustomstuff">
     
    192206}
    193207add_meta_box('pagecustomdiv', __('Custom Fields'), 'page_custom_meta_box', 'page', 'normal', 'core');
    194208
     209/**
     210 * Display comments status form fields.
     211 *
     212 * @since 2.6.0
     213 *
     214 * @param object $post
     215 */
    195216function page_comments_status_meta_box($post){
    196217?>
    197218<input name="advanced_view" type="hidden" value="1" />
     
    204225}
    205226add_meta_box('pagecommentstatusdiv', __('Comments &amp; Pings'), 'page_comments_status_meta_box', 'page', 'normal', 'core');
    206227
     228/**
     229 * Display page password form fields.
     230 *
     231 * @since 2.6.0
     232 *
     233 * @param object $post
     234 */
    207235function page_password_meta_box($post){
    208236?>
    209237<p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex='4' /> <?php _e('Keep this page private') ?></label></p>
     
    214242}
    215243add_meta_box('pagepassworddiv', __('Privacy Options'), 'page_password_meta_box', 'page', 'normal', 'core');
    216244
     245/**
     246 * Display page slug form fields.
     247 *
     248 * @since 2.6.0
     249 *
     250 * @param object $post
     251 */
    217252function page_slug_meta_box($post){
    218253?>
    219254<label class="hidden" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" />
     
    221256}
    222257add_meta_box('pageslugdiv', __('Page Slug'), 'page_slug_meta_box', 'page', 'normal', 'core');
    223258
     259/**
     260 * Display page parent form fields.
     261 *
     262 * @since 2.6.0
     263 *
     264 * @param object $post
     265 */
    224266function page_parent_meta_box($post){
    225267?>
    226268<label class="hidden" for="parent_id"><?php _e('Page Parent') ?></label>
     
    231273add_meta_box('pageparentdiv', __('Page Parent'), 'page_parent_meta_box', 'page', 'normal', 'core');
    232274
    233275if ( 0 != count( get_page_templates() ) ) {
     276        /**
     277         * Display page template form fields.
     278         *
     279         * @since 2.6.0
     280         *
     281         * @param object $post
     282         */
    234283        function page_template_meta_box($post){
    235284?>
    236285<label class="hidden" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
     
    243292        add_meta_box('pagetemplatediv', __('Page Template'), 'page_template_meta_box', 'page', 'normal', 'core');
    244293}
    245294
     295/**
     296 * Display page order form fields.
     297 *
     298 * @since 2.6.0
     299 *
     300 * @param object $post
     301 */
    246302function page_order_meta_box($post){
    247303?>
    248304<p><label class="hidden" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo $post->menu_order ?>" /></p>
     
    256312if ( $post->post_author && !in_array($post->post_author, $authors) )
    257313        $authors[] = $post->post_author;
    258314if ( $authors && count( $authors ) > 1 ) {
     315        /**
     316         * Display page author form fields, when more than one author exists.
     317         *
     318         * @since 2.6.0
     319         *
     320         * @param object $post
     321         */
    259322        function page_author_meta_box($post){
    260323                global $current_user, $user_ID;
    261324                $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
     
    270333
    271334
    272335if ( 0 < $post_ID && wp_get_post_revisions( $post_ID ) ) :
     336/**
     337 * Display list of page revisions.
     338 *
     339 * @since 2.6.0
     340 *
     341 * @param object $post
     342 */
    273343function page_revisions_meta_box($post) {
    274344        wp_list_post_revisions();
    275345}
  • includes/comment.php

     
    11<?php
    22/**
    3  * WordPress Comment Administration API
     3 * WordPress Comment Administration API.
    44 *
    55 * @package WordPress
    66 * @subpackage Administration
  • includes/image.php

     
    1313 * does not have the functionality to save in a file of the same format, the
    1414 * thumbnail will be created as a jpeg.
    1515 *
    16  * @since unknown
     16 * @since 1.2.0
    1717 *
    1818 * @param mixed $file Filename of the original image, Or attachment id.
    1919 * @param int $max_side Maximum length of a single side for the thumbnail.
     
    2727/**
    2828 * Crop an Image to a given size.
    2929 *
    30  * @internal Missing Long Description
     30 * @since 2.1.0
    3131 *
    32  * @since unknown
    33  *
    34  * @param string|int $src_file The source file or Attachment ID
     32 * @param string|int $src_file The source file or Attachment ID.
    3533 * @param int $src_x The start x position to crop from.
    3634 * @param int $src_y The start y position to crop from.
    3735 * @param int $src_w The width to crop.
     
    7775}
    7876
    7977/**
    80  * Generate post Image attachment Metadata.
     78 * Generate post image attachment meta data.
    8179 *
    82  * @internal Missing Long Description
     80 * @since 2.1.0
    8381 *
    84  * @since unknown
    85  *
    86  * @param int $attachment_id Attachment Id to process
    87  * @param string $file Filepath of the Attached image
    88  * @return mixed Metadata for attachment
     82 * @param int $attachment_id Attachment Id to process.
     83 * @param string $file Filepath of the Attached image.
     84 * @return mixed Metadata for attachment.
    8985 */
    9086function wp_generate_attachment_metadata( $attachment_id, $file ) {
    9187        $attachment = get_post( $attachment_id );
     
    129125}
    130126
    131127/**
    132  * Load an image which PHP Supports.
     128 * Load an image from a string, if PHP supports it.
    133129 *
    134  * @internal Missing Long Description
     130 * @since 2.1.0
    135131 *
    136  * @since unknown
    137  *
    138132 * @param string $file Filename of the image to load.
    139133 * @return resource The resulting image resource on success, Error string on failure.
    140134 */
     
    159153}
    160154
    161155/**
    162  * Calculated the new dimentions for downsampled images.
     156 * Calculated the new dimentions for a downsampled image.
    163157 *
    164  * @since unknown
     158 * @since 2.0.0
    165159 * @see wp_shrink_dimensions()
    166160 *
    167161 * @param int $width Current width of the image
    168162 * @param int $height Current height of the image
    169163 * @return mixed Array(height,width) of shrunk dimensions.
    170  *
    171164 */
    172165function get_udims( $width, $height) {
    173166        return wp_shrink_dimensions( $width, $height );
     
    176169/**
    177170 * Calculates the new dimentions for a downsampled image.
    178171 *
    179  * @since unknown
     172 * @since 2.0.0
    180173 * @see wp_constrain_dimensions()
    181174 *
    182175 * @param int $width Current width of the image
     
    184177 * @param int $wmax Maximum wanted width
    185178 * @param int $hmax Maximum wanted height
    186179 * @return mixed Array(height,width) of shrunk dimensions.
    187  *
    188180 */
    189181function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
    190182        return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
     
    193185/**
    194186 * Convert a fraction string to a decimal.
    195187 *
    196  * @since unknown
     188 * @since 2.5.0
    197189 *
    198190 * @param string $str
    199191 * @return int|float
     
    208200/**
    209201 * Convert the exif date format to a unix timestamp.
    210202 *
    211  * @since unknown
     203 * @since 2.5.0
    212204 *
    213205 * @param string $str
    214206 * @return int
     
    223215/**
    224216 * Get extended image metadata, exif or iptc as available.
    225217 *
    226  * @since unknown
     218 * Retrieves the EXIF metadata aperture, credit, camera, caption, copyright, iso
     219 * created_timestamp, focal_length, shutter_speed, and title.
    227220 *
     221 * The IPTC metadata that is retrieved is APP13, credit, byline, created date
     222 * and time, caption, copyright, and title. Also includes FNumber, Model,
     223 * DateTimeDigitized, FocalLength, ISOSpeedRatings, and ExposureTime.
     224 *
     225 * @todo Try other exif libraries if available.
     226 * @since 2.5.0
     227 *
    228228 * @param string $file
    229229 * @return bool|array False on failure. Image metadata array on success.
    230230 */
     
    288288                if (!empty($exif['ExposureTime']))
    289289                        $meta['shutter_speed'] = wp_exif_frac2dec( $exif['ExposureTime'] );
    290290        }
    291         /** @todo FIXME: try other exif libraries if available */
    292291
    293292        return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType );
    294293
     
    297296/**
    298297 * Validate that file is an image.
    299298 *
    300  * @since unknown
     299 * @since 2.5.0
    301300 *
    302301 * @param string $path File path to test if valid image.
    303302 * @return bool True if valid image, false if not valid image.
     
    310309/**
    311310 * Validate that file is suitable for displaying within a web page.
    312311 *
    313  * @since unknown
     312 * @since 2.5.0
    314313 * @uses apply_filters() Calls 'file_is_displayable_image' on $result and $path.
    315314 *
    316315 * @param string $path File path to test.
  • includes/import.php

     
    77 */
    88
    99/**
    10  * {@internal Missing Short Description}}
     10 * Retrieve list of importers.
    1111 *
    12  * @since unknown
     12 * @since 2.0.0
    1313 *
    14  * @return unknown
     14 * @return array
    1515 */
    1616function get_importers() {
    1717        global $wp_importers;
     
    2121}
    2222
    2323/**
    24  * {@internal Missing Short Description}}
     24 * Register importer for WordPress.
    2525 *
    26  * @since unknown
     26 * @since 2.0.0
    2727 *
    28  * @param unknown_type $id
    29  * @param unknown_type $name
    30  * @param unknown_type $description
    31  * @param unknown_type $callback
    32  * @return unknown
     28 * @param string $id Importer tag. Used to uniquely identify importer.
     29 * @param string $name Importer name and title.
     30 * @param string $description Importer description.
     31 * @param callback $callback Callback to run.
     32 * @return WP_Error Returns WP_Error when $callback is WP_Error.
    3333 */
    3434function register_importer( $id, $name, $description, $callback ) {
    3535        global $wp_importers;
     
    3939}
    4040
    4141/**
    42  * {@internal Missing Short Description}}
     42 * Cleanup importer.
    4343 *
    44  * @since unknown
     44 * Removes attachment based on ID.
    4545 *
    46  * @param unknown_type $id
     46 * @since 2.0.0
     47 *
     48 * @param string $id Importer ID.
    4749 */
    4850function wp_import_cleanup( $id ) {
    4951        wp_delete_attachment( $id );
    5052}
    5153
    5254/**
    53  * {@internal Missing Short Description}}
     55 * Handle importer uploading and add attachment.
    5456 *
    55  * @since unknown
     57 * @since 2.0.0
    5658 *
    57  * @return unknown
     59 * @return array
    5860 */
    5961function wp_import_handle_upload() {
    6062        $overrides = array( 'test_form' => false, 'test_type' => false );
  • includes/plugin-install.php

     
    2020 *
    2121 * The second filter, 'plugins_api', is the result that would be returned.
    2222 *
     23 * @since 2.7.0
     24 *
    2325 * @param string $action
    2426 * @param array|object $args Optional. Arguments to serialize for the Plugin Info API.
    2527 * @return mixed
     
    4446}
    4547
    4648/**
    47  *
     49 * Retrieve popular WordPress plugin tags.
    4850 *
    49  * @param unknown_type $args
    50  * @return unknown
     51 * @since 2.7.0
     52 *
     53 * @param array $args
     54 * @return array
    5155 */
    5256function install_popular_tags( $args = array() ) {
    5357        if ( ! ($cache = wp_cache_get('popular_tags', 'api')) && ! ($cache = get_option('wporg_popular_tags')) )
     
    6771}
    6872
    6973add_action('install_plugins_search', 'install_search', 10, 1);
     74
     75/**
     76 * Display search results and display as tag cloud.
     77 *
     78 * @since 2.7.0
     79 *
     80 * @param string $page
     81 */
    7082function install_search($page) {
    7183        $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';
    7284        $term = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
     
    111123        <p><?php _e('You may also search based on these popular tags, These are tags which are most popular on WordPress.org') ?></p>
    112124        <?php
    113125
    114                 $api_tags = install_popular_tags();
     126        $api_tags = install_popular_tags();
    115127
    116                 //Set up the tags in a way which can be interprated by wp_generate_tag_cloud()
    117                 $tags = array();
    118                 foreach ( (array)$api_tags as $tag )
    119                         $tags[ $tag['name'] ] = (object) array(
    120                                                                         'link' => clean_url( admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),
    121                                                                         'name' => $tag['name'],
    122                                                                         'count' => $tag['count'] );
    123                 echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%d plugin'), 'multiple_text' => __('%d plugins') ) );
     128        //Set up the tags in a way which can be interprated by wp_generate_tag_cloud()
     129        $tags = array();
     130        foreach ( (array)$api_tags as $tag )
     131                $tags[ $tag['name'] ] = (object) array(
     132                                                                'link' => clean_url( admin_url('plugin-install.php?tab=search&type=tag&s=' . urlencode($tag['name'])) ),
     133                                                                'name' => $tag['name'],
     134                                                                'count' => $tag['count'] );
     135        echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%d plugin'), 'multiple_text' => __('%d plugins') ) );
    124136}
    125137
     138/**
     139 * Display search form for searching plugins.
     140 *
     141 * @since 2.7.0
     142 */
    126143function install_search_form(){
    127144        $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';
    128145        $term = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
     
    139156}
    140157
    141158add_action('install_plugins_featured', 'install_featured', 10, 1);
     159
     160/**
     161 * Display featured plugins.
     162 *
     163 * @since 2.7.0
     164 *
     165 * @param string $page
     166 */
    142167function install_featured($page){
    143168        $args = array('browse' => 'featured', 'page' => $page);
    144169        $api = plugins_api('query_plugins', $args);
    145170        display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']);
    146171}
    147172add_action('install_plugins_popular', 'install_popular', 10, 1);
     173
     174/**
     175 * Display popular plugins.
     176 *
     177 * @since 2.7.0
     178 *
     179 * @param string $page
     180 */
    148181function install_popular($page){
    149182        $args = array('browse' => 'popular', 'page' => $page);
    150183        $api = plugins_api('query_plugins', $args);
    151184        display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']);
    152185}
    153186add_action('install_plugins_new', 'install_new', 10, 1);
     187
     188/**
     189 * Display new plugins.
     190 *
     191 * @since 2.7.0
     192 *
     193 * @param string $page
     194 */
    154195function install_new($page){
    155196        $args = array('browse' => 'new', 'page' => $page);
    156197        $api = plugins_api('query_plugins', $args);
    157198        display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']);
    158199}
    159200add_action('install_plugins_updated', 'install_updated', 10, 1);
     201
     202/**
     203 * Display recently updated plugins.
     204 *
     205 * @since 2.7.0
     206 *
     207 * @param string $page
     208 */
    160209function install_updated($page){
    161210        $args = array('browse' => 'updated', 'page' => $page);
    162211        $api = plugins_api('query_plugins', $args);
    163212        display_plugins_table($api->plugins, $api->info['page'], $api->info['pages']);
    164213}
    165214add_action('install_plugins_upload', 'install_upload_custom', 10, 1);
     215
     216/**
     217 * Display upload plugin form for adding plugins by uploading them manually.
     218 *
     219 * @since 2.7.0
     220 *
     221 * @param string $page
     222 */
    166223function install_upload_custom($page){
    167224        //$args = array('browse' => 'updated', 'page' => $page);
    168225        //$api = plugins_api('query_plugins', $args);
     
    170227        echo '<h1>Not Implemented</h1> <p>Will utilise SwfUpload(if available) & unzip .zip plugin packages</p>';
    171228}
    172229
     230/**
     231 * Display plugin content based on plugin list.
     232 *
     233 * @since 2.7.0
     234 *
     235 * @param array $plugins List of plugins.
     236 * @param string $page
     237 * @param int $totalpages Number of pages.
     238 */
    173239function display_plugins_table($plugins, $page = 1, $totalpages = 1){
    174240        global $tab;
    175241
     
    285351<?php
    286352}
    287353
     354/**
     355 * Display iframe header.
     356 *
     357 * @since 2.7.0
     358 *
     359 * @param string $title Title for iframe.
     360 */
    288361function install_iframe_header($title = '') {
    289362if( empty($title) )
    290363        $title = __('Plugin Install &#8212; WordPress');
     
    317390<?php
    318391}
    319392
     393/**
     394 * Display iframe footer.
     395 *
     396 * @since 2.7.0
     397 */
    320398function install_iframe_footer() {
    321399echo '
    322400</body>
     
    324402}
    325403
    326404add_action('install_plugins_pre_plugin-information', 'install_plugin_information');
     405
     406/**
     407 * Display plugin information in dialog box form.
     408 *
     409 * @since 2.7.0
     410 */
    327411function install_plugin_information() {
    328412        global $tab;
    329413
     
    447531}
    448532
    449533add_action('install_plugins_pre_install', 'install_plugin');
     534
     535/**
     536 * Display plugin link and execute install.
     537 *
     538 * @since 2.7.0
     539 */
    450540function install_plugin() {
    451541
    452542        $plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
     
    465555
    466556        exit;
    467557}
    468 function do_plugin_install($download_url = '', $plugin_information = NULL) {
     558
     559/**
     560 * Retrieve plugin and install.
     561 *
     562 * @since 2.7.0
     563 *
     564 * @param string $download_url Optional. Download URL.
     565 * @param object $plugin_information Optional. Plugin information
     566 */
     567function do_plugin_install($download_url = '', $plugin_information = null) {
    469568        global $wp_filesystem;
    470569
    471570        if ( empty($download_url) ) {
     
    512611        }
    513612}
    514613
     614/**
     615 * Install plugin.
     616 *
     617 * @since 2.7.0
     618 *
     619 * @param string $package
     620 * @param string $feedback Optional.
     621 * @return mixed.
     622 */
    515623function wp_install_plugin($package, $feedback = '') {
    516624        global $wp_filesystem;
    517625
  • includes/post.php

     
    467467}
    468468
    469469/**
    470  * {@internal Missing Short Description}}
     470 * Calls wp_write_post() and handles the errors.
    471471 *
    472472 * @since unknown
    473473 *
  • includes/schema.php

     
    11<?php
    22/**
    3  * WordPress Schema for installation and upgrading.
     3 * WordPress Administration Scheme API
    44 *
    55 * Here we keep the DB structure and option values.
    66 *
     
    88 * @subpackage Administration
    99 */
    1010
    11 /** WordPress Database collate charset */
     11/**
     12 * The database character collate.
     13 * @var string
     14 * @global string
     15 * @name $charset_collate
     16 */
    1217$charset_collate = '';
    1318
    1419// Declare these as global in case schema.php is included from a function.
     
    164169/**
    165170 * Create WordPress options and set the default values.
    166171 *
    167  * @since unknown
     172 * @since 1.5.0
    168173 * @uses $wpdb
    169174 * @uses $wp_db_version
    170175 */
     
    299304/**
    300305 * Execute WordPress role creation for the various WordPress versions.
    301306 *
    302  * @since unknown (2.0.0)
     307 * @since 2.0.0
    303308 */
    304309function populate_roles() {
    305310        populate_roles_160();
  • includes/update.php

     
    11<?php
     2/**
     3 * WordPress Administration Update API
     4 *
     5 * @package WordPress
     6 * @subpackage Admin
     7 */
    28
    39// The admin side of our 1.1 update system
    410
  • menu-header.php

     
    2020
    2121get_admin_page_parent();
    2222
     23/**
     24 * Display menu.
     25 *
     26 * @access private
     27 * @since 2.7.0
     28 *
     29 * @param array $menu
     30 * @param array $submenu
     31 * @param bool $submenu_as_parent
     32 */
    2333function _wp_menu_output( &$menu, &$submenu, $submenu_as_parent = true ) {
    2434        global $self, $parent_file, $submenu_file, $plugin_page, $pagenow;
    2535
  • plugins.php

     
    266266?>
    267267
    268268<?php
     269/**
     270 * @ignore
     271 *
     272 * @param array $plugins
     273 * @param string $context
     274 */
    269275function print_plugins_table($plugins, $context = '') {
    270276?>
    271277<table class="widefat" id="<?php echo $context ?>-plugins-table">
  • press-this.php

     
    1616 *
    1717 * @package WordPress
    1818 * @subpackage Press_This
    19  * @since unknown
     19 * @since 2.6.0
    2020 *
    2121 * @param string $string
    2222 * @return string
     
    3030 *
    3131 * @package WordPress
    3232 * @subpackage Press_This
    33  * @since unknown
     33 * @since 2.6.0
    3434 *
    3535 * @param string $text
    3636 * @return string
     
    4747 *
    4848 * @package WordPress
    4949 * @subpackage Press_This
    50  * @since unknown
     50 * @since 2.6.0
    5151 *
    5252 * @return int Post ID
    5353 */
     
    173173                <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p>
    174174                <?php break;
    175175        case 'photo_images':
     176                /**
     177                 * Retrieve all image URLs from given URI.
     178                 *
     179                 * @package WordPress
     180                 * @subpackage Press_This
     181                 * @since 2.6.0
     182                 *
     183                 * @param string $uri
     184                 * @return string
     185                 */
    176186                function get_images_from_uri($uri) {
    177187                        if( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )
    178188                                return "'".$uri."'";
  • setup-config.php

     
    1212/**
    1313 * We are installing.
    1414 *
    15  * @since unknown
    1615 * @package WordPress
    1716 */
    1817define('WP_INSTALLING', true);
     
    4948/**
    5049 * Display setup wp-config.php file header.
    5150 *
    52  * @since unknown
     51 * @ignore
     52 * @since 2.3.0
    5353 * @package WordPress
    5454 * @subpackage Installer_WP_Config
    5555 */
  • themes.php

     
    5959
    6060$themes = array_slice( $themes, $start, $per_page );
    6161
     62/**
     63 * Check if there is an update for a theme available.
     64 *
     65 * Will display link, if there is an update available.
     66 *
     67 * @since 2.7.0
     68 *
     69 * @param object $theme Theme data object.
     70 * @return bool False if no valid info was passed.
     71 */
    6272function theme_update_available( $theme ) {
    6373        static $themes_update;
    6474        if ( !isset($themes_update) )
  • user-edit.php

     
    1717/**
    1818 * Display JavaScript for profile page.
    1919 *
    20  * @package WordPress
    21  * @subpackage Administration
     20 * @since 2.5.0
    2221 */
    2322function profile_js ( ) {
    2423?>
     
    101100        }
    102101}
    103102
    104 // Optional SSL preference that can be turned on by hooking to the 'personal_options' action
     103/**
     104 * Optional SSL preference that can be turned on by hooking to the 'personal_options' action.
     105 *
     106 * @since 2.7.0
     107 *
     108 * @param object $user User data object
     109 */
    105110function use_ssl_preference($user) {
    106111?>
    107112        <tr>