Ticket #5652: 5652-link_-revision.diff
File 5652-link_-revision.diff, 5.1 KB (added by , 16 years ago) |
---|
-
bookmark-template.php
13 13 * to retrieve the bookmark to be used in the output. 14 14 * 15 15 * The output is formatted as HTML with no way to change that format. However, what 16 * is between, before, a ndafter can be changed. The link itself will be HTML.16 * is between, before, after, link_before, and link_after can be changed. The link itself will be HTML. 17 17 * 18 18 * This function is used internally by wp_list_bookmarks() and should not be used by 19 19 * themes. … … 25 25 * 'before' - Default is '<li>' (string). The html or text to prepend to each bookmarks. 26 26 * 'after' - Default is '</li>' (string). The html or text to append to each bookmarks. 27 27 * 'between' - Default is '\n' (string). The string for use in between the link, description, and image. 28 * 'link_before' - Default is '' (string). The html or text to add inside the hyperlink before the link text. 29 * 'link_after' - Default is '' (string). The html or text to add inside the hyperlink after the link text. 28 30 * 'show_rating' - Default is 0 (integer). Whether to show the link rating. 29 31 * 30 32 * @since 2.1 … … 40 42 'show_updated' => 0, 'show_description' => 0, 41 43 'show_images' => 1, 'before' => '<li>', 42 44 'after' => '</li>', 'between' => "\n", 45 'link_before' => '', 'link_after' => '', 43 46 'show_rating' => 0 44 47 ); 45 48 … … 85 88 86 89 $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>'; 87 90 91 $output .= $link_before; 92 88 93 if ( $bookmark->link_image != null && $show_images ) { 89 94 if ( strpos($bookmark->link_image, 'http') !== false ) 90 95 $output .= "<img src=\"$bookmark->link_image\" $alt $title />"; … … 94 99 $output .= $name; 95 100 } 96 101 102 $output .= $link_after; 103 97 104 $output .= '</a>'; 98 105 99 106 if ( $show_updated && $bookmark->recently_updated ) -
post-template.php
160 160 'before' => '<p>' . __('Pages:'), 'after' => '</p>', 161 161 'next_or_number' => 'number', 'nextpagelink' => __('Next page'), 162 162 'previouspagelink' => __('Previous page'), 'pagelink' => '%', 163 'link_before' => '', 'link_after' => '', 163 164 'more_file' => '', 'echo' => 1 164 165 ); 165 166 … … 182 183 if ( ($i != $page) || ((!$more) && ($page==1)) ) { 183 184 if ( 1 == $i ) { 184 185 $output .= '<a href="' . get_permalink() . '">'; 186 $output .= $link_before; 185 187 } else { 186 188 if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) 187 189 $output .= '<a href="' . get_permalink() . '&page=' . $i . '">'; 190 $output .= $link_before; 188 191 else 189 192 $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">'; 193 $output .= $link_before; 190 194 } 191 195 } 192 196 $output .= $j; 193 197 if ( ($i != $page) || ((!$more) && ($page==1)) ) 198 $output .= $link_after; 194 199 $output .= '</a>'; 195 200 } 196 201 $output .= $after; … … 200 205 $i = $page - 1; 201 206 if ( $i && $more ) { 202 207 if ( 1 == $i ) { 203 $output .= '<a href="' . get_permalink() . '">' . $ previouspagelink. '</a>';208 $output .= '<a href="' . get_permalink() . '">' . $link_before . $previouspagelink . $link_after . '</a>'; 204 209 } else { 205 210 if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) 206 $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $ previouspagelink. '</a>';211 $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $link_before . $previouspagelink . $link_after . '</a>'; 207 212 else 208 $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $ previouspagelink. '</a>';213 $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $link_before . $previouspagelink . $link_after . '</a>'; 209 214 } 210 215 } 211 216 $i = $page + 1; 212 217 if ( $i <= $numpages && $more ) { 213 218 if ( 1 == $i ) { 214 $output .= '<a href="' . get_permalink() . '">' . $ nextpagelink. '</a>';219 $output .= '<a href="' . get_permalink() . '">' . $link_before . $nextpagelink . $link_after . '</a>'; 215 220 } else { 216 221 if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) 217 $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $ nextpagelink. '</a>';222 $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $link_before . $nextpagelink . $link_after . '</a>'; 218 223 else 219 $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $ nextpagelink. '</a>';224 $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $link_before . $nextpagelink . $link_after . '</a>'; 220 225 } 221 226 } 222 227 $output .= $after;