WordPress.org

Make WordPress Core

Ticket #24616: 24616.patch

File 24616.patch, 7.0 KB (added by SergeyBiryukov, 5 years ago)
  • wp-includes/category-template.php

     
    3737 * @param string $separator Optional, default is '/'. How to separate categories.
    3838 * @param bool $nicename Optional, default is false. Whether to use nice name for display.
    3939 * @param array $visited Optional. Already linked to categories to prevent duplicates.
    40  * @return string
     40 * @return string|WP_Error A list of category parents on success, WP_Error on failure.
    4141 */
    4242function get_category_parents( $id, $link = false, $separator = '/', $nicename = false, $visited = array() ) {
    4343        $chain = '';
     
    131131 * @since 0.71
    132132 *
    133133 * @param int $cat_ID Category ID.
    134  * @return string Category name.
     134 * @return string|WP_Error Category name on success, WP_Error on failure.
    135135 */
    136136function get_the_category_by_ID( $cat_ID ) {
    137137        $cat_ID = (int) $cat_ID;
     
    980980 * @uses apply_filters() Calls 'get_the_tags' filter on the list of post tags.
    981981 *
    982982 * @param int $id Post ID.
    983  * @return array
     983 * @return array|bool Array of tag objects on success, false on failure.
    984984 */
    985985function get_the_tags( $id = 0 ) {
    986986        return apply_filters( 'get_the_tags', get_the_terms( $id, 'post_tag' ) );
     
    996996 * @param string $sep Optional. Between tags.
    997997 * @param string $after Optional. After tags.
    998998 * @param int $id Optional. Post ID. Defaults to the current post.
    999  * @return string
     999 * @return string|bool|WP_Error A list of tags on success, false or WP_Error on failure.
    10001000 */
    10011001function get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) {
    10021002        return apply_filters( 'the_tags', get_the_term_list( $id, 'post_tag', $before, $sep, $after ), $before, $sep, $after, $id );
     
    10101010 * @param string $before Optional. Before list.
    10111011 * @param string $sep Optional. Separate items using this.
    10121012 * @param string $after Optional. After list.
    1013  * @return string
    10141013 */
    10151014function the_tags( $before = null, $sep = ', ', $after = '' ) {
    10161015        if ( null === $before )
     
    10561055 *
    10571056 * @param mixed $post Post ID or object.
    10581057 * @param string $taxonomy Taxonomy name.
    1059  * @return array|bool False on failure. Array of term objects on success.
     1058 * @return array|bool|WP_Error Array of term objects on success, false or WP_Error on failure.
    10601059 */
    10611060function get_the_terms( $post, $taxonomy ) {
    10621061        if ( ! $post = get_post( $post ) )
     
    10861085 * @param string $before Optional. Before list.
    10871086 * @param string $sep Optional. Separate items using this.
    10881087 * @param string $after Optional. After list.
    1089  * @return string
     1088 * @return string|bool|WP_Error A list of terms on success, false or WP_Error on failure.
    10901089 */
    10911090function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = '' ) {
    10921091        $terms = get_the_terms( $id, $taxonomy );
  • wp-includes/formatting.php

     
    31163116 *
    31173117 * @since 2.5.0
    31183118 *
    3119  * @param integer $str String to get the excerpt from.
     3119 * @param string $str String to get the excerpt from.
    31203120 * @param integer $count Maximum number of characters to take.
    31213121 * @param string $more Optional. What to append if $str needs to be trimmed. Defaults to empty string.
    31223122 * @return string The excerpt.
  • wp-includes/js/quicktags.js

     
    296296         *     QTags.addButton( 'my_id', 'my button', '<span>', '</span>' );
    297297         *     QTags.addButton( 'my_id2', 'my button', '<br />' );
    298298         *
    299          * @param id string required Button HTML ID
    300          * @param display string required Button's value="..."
    301          * @param arg1 string || function required Either a starting tag to be inserted like "<span>" or a callback that is executed when the button is clicked.
    302          * @param arg2 string optional Ending tag like "</span>"
    303          * @param access_key string optional Access key for the button.
    304          * @param title string optional Button's title="..."
    305          * @param priority int optional Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
    306          * @param instance string optional Limit the button to a specifric instance of Quicktags, add to all instances if not present.
     299         * @param string id Required. Button HTML ID
     300         * @param string display Required. Button's value="..."
     301         * @param string|function arg1 Required. Either a starting tag to be inserted like "<span>" or a callback that is executed when the button is clicked.
     302         * @param string arg2 Optional. Ending tag like "</span>"
     303         * @param string access_key Optional. Access key for the button.
     304         * @param string title Optional. Button's title="..."
     305         * @param int priority Optional. Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc.
     306         * @param string instance Optional. Limit the button to a specifric instance of Quicktags, add to all instances if not present.
    307307         * @return mixed null or the button object that is needed for back-compat.
    308308         */
    309309        qt.addButton = function( id, display, arg1, arg2, access_key, title, priority, instance ) {
  • wp-includes/post.php

     
    725725 * @uses sanitize_post_field() See for possible $context values.
    726726 *
    727727 * @param string $field Post field name
    728  * @param id $post Post ID
    729  * @param string $context Optional. How to filter the field. Default is display.
    730  * @return bool|string False on failure or returns the value in post field
     728 * @param int $post Post ID
     729 * @param string $context Optional. How to filter the field. Default is 'display'.
     730 * @return string The value of the post field on success, empty string on failure.
    731731 */
    732732function get_post_field( $field, $post, $context = 'display' ) {
    733733        $post = get_post( $post );
     
    750750 * @since 2.0.0
    751751 *
    752752 * @param int $ID Optional. Post ID.
    753  * @return bool|string False on failure or returns the mime type
     753 * @return string|bool The mime type on success, false on failure.
    754754 */
    755755function get_post_mime_type($ID = '') {
    756756        $post = get_post($ID);
     
    770770 * @since 2.0.0
    771771 *
    772772 * @param int $ID Post ID
    773  * @return string|bool Post status or false on failure.
     773 * @return string|bool Post status on success, false on failure.
    774774 */
    775775function get_post_status($ID = '') {
    776776        $post = get_post($ID);
     
    10121012 * @uses $post The Loop current post global
    10131013 *
    10141014 * @param mixed $post Optional. Post object or post ID.
    1015  * @return bool|string post type or false on failure.
     1015 * @return string|bool Post type on success, false on failure.
    10161016 */
    10171017function get_post_type( $post = null ) {
    10181018        if ( $post = get_post( $post ) )