Changeset 397471
- Timestamp:
- 06/15/2011 12:41:22 PM (15 years ago)
- Location:
- randomtext/trunk
- Files:
-
- 3 edited
-
randomtext.php (modified) (1 diff)
-
randomtext_admin.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
randomtext/trunk/randomtext.php
r393494 r397471 5 5 Plugin URI: http://www.pantsonhead.com/wordpress/randomtext/ 6 6 Description: A widget to display randomized text on your site 7 Version: 0.2. 77 Version: 0.2.8 8 8 Author: Greg Jackson 9 9 Author URI: http://www.pantsonhead.com -
randomtext/trunk/randomtext_admin.php
r393494 r397471 69 69 $author = array(); 70 70 71 $lastitem = $startrow+count($rows); 72 73 74 // Make pagination links 75 if($startrow) { 76 if($paged > 1) { 77 $paging = '<a href="'.$pageURL.$page_params.'&paged='.($paged-1).'" class="prev page-numbers">«</a>'; 78 if($lastitem == $totalrows) 79 $paging .= '<a href="'.$pageURL.$page_params.'&paged='.($paged-2).'" class="page-numbers">'.($paged-2).'</a> '; 80 $paging .= '<a href="'.$pageURL.$page_params.'&paged='.($paged-1).'" class="page-numbers">'.($paged-1).'</a> 81 <span class="page-numbers current">'.$paged.'</span> '; 82 } 83 } 84 if($lastitem < $totalrows) { 85 if($paged==1) 86 $paging = '<span class="page-numbers current">1</span> 87 <a href="'.$pageURL.$page_params.'&paged=2" class="page-numbers">2</a> 88 <a href="'.$pageURL.$page_params.'&paged=3" class="page-numbers">3</a> 89 <a href="'.$pageURL.$page_params.'&paged=2" class="next page-numbers">»</a>'; 90 else 91 $paging .= '<a href="'.$pageURL.$page_params.'&paged='.($paged+1).'" class="page-numbers">'.($paged+1).'</a> 92 <a href="'.$pageURL.$page_params.'&paged='.($paged+1).'" class="next page-numbers">»</a>'; 93 } 94 95 $item_range = $lastitem<2 ? $lastitem : ($startrow+1).'-'.$lastitem; 96 $paging = ''; 71 $num_pages = 1+floor($totalrows/$perpage); 72 73 $paging = paginate_links( array( 74 'base' => add_query_arg( 'paged', '%#%' ), 75 'format' => '', 76 'prev_text' => __('«'), 77 'next_text' => __('»'), 78 'total' => $num_pages, 79 'current' => $paged 80 )); 81 97 82 ?> 98 83 <div class="wrap"> -
randomtext/trunk/readme.txt
r393494 r397471 35 35 Yes, you can use [randomtext] or [randomtext category="funny"] or even [randomtext category="funny" random="1"]. 36 36 37 = What about template tags? = 38 39 You can use something like this, where 'category' is the group you wish to select items from. 40 < ?php randomtext('category'); ?> 41 37 42 38 43 == Changelog == 44 45 = v0.2.8 2011-06-15 = 46 47 * Fixed pagination issues on admin page. 39 48 40 49 = v0.2.7 2011-06-05 =
Note: See TracChangeset
for help on using the changeset viewer.