Make WordPress Core

Ticket #52530: 52530-2.diff

File 52530-2.diff, 1.6 KB (added by Tkama, 4 years ago)
  • wp-includes/general-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    42664266        }
    42674267
    42684268        $add_args   = $args['add_args'];
    4269         $r          = '';
     4269        $result     = '';
    42704270        $page_links = array();
    42714271        $dots       = false;
    42724272
     
    43444344
    43454345        switch ( $args['type'] ) {
    43464346                case 'array':
    4347                         return $page_links;
     4347                        $result = $page_links;
     4348                        break;
    43484349
    43494350                case 'list':
    4350                         $r .= "<ul class='page-numbers'>\n\t<li>";
    4351                         $r .= implode( "</li>\n\t<li>", $page_links );
    4352                         $r .= "</li>\n</ul>\n";
     4351                        $result .= "<ul class='page-numbers'>\n\t<li>";
     4352                        $result .= implode( "</li>\n\t<li>", $page_links );
     4353                        $result .= "</li>\n</ul>\n";
    43534354                        break;
    43544355
    43554356                default:
    4356                         $r = implode( "\n", $page_links );
     4357                        $result = implode( "\n", $page_links );
    43574358                        break;
    43584359        }
    43594360
    4360         return $r;
     4361        /**
     4362         * Allow to change paginate_links() result.
     4363         *
     4364         * It also applies to all pagination functions, like:
     4365         * - the_posts_pagination()
     4366         * - get_the_posts_pagination()
     4367         * - paginate_comments_links()
     4368         * - paginate_links().
     4369         *
     4370         * @since 5.7.0
     4371         *
     4372         * @param string|array $result Pagination HTML or array of elements.
     4373         * @param string       $type   Type of $sesult. May be: `array`, `list`, `plain`.
     4374         * @param array        $args   Arguments of {@see paginate_links()}.
     4375         */
     4376        return apply_filters( 'get_paginate_links', $result, $args['type'], $args );
    43614377}
    43624378
    43634379/**