WordPress: Template Tags/link pages:修订间差异
(新页面: {{Deprecated}} == Description == Displays page-links for paginated posts (i.e. includes the <code><!--nextpage--></code> Quicktag one ...) |
无编辑摘要 |
||
第1行: | 第1行: | ||
{{Deprecated}} | {{Deprecated}} | ||
{{取消的}} | |||
== Description == | == Description == | ||
== 描述 == | |||
Displays page-links for paginated posts (i.e. includes the <code><!--nextpage--></code> [[WordPress:Write_Post_SubPanel#Quicktags | Quicktag]] one or more times). This tag works similarly to [[WordPress:Template_Tags/wp_link_pages|wp_link_pages()]]. This tag must be within [[WordPress:The_Loop]]. | Displays page-links for paginated posts (i.e. includes the <code><!--nextpage--></code> [[WordPress:Write_Post_SubPanel#Quicktags | Quicktag]] one or more times). This tag works similarly to [[WordPress:Template_Tags/wp_link_pages|wp_link_pages()]]. This tag must be within [[WordPress:The_Loop]]. | ||
为标了页数的文章显示网页链接(例如,包括<code><!—下一个网页--></code> [[WordPress:Write_Post_SubPanel#Quicktags | Quicktag]]一次或者几次)。这与[[WordPress:Template_Tags/wp_link_pages|wp_link_pages()]]的运行方式基本相同,标签必须在[[WordPress:The_Loop|The_Loop]]内部。 | |||
== Replace With == | == Replace With == | ||
== 取代 == | |||
[[WordPress:Template_Tags/wp_link_pages|wp_link_pages()]]. | [[WordPress:Template_Tags/wp_link_pages|wp_link_pages()]]. | ||
[[WordPress:Template_Tags/wp_link_pages|wp_链接_网页()]]。 | |||
== Usage == | == Usage == | ||
== 用法 == | |||
%%% <?php link_pages('before', 'after', 'next_or_number', | |||
'nextpagelink', 'previouspagelink', 'pagelink', | |||
'more_file'); ?> %%% | |||
%%% <?php link_pages('before', 'after', 'next_or_number', | %%% <?php link_pages('before', 'after', 'next_or_number', | ||
第17行: | 第32行: | ||
===Default Usage=== | ===Default Usage=== | ||
== 例子== | |||
== 默认用法 == | |||
Displays page-links by default with line breaks before and after, using ''next page'' and ''previous page'', listing them with page numbers as ''Page 1, Page 2'' and so on. | Displays page-links by default with line breaks before and after, using ''next page'' and ''previous page'', listing them with page numbers as ''Page 1, Page 2'' and so on. | ||
默认显示网页链接,网页链接的前后都有行分隔符,使用''上一页'' 和''下一页'',并将这些网页标号为''第 1页,第 2页''等等。 | |||
<?php link_pages(); ?> | <?php link_pages(); ?> | ||
<?php link_pages(); ?> | |||
===Page-links in Paragraph Tags=== | ===Page-links in Paragraph Tags=== | ||
===段落标签中的网页链接=== | |||
Displays page-links wrapped in paragraph tags. | Displays page-links wrapped in paragraph tags. | ||
显示由段落标签包围的网页链接。 | |||
<?php link_pages('<p>', '</p>', 'number', '', '', 'page %'); ?> | <?php link_pages('<p>', '</p>', 'number', '', '', 'page %'); ?> | ||
<?php link_pages('<p>', '</p>', 'number', '', '', 'page %'); ?> | |||
== Parameters == | == Parameters == | ||
== 参数== | |||
; before : (''string'') Text to put before all the links. Defaults to <tt>'<br />'</tt>. | ; before : (''string'') Text to put before all the links. Defaults to <tt>'<br />'</tt>. | ||
;之前:(''string'')所有的链接之前放置的文本。默认为<tt>'<br />'</tt>。 | |||
; after : (''string'') Text to put after all the links. Defaults to <tt>'<br />'</tt>. | ; after : (''string'') Text to put after all the links. Defaults to <tt>'<br />'</tt>. | ||
;之后:(''string'')所有的链接之后放置的文本。默认为<tt>'<br />'</tt>。 | |||
; next_or_number : (''string'') Indicates whether page numbers should be used. Valid values are: | ; next_or_number : (''string'') Indicates whether page numbers should be used. Valid values are: | ||
; 下一个_或者_数字 : (''string'')暗示是否会用到网页页码。有效的参数值是: | |||
:* <tt>'number'</tt> (Default) | :* <tt>'number'</tt> (Default) | ||
:* <tt>数字</tt> (默认) | |||
:* <tt>'next'</tt> (Valid in WordPress 1.5 or after) | :* <tt>'next'</tt> (Valid in WordPress 1.5 or after) | ||
:* <tt>下一个</tt> (在 WordPress 1.5 或者以后的版本中有效) | |||
; nextpagelink : (''string'') Text for link to next page. Defaults to <tt>'next page'</tt>. (Valid in WordPress 1.5 or after) | ; nextpagelink : (''string'') Text for link to next page. Defaults to <tt>'next page'</tt>. (Valid in WordPress 1.5 or after) | ||
; 下一个网页链接 : (''string'')链接到下一个网页的文本 。默认为<tt>'下一个网页'</tt>。(在WordPress1.5及以后的版本中有效) | |||
; previouspagelink: (''string'') Text for link to previous page. Defaults to <tt>'previous page'</tt>. (Valid in WordPress 1.5 or after) | ; previouspagelink: (''string'') Text for link to previous page. Defaults to <tt>'previous page'</tt>. (Valid in WordPress 1.5 or after) | ||
; 上一个网页链接: (''string'') 链接到上一个网页的文本。默认为<tt>上一个网页</tt>。(在WordPress1.5及以后的版本中有效) | |||
; pagelink : (''string'') Format string for page numbers. <tt>'%'</tt> in the string will be replaced with the number, so <tt>'Page %'</tt> would generate "Page 1", "Page 2", etc. Defaults to <tt>'%'</tt>. | ; pagelink : (''string'') Format string for page numbers. <tt>'%'</tt> in the string will be replaced with the number, so <tt>'Page %'</tt> would generate "Page 1", "Page 2", etc. Defaults to <tt>'%'</tt>. | ||
; 网页链接 : (''string'')网页页码的格式字符串。字符串中的<tt>'%'</tt>会被数字取代,因此<tt>'Page %'</tt>会产生"第一 页", "第2页",等等。默认为<tt>'%'</tt>。 | |||
; more_file : (''string'') Page the links should point to. Defaults to the current page. | ; more_file : (''string'') Page the links should point to. Defaults to the current page. | ||
; 更多的_文件 : (''string'')链接指向的而网页。默认为当前网页。 | |||
== Related == | == Related == | ||
== 相关的 == | |||
To use the query string to pass parameters, see [[WordPress:Template_Tags/wp_link_pages|wp_link_pages()]] | To use the query string to pass parameters, see [[WordPress:Template_Tags/wp_link_pages|wp_link_pages()]] | ||
要使用字符串来传递参数,请看看[[WordPress:Template_Tags/wp_link_pages|wp_链接_网页()]] | |||
{{Tag Link Tags}} | {{Tag Link Tags}} | ||
{{PHP Function Tag Footer}} | {{PHP Function Tag Footer}} | ||
{{标签 链接标签}} | |||
{{PHP函数标签 页底文字}} |
2008年7月5日 (六) 15:42的版本
This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists.
Description
描述
Displays page-links for paginated posts (i.e. includes the <!--nextpage-->
Quicktag one or more times). This tag works similarly to wp_link_pages(). This tag must be within WordPress:The_Loop.
为标了页数的文章显示网页链接(例如,包括<!—下一个网页-->
Quicktag一次或者几次)。这与wp_link_pages()的运行方式基本相同,标签必须在The_Loop内部。
Replace With
取代
Usage
用法
%%% <?php link_pages('before', 'after', 'next_or_number',
'nextpagelink', 'previouspagelink', 'pagelink', 'more_file'); ?> %%%
%%% <?php link_pages('before', 'after', 'next_or_number',
'nextpagelink', 'previouspagelink', 'pagelink', 'more_file'); ?> %%%
Examples
Default Usage
例子
默认用法
Displays page-links by default with line breaks before and after, using next page and previous page, listing them with page numbers as Page 1, Page 2 and so on.
默认显示网页链接,网页链接的前后都有行分隔符,使用上一页 和下一页,并将这些网页标号为第 1页,第 2页等等。
<?php link_pages(); ?>
<?php link_pages(); ?>
Page-links in Paragraph Tags
段落标签中的网页链接
Displays page-links wrapped in paragraph tags.
显示由段落标签包围的网页链接。
<?php link_pages('<p>', '</p>', 'number', '', '', 'page %'); ?>
<?php link_pages('<p>', '</p>', 'number', '', '', 'page %'); ?>
Parameters
参数
- before
- (string) Text to put before all the links. Defaults to '<br />'.
;之前:(string)所有的链接之前放置的文本。默认为'<br />'。
- after
- (string) Text to put after all the links. Defaults to '<br />'.
;之后:(string)所有的链接之后放置的文本。默认为'<br />'。
- next_or_number
- (string) Indicates whether page numbers should be used. Valid values are:
- 下一个_或者_数字
- (string)暗示是否会用到网页页码。有效的参数值是:
- 'number' (Default)
- 数字 (默认)
- 'next' (Valid in WordPress 1.5 or after)
- 下一个 (在 WordPress 1.5 或者以后的版本中有效)
- nextpagelink
- (string) Text for link to next page. Defaults to 'next page'. (Valid in WordPress 1.5 or after)
- 下一个网页链接
- (string)链接到下一个网页的文本 。默认为'下一个网页'。(在WordPress1.5及以后的版本中有效)
- previouspagelink
- (string) Text for link to previous page. Defaults to 'previous page'. (Valid in WordPress 1.5 or after)
- 上一个网页链接
- (string) 链接到上一个网页的文本。默认为上一个网页。(在WordPress1.5及以后的版本中有效)
- pagelink
- (string) Format string for page numbers. '%' in the string will be replaced with the number, so 'Page %' would generate "Page 1", "Page 2", etc. Defaults to '%'.
- 网页链接
- (string)网页页码的格式字符串。字符串中的'%'会被数字取代,因此'Page %'会产生"第一 页", "第2页",等等。默认为'%'。
- more_file
- (string) Page the links should point to. Defaults to the current page.
- 更多的_文件
- (string)链接指向的而网页。默认为当前网页。
Related
相关的
To use the query string to pass parameters, see wp_link_pages()
要使用字符串来传递参数,请看看wp_链接_网页()