这个paginate_links
Codex function reference 有一些示例代码正在网上重新发布。
它有一个使用变量的节,该变量名为$big = 999999999; // need an unlikely integer
:
echo paginate_links( array(
\'base\' => str_replace( $big, \'%#%\', esc_url( get_pagenum_link( $big ) ) ),
\'format\' => \'?paged=%#%\',
\'current\' => max( 1, get_query_var(\'paged\') ),
\'total\' => $wp_query->max_num_pages
) );
和用于str_replace
在echo paginate_links
作用这是某种形式的封装吗?