Make WordPress Core


Ignore:
Timestamp:
11/24/2014 06:30:19 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:

  • Backtick-escape code snippets in the description for get_object_taxonomies()
  • Backtick-escape inline code in a markdown-formatted unordered list in the description for get_taxonomy_labels()
  • Remove an HTML tag from the summary for the Walker_Category_Checklist class
  • Remove an HTML tag from the summary for wp_category_checklist(), various formatting
  • Remove an HTML tag from the summary for wp_terms_checklist()
  • Backtick-escape an HTML tag in the description for wp_popular_terms_checklist()
  • Remove HTML tags from the summaries for page_template_dropdown(), parent_dropdown(), and wp_dropdown_roles()
  • Backtick-escape HTML tags in a parameter description for add_settings_error()
  • Various formatting in the description and summary for settings_errors()
  • Markdown-indent code snippets in the descriptions for wpdb::prepare(), wpdb::insert(), wpdb::replace(), wpdb::update(), and wpdb::delete()
  • Backtick-escape an HTML tag in a parameter description for login_header()
  • Remove HTML tags from the summaries for the lostpassword_form and signup_header hooks

Props rarst.
See #30473.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r30400 r30546  
    11731173     * Both %d and %s should be left unquoted in the query string.
    11741174     *
    1175      * <code>
    1176      * wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 )
    1177      * wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
    1178      * </code>
     1175     *     wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 )
     1176     *     wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
    11791177     *
    11801178     * @link http://php.net/sprintf Description of syntax.
     
    17251723     * Insert a row into a table.
    17261724     *
    1727      * <code>
    1728      * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
    1729      * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
    1730      * </code>
     1725     *     wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
     1726     *     wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
    17311727     *
    17321728     * @since 2.5.0
     
    17481744     * Replace a row into a table.
    17491745     *
    1750      * <code>
    1751      * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
    1752      * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
    1753      * </code>
     1746     *     wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
     1747     *     wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
    17541748     *
    17551749     * @since 3.0.0
     
    18151809     * Update a row in the table
    18161810     *
    1817      * <code>
    1818      * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) )
    1819      * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) )
    1820      * </code>
     1811     *     wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) )
     1812     *     wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) )
    18211813     *
    18221814     * @since 2.5.0
     
    18691861     * Delete a row in the table
    18701862     *
    1871      * <code>
    1872      * wpdb::delete( 'table', array( 'ID' => 1 ) )
    1873      * wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) )
    1874      * </code>
     1863     *     wpdb::delete( 'table', array( 'ID' => 1 ) )
     1864     *     wpdb::delete( 'table', array( 'ID' => 1 ), array( '%d' ) )
    18751865     *
    18761866     * @since 3.4.0
Note: See TracChangeset for help on using the changeset viewer.