Changeset 652236
- Timestamp:
- 01/14/2013 01:54:07 AM (13 years ago)
- Location:
- post-tiles
- Files:
-
- 1 added
- 3 edited
-
tags/1.3.5 (added)
-
trunk/post-tiles.css (modified) (5 diffs)
-
trunk/post-tiles.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-tiles/trunk/post-tiles.css
r651739 r652236 47 47 } 48 48 #category-list { 49 50 49 float: left; 51 50 margin-left: 20px; 52 51 overflow: auto; 52 } 53 #category-list li { 54 padding: 5px 10px; 55 margin-bottom: 0; 53 56 } 54 57 .tc-note { … … 86 89 .category-key-list-item { 87 90 overflow: auto; 88 margin-top: 10px;89 91 margin-bottom: 0; 90 padding-top: 10px;91 padding-bottom: 0;92 92 border-top: 1px solid #dbdbdb; 93 margin-top: 0; 94 padding: 10px; 95 } 96 #category-list ul li:nth-child(odd) { 97 background-color: #f7f7f7; 93 98 } 94 99 .small-input { … … 98 103 width: 96px; 99 104 } 100 101 105 #submit-button { 102 margin-top: 10px;103 106 padding-top: 10px; 104 107 border-top: 1px solid #dbdbdb; 105 } 106 108 padding-bottom: 10px; 109 } 107 110 .category-key-radio { 108 111 float: left; … … 126 129 127 130 /* Frontend CSS */ 131 #post-tiles-container { 132 padding-top: 15px; 133 } 128 134 ul#post-tiles { 129 135 margin: 0; 130 padding: 14px10px 10px;136 padding: 0 10px 10px; 131 137 overflow: auto; 132 138 } … … 185 191 #category-key { 186 192 overflow: auto; 187 padding- top: 14px;188 padding- right: 0 !important;189 padding- left: 0 !important;193 padding-right: 0; 194 padding-left: 0; 195 padding-bottom: 14px; 190 196 } 191 197 #category-key a{ -
post-tiles/trunk/post-tiles.php
r651739 r652236 5 5 Description: This plugin displays recent posts as tiles. Posts can choose categories by id and numbeer of posts to display. Example shortcode: [post-tiles] or [post-tiles categories='1,2,4,10' posts='8' excerpt='18']. 6 6 Author: Ethan Hackett 7 Version: 1.3. 47 Version: 1.3.5 8 8 Author URI: http://www.posttiles.com 9 9 … … 122 122 $pagination_key = get_option('pagination-key'); 123 123 if(empty($pagination_key)){ 124 $pagination_key = " true";124 $pagination_key = "bottom"; 125 125 } 126 126 $featured_images_key = get_option('featured-images'); … … 258 258 <li class='category-key-list-item'> 259 259 <div class='category-key-radio'> 260 <input type="radio" name="pagination-key" <?php if($pagination_key == 'true') echo 'checked="checked"'; ?> value="true" /> Show 261 <input type="radio" name="pagination-key" <?php if($pagination_key == 'false') echo 'checked="checked"'; ?> value="false" /> hide 260 <select name="pagination-key" id="animation-style"> 261 <option value="none" <?php if($pagination_key == 'none') echo 'selected="selected"'; ?>>None</option> 262 <option value="top" <?php if($pagination_key == 'top') echo 'selected="selected"'; ?>>Top</option> 263 <option value="bottom" <?php if($pagination_key == 'bottom') echo 'selected="selected"'; ?>>Bottom</option> 264 <option value="both" <?php if($pagination_key == 'both') echo 'selected="selected"'; ?>>Both</option> 265 </select> 262 266 </div> 263 267 <div class='category-key-admin'> … … 454 458 $pagination_key = get_option('pagination-key'); 455 459 if(empty($pagination_key)){ 456 $pagination_key = "true"; 457 } 458 459 if ($pagination_key == "true") { 460 $pagination_key = "bottom"; 461 } 462 if ($pagination_key == "top" || $pagination_key == "both" || $pagination_key == "bottom") { 460 463 // Build out the pagination 461 464 global $wp_query; 462 465 // Get the total number of pages 463 466 $total_pages = $wp_query->max_num_pages; 464 // If the total of pages is greater than one create the pagination 465 if ($total_pages > 1){ 466 $current_page = max(1, get_query_var('paged')); 467 $pagination = paginate_links(array( 468 'base' => get_pagenum_link(1) . '%_%', 469 'format' => 'page/%#%', 467 // Fix the url leading slash 468 // Get the url 469 $url = get_permalink(); 470 // get the last character of the url string either / or not 471 $lastchar = substr( $url, -1 ); 472 // if the last character is or isn't a / configure the pagination formating accordingly 473 if ( $lastchar != '/' ){ 474 $format = "/page/%#%"; 475 } else { 476 $format = "page/%#%"; 477 } 478 // If the total of pages is greater than one create the pagination 479 if ($total_pages > 1){ 480 $current_page = max(1, get_query_var('paged')); 481 $pagination = paginate_links(array( 482 'base' => get_pagenum_link(1) . '%_%', 483 'format' => $format, 470 484 'current' => $current_page, 471 485 'total' => $total_pages, … … 476 490 } 477 491 } else { 478 $pagination = "<!-- Post Tiles pagination is disabled in the settings -->"; 479 } 480 481 492 $pagination = "<!-- Post Tiles pagination is disabled in the settings -->"; 493 } 494 if ($pagination_key == "top") { 495 $top_pagination = $pagination; 496 } elseif ($pagination_key == "bottom") { 497 $bottom_pagination = $pagination; 498 } elseif ($pagination_key == "both") { 499 $top_pagination = $pagination; 500 $bottom_pagination = $pagination; 501 } else { 502 $top_pagination = $pagination; 503 $bottom_pagination = $pagination; 504 } 482 505 483 506 // the loop … … 600 623 } 601 624 602 return $key_finished.'<ul id="post-tiles" '.$responsive.'>'.$output.'</ul>'.$pagination;625 return '<div id="post-tiles-container">'.$top_pagination.$key_finished.'<ul id="post-tiles" '.$responsive.'>'.$output.'</ul>'.$bottom_pagination.'</div>'; 603 626 604 627 $plugin_url = plugins_url()."/post-tiles"; -
post-tiles/trunk/readme.txt
r651739 r652236 5 5 Requires at least: 3.0 6 6 Tested up to: 3.5.0 7 Stable tag: 1.3. 47 Stable tag: 1.3.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 23 23 *NOTE:* The category id numbers are listed below, next to the category names. You can use both the categories and posts attributes **Example: [post-tiles categories='1,2,4' posts='8' excerpt='18']** 24 24 25 Version 1.3. 425 Version 1.3.5 26 26 27 27 == Installation == … … 45 45 46 46 == Changelog == 47 48 = 1.3.5 = 49 * Fixed a but with urls ending with or without forward slashes. 50 * Added pagination location options for top, bottom or both. 51 * Updated the admin panel to look a tad sexier. 47 52 48 53 = 1.3.4 =
Note: See TracChangeset
for help on using the changeset viewer.