Make WordPress Core


Ignore:
Timestamp:
11/24/2014 05:46:04 AM (10 years ago)
Author:
DrewAPicture
Message:

Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.

Affects DocBlocks for the following core elements:

  • Markdown-indent a code snippet in the file header for wp-admin/install-helper.php
  • Add markdown formatting and two inline @see tags to the description for translate()
  • Markdown-indent a code snippet in the description for _n_noop()
  • Remove HTML tags from the summary for get_media_embedded_in_content()
  • Remove an HTML tag from the summary for wpview_media_sandbox_styles()

Props rarst.
See #30473.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install-helper.php

    r30122 r30542  
    1111 * do, then it is advised to just write the SQL code yourself.
    1212 *
    13  * <code>
    14  * check_column('wp_links', 'link_description', 'mediumtext');
    15  * if (check_column($wpdb->comments, 'comment_author', 'tinytext'))
    16  *     echo "ok\n";
     13 *     check_column( 'wp_links', 'link_description', 'mediumtext' );
     14 *     if ( check_column( $wpdb->comments, 'comment_author', 'tinytext' ) ) {
     15 *         echo "ok\n";
     16 *     }
    1717 *
    18  * $error_count = 0;
    19  * $tablename = $wpdb->links;
    20  * // check the column
    21  * if (!check_column($wpdb->links, 'link_description', 'varchar(255)')) {
    22  *     $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
    23  *     $q = $wpdb->query($ddl);
    24  * }
     18 *     $error_count = 0;
     19 *     $tablename = $wpdb->links;
     20 *     // Check the column.
     21 *     if ( ! check_column($wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
     22 *         $ddl = "ALTER TABLE $wpdb->links MODIFY COLUMN link_description varchar(255) NOT NULL DEFAULT '' ";
     23 *         $q = $wpdb->query( $ddl );
     24 *     }
    2525 *
    26  * if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
    27  *     $res .= $tablename . ' - ok <br />';
    28  * } else {
    29  *     $res .= 'There was a problem with ' . $tablename . '<br />';
    30  *     ++$error_count;
    31  * }
    32  * </code>
     26 *     if ( check_column( $wpdb->links, 'link_description', 'varchar( 255 )' ) ) {
     27 *         $res .= $tablename . ' - ok <br />';
     28 *     } else {
     29 *         $res .= 'There was a problem with ' . $tablename . '<br />';
     30 *         ++$error_count;
     31 *     }
    3332 *
    3433 * @package WordPress
Note: See TracChangeset for help on using the changeset viewer.