Changeset 428457
- Timestamp:
- 08/25/2011 04:38:49 AM (15 years ago)
- Location:
- u-more-recent-posts
- Files:
-
- 4 edited
-
tags/1.4.1/inc/script.js (modified) (1 diff)
-
tags/1.4.1/u-more-recent-posts.php (modified) (5 diffs)
-
trunk/inc/script.js (modified) (1 diff)
-
trunk/u-more-recent-posts.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
u-more-recent-posts/tags/1.4.1/inc/script.js
r428453 r428457 63 63 nav = $t.find('.umrp-nav'); 64 64 65 var list_pos = list.position(); 66 progress.css({top: list_pos.top}); 65 if( progress.length ){ 66 var list_pos = list.position(); 67 progress.css({top: list_pos.top}); 68 } 67 69 } 68 70 -
u-more-recent-posts/tags/1.4.1/u-more-recent-posts.php
r428453 r428457 72 72 'current_postid' => $_POST['current_postid'], 73 73 ); 74 $this->the_list_for_widget( $args );74 echo $this->get_the_list_for_widget( $args ); 75 75 break; 76 76 … … 82 82 'options' => (array) $_POST['options'], 83 83 ); 84 $this->the_list_for_shortcode( $args );84 echo $this->get_the_list_for_shortcode( $args ); 85 85 break; 86 86 … … 96 96 } 97 97 98 function the_list_for_widget( $args ){98 function get_the_list_for_widget( $args ){ 99 99 if( empty($args['widget_id']) ) 100 100 return false; 101 101 $args['options'] = $this->get_widget_option( $args['widget_id'] ); 102 102 $args['cookie_key'] = 'wp-'.$args['widget_id'].'-paged'; 103 echo$this->get_the_list($args);104 } 105 106 function the_list_for_shortcode( $args ){103 return $this->get_the_list($args); 104 } 105 106 function get_the_list_for_shortcode( $args ){ 107 107 if( empty($args['widget_id']) ) 108 108 return false; 109 109 $args['cookie_key'] = 'wp-'.$args['widget_id'].'-paged'; 110 echo$this->get_the_list( $args );110 return $this->get_the_list( $args ); 111 111 } 112 112 … … 293 293 'options' => $opts, 294 294 ); 295 ?> 296 <div class="umrp-shortcode" id="<?php echo $id?>"> 297 <?php if( $opts['title'] ){ ?> 298 <h3 class="umrp-title"><?php echo $opts['title']?></h3> 299 <?php } ?> 300 <div id="<?php echo $id?>-container" class="umrp-container <?php echo $container_class?>"> 301 <?php echo $this->the_list_for_shortcode($args);?> 302 <!--<?php echo json_encode($opts)?>--> 303 </div> 304 </div> 305 <?php 295 296 $ret = '<div class="umrp-shortcode" id="'.$id.'">'; 297 if( $opts['title'] ) 298 $ret .= '<h3 class="umrp-title">'.$opts['title'].'</h3>'; 299 $ret .= '<div id="'.$id.'-container" class="umrp-container '.$container_class.'">'; 300 $ret .= $this->get_the_list_for_shortcode($args); 301 $ret .= '<!--'.json_encode($opts).'-->'; 302 $ret .= '</div>'; 303 $ret .= '</div>'; 304 return $ret; 306 305 } 307 306 … … 415 414 416 415 <div id="umrp-<?php echo $id?>-container" class="umrp-container <?php echo $container_class?>"> 417 <?php $umrp->the_list_for_widget( $args );?>416 <?php echo $umrp->get_the_list_for_widget( $args );?> 418 417 </div> 419 418 -
u-more-recent-posts/trunk/inc/script.js
r428453 r428457 63 63 nav = $t.find('.umrp-nav'); 64 64 65 var list_pos = list.position(); 66 progress.css({top: list_pos.top}); 65 if( progress.length ){ 66 var list_pos = list.position(); 67 progress.css({top: list_pos.top}); 68 } 67 69 } 68 70 -
u-more-recent-posts/trunk/u-more-recent-posts.php
r428453 r428457 72 72 'current_postid' => $_POST['current_postid'], 73 73 ); 74 $this->the_list_for_widget( $args );74 echo $this->get_the_list_for_widget( $args ); 75 75 break; 76 76 … … 82 82 'options' => (array) $_POST['options'], 83 83 ); 84 $this->the_list_for_shortcode( $args );84 echo $this->get_the_list_for_shortcode( $args ); 85 85 break; 86 86 … … 96 96 } 97 97 98 function the_list_for_widget( $args ){98 function get_the_list_for_widget( $args ){ 99 99 if( empty($args['widget_id']) ) 100 100 return false; 101 101 $args['options'] = $this->get_widget_option( $args['widget_id'] ); 102 102 $args['cookie_key'] = 'wp-'.$args['widget_id'].'-paged'; 103 echo$this->get_the_list($args);104 } 105 106 function the_list_for_shortcode( $args ){103 return $this->get_the_list($args); 104 } 105 106 function get_the_list_for_shortcode( $args ){ 107 107 if( empty($args['widget_id']) ) 108 108 return false; 109 109 $args['cookie_key'] = 'wp-'.$args['widget_id'].'-paged'; 110 echo$this->get_the_list( $args );110 return $this->get_the_list( $args ); 111 111 } 112 112 … … 293 293 'options' => $opts, 294 294 ); 295 ?> 296 <div class="umrp-shortcode" id="<?php echo $id?>"> 297 <?php if( $opts['title'] ){ ?> 298 <h3 class="umrp-title"><?php echo $opts['title']?></h3> 299 <?php } ?> 300 <div id="<?php echo $id?>-container" class="umrp-container <?php echo $container_class?>"> 301 <?php echo $this->the_list_for_shortcode($args);?> 302 <!--<?php echo json_encode($opts)?>--> 303 </div> 304 </div> 305 <?php 295 296 $ret = '<div class="umrp-shortcode" id="'.$id.'">'; 297 if( $opts['title'] ) 298 $ret .= '<h3 class="umrp-title">'.$opts['title'].'</h3>'; 299 $ret .= '<div id="'.$id.'-container" class="umrp-container '.$container_class.'">'; 300 $ret .= $this->get_the_list_for_shortcode($args); 301 $ret .= '<!--'.json_encode($opts).'-->'; 302 $ret .= '</div>'; 303 $ret .= '</div>'; 304 return $ret; 306 305 } 307 306 … … 415 414 416 415 <div id="umrp-<?php echo $id?>-container" class="umrp-container <?php echo $container_class?>"> 417 <?php $umrp->the_list_for_widget( $args );?>416 <?php echo $umrp->get_the_list_for_widget( $args );?> 418 417 </div> 419 418
Note: See TracChangeset
for help on using the changeset viewer.