#21343 closed defect (bug) (duplicate)
WP Codex: wp_link_pages() $args example has errors
Reported by: | anointed | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | WordPress.org Site | Keywords: | |
Focuses: | Cc: |
Description
On this link:
http://codex.wordpress.org/Function_Reference/wp_link_pages
the example arguments are given as such:
$args = array( 'before' => '<p>' . __('Pages:'), 'after' => '</p>', 'link_before' => , 'link_after' => , 'next_or_number' => 'number', 'nextpagelink' => __('Next page'), 'previouspagelink' => __('Previous page'), 'pagelink' => '%', 'more_file' => , 'echo' => 1 );
It should read:
$args = array( 'before' => '<p>' . __('Pages:'), 'after' => '</p>', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'nextpagelink' => __('Next page'), 'previouspagelink' => __('Previous page'), 'pagelink' => '%', 'more_file' => '', 'echo' => 1 );
Basically the quote marks are missing on the args (link_before, link_after, and more_file) thus causing an error.
*Not even sure if this is where to report this type of issue, sorry if it's not.
Change History (8)
#2
follow-up:
↓ 4
@
12 years ago
- Resolution set to invalid
- Status changed from new to closed
Sorry about that. I had no idea I could edit it. I see someone already fixed the quotes (they show as fixed when I go into edit, but not live, prob not approved yet).
I made the more_file change you mentioned so I could try it out.
#3
@
12 years ago
- Milestone Awaiting Review deleted
It's live, but it seems like the syntax highlighter doesn't display it.
#4
in reply to:
↑ 2
@
12 years ago
Replying to anointed:
I see someone already fixed the quotes (they show as fixed when I go into edit, but not live, prob not approved yet).
No, they're not fixed yet. They're just interpreted as <i>
tags on output. I've experimented with MediaWiki markup a bit, but couldn't find a way yet to suppress interpretation of wiki markup and keep syntax highlighting at the same time.
#5
follow-up:
↓ 7
@
12 years ago
I noticed similar problem with many other functions, for example http://codex.wordpress.org/Function_Reference/wp_nav_menu
It can be solved by wrapping the whole default usage code, for example http://codex.wordpress.org/Function_Reference/wp_list_pages
The Codex is a wiki, so any logged-in user can edit it. You want to give it a try?
BTW:
more_file
can be also removed. It's unused since [12105].