Changeset 2619486
- Timestamp:
- 10/25/2021 02:50:05 PM (3 years ago)
- Location:
- recent-posts-widget-extended
- Files:
-
- 25 added
- 21 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
recent-posts-widget-extended/trunk/assets/css/rpwe-admin.css
r1033155 r2619486 1 .widgets-php .rpwe-columns-3 { 2 overflow: hidden; 3 float: left; 4 width: 31%; 5 margin-right: 3.5%; 1 .rpwe-options small { 2 font-size: 0.7em; 3 color: #999; 6 4 } 7 5 8 .widgets-php .rpwe-columns-3 select.widefat { 9 width: 98.5%; 6 .rpwe-info { 7 font-size: 0.8em; 8 line-height: 1.4; 10 9 } 11 10 12 .widgets-php .rpwe-column-last { 13 float: right; 14 margin-right: 0; 15 } 16 17 .widgets-php .rpwe-columns-3 label { 18 font-size: 11px; 19 } 20 21 .widgets-php .rpwe-columns-3 p small { 22 color: #777; 23 font-style: italic; 24 } 25 26 .small-input { 27 width: 30%; 11 .rpwe-options .small-input { 12 width: 32% !important; 13 display: inline-block !important; 28 14 } 29 15 30 16 .rpwe-block { 31 17 display: block; 32 18 } 33 34 .rpwe-multiple-check-form {35 margin: 1em 0;36 }37 38 .rpwe-multiple-check-form ul {39 border: 1px solid #eee;40 padding: 10px;41 max-height: 110px;42 overflow: auto;43 margin-top: 0;44 }45 46 .rpwe-multiple-check-form ul li:last-child {47 margin-bottom: 0;48 } -
recent-posts-widget-extended/trunk/classes/widget.php
r2476478 r2619486 4 4 * The custom recent posts widget. 5 5 * This widget gives total control over the output to the user. 6 *7 * @package Recent_Posts_Widget_Extended8 * @since 0.19 * @author Satrya10 * @copyright Copyright (c) 2014, Satrya11 * @license http://www.gnu.org/licenses/gpl-2.0.html12 6 */ 13 7 class Recent_Posts_Widget_Extended extends WP_Widget { -
recent-posts-widget-extended/trunk/includes/form.php
r2476478 r2619486 3 3 /** 4 4 * Widget forms. 5 *6 * @package Recent_Posts_Widget_Extended7 * @since 0.9.48 * @author Satrya9 * @copyright Copyright (c) 2014, Satrya10 * @license http://www.gnu.org/licenses/gpl-2.0.html11 5 */ 12 6 ?> 13 7 14 <div class="rpwe- columns-3">8 <div class="rpwe-"> 15 9 16 10 <p> … … 56 50 </p> 57 51 58 </div>59 60 <div class="rpwe-columns-3">61 52 62 53 <p> … … 78 69 <?php _e('Post Types', 'recent-posts-widget-extended'); ?> 79 70 </label> 80 <ul> 81 <?php foreach (get_post_types(array('public' => true), 'objects') as $type) : ?> 82 <li> 83 <input type="checkbox" value="<?php echo esc_attr($type->name); ?>" id="<?php echo $this->get_field_id('post_type') . '-' . $type->name; ?>" name="<?php echo $this->get_field_name('post_type'); ?>[]" <?php checked(is_array($instance['post_type']) && in_array($type->name, $instance['post_type'])); ?> /> 84 <label for="<?php echo $this->get_field_id('post_type') . '-' . $type->name; ?>"> 85 <?php echo esc_html($type->labels->name); ?> 86 </label> 87 </li> 88 <?php endforeach; ?> 89 </ul> 71 <?php foreach (get_post_types(array('public' => true), 'objects') as $type) : ?> 72 <p> 73 <input type="checkbox" value="<?php echo esc_attr($type->name); ?>" id="<?php echo $this->get_field_id('post_type') . '-' . $type->name; ?>" name="<?php echo $this->get_field_name('post_type'); ?>[]" <?php checked(is_array($instance['post_type']) && in_array($type->name, $instance['post_type'])); ?> /> 74 <label for="<?php echo $this->get_field_id('post_type') . '-' . $type->name; ?>"> 75 <?php echo esc_html($type->labels->name); ?> 76 </label> 77 </p> 78 <?php endforeach; ?> 90 79 </div> 91 80 … … 95 84 </label> 96 85 <select class="widefat" id="<?php echo $this->get_field_id('post_status'); ?>" name="<?php echo $this->get_field_name('post_status'); ?>" style="width:100%;"> 97 <?php foreach ( get_available_post_statuses() as $status_value => $status_label) { ?>86 <?php foreach () as $status_value => $status_label) { ?> 98 87 <option value="<?php echo esc_attr($status_label); ?>" <?php selected($instance['post_status'], $status_label); ?>><?php echo esc_html(ucfirst($status_label)); ?></option> 99 88 <?php } ?> … … 131 120 <?php _e('Limit to Category', 'recent-posts-widget-extended'); ?> 132 121 </label> 133 <ul> 134 <?php foreach (rpwe_cats_list() as $category) : ?> 135 <li> 136 <input type="checkbox" value="<?php echo (int) $category->term_id; ?>" id="<?php echo $this->get_field_id('cat') . '-' . (int) $category->term_id; ?>" name="<?php echo $this->get_field_name('cat'); ?>[]" <?php checked(is_array($instance['cat']) && in_array($category->term_id, $instance['cat'])); ?> /> 137 <label for="<?php echo $this->get_field_id('cat') . '-' . (int) $category->term_id; ?>"> 138 <?php echo esc_html($category->name); ?> 139 </label> 140 </li> 141 <?php endforeach; ?> 142 </ul> 122 123 <?php foreach (rpwe_cats_list() as $category) : ?> 124 <p> 125 <input type="checkbox" value="<?php echo (int) $category->term_id; ?>" id="<?php echo $this->get_field_id('cat') . '-' . (int) $category->term_id; ?>" name="<?php echo $this->get_field_name('cat'); ?>[]" <?php checked(is_array($instance['cat']) && in_array($category->term_id, $instance['cat'])); ?> /> 126 <label for="<?php echo $this->get_field_id('cat') . '-' . (int) $category->term_id; ?>"> 127 <?php echo esc_html($category->name); ?> 128 </label> 129 </p> 130 <?php endforeach; ?> 143 131 </div> 144 132 … … 147 135 <?php _e('Limit to Tag', 'recent-posts-widget-extended'); ?> 148 136 </label> 149 <ul> 150 <?php foreach (rpwe_tags_list() as $post_tag) : ?> 151 <li> 152 <input type="checkbox" value="<?php echo (int) $post_tag->term_id; ?>" id="<?php echo $this->get_field_id('tag') . '-' . (int) $post_tag->term_id; ?>" name="<?php echo $this->get_field_name('tag'); ?>[]" <?php checked(is_array($instance['tag']) && in_array($post_tag->term_id, $instance['tag'])); ?> /> 153 <label for="<?php echo $this->get_field_id('tag') . '-' . (int) $post_tag->term_id; ?>"> 154 <?php echo esc_html($post_tag->name); ?> 155 </label> 156 </li> 157 <?php endforeach; ?> 158 </ul> 137 <?php foreach (rpwe_tags_list() as $post_tag) : ?> 138 <p> 139 <input type="checkbox" value="<?php echo (int) $post_tag->term_id; ?>" id="<?php echo $this->get_field_id('tag') . '-' . (int) $post_tag->term_id; ?>" name="<?php echo $this->get_field_name('tag'); ?>[]" <?php checked(is_array($instance['tag']) && in_array($post_tag->term_id, $instance['tag'])); ?> /> 140 <label for="<?php echo $this->get_field_id('tag') . '-' . (int) $post_tag->term_id; ?>"> 141 <?php echo esc_html($post_tag->name); ?> 142 </label> 143 </p> 144 <?php endforeach; ?> 159 145 </div> 160 146 … … 164 150 </label> 165 151 <input type="text" class="widefat" id="<?php echo $this->get_field_id('taxonomy'); ?>" name="<?php echo $this->get_field_name('taxonomy'); ?>" value="<?php echo esc_attr($instance['taxonomy']); ?>" /> 166 <small><?php _e('Ex: category=1,2,4&post_tag=6,12 ', 'rpwe'); ?><br />152 <small><?php _e('Ex: category=1,2,4&post_tag=6,12> 167 153 <?php _e('Available: ', 'rpwe'); 168 154 echo implode(', ', get_taxonomies(array('public' => true))); ?></small> 169 155 </p> 170 171 </div>172 173 <div class="rpwe-columns-3 rpwe-column-last">174 156 175 157 <p> … … 201 183 <?php _e('Thumbnail (height,width,align)', 'recent-posts-widget-extended'); ?> 202 184 </label> 185 203 186 <input class="small-input" id="<?php echo $this->get_field_id('thumb_height'); ?>" name="<?php echo $this->get_field_name('thumb_height'); ?>" type="number" step="1" min="0" value="<?php echo (int)($instance['thumb_height']); ?>" /> 187 204 188 <input class="small-input" id="<?php echo $this->get_field_id('thumb_width'); ?>" name="<?php echo $this->get_field_name('thumb_width'); ?>" type="number" step="1" min="0" value="<?php echo (int)($instance['thumb_width']); ?>" /> 189 205 190 <select class="small-input" id="<?php echo $this->get_field_id('thumb_align'); ?>" name="<?php echo $this->get_field_name('thumb_align'); ?>"> 206 191 <option value="rpwe-alignleft" <?php selected($instance['thumb_align'], 'rpwe-alignleft'); ?>><?php _e('Left', 'recent-posts-widget-extended') ?></option> … … 277 262 278 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 279 </div> 280 281 <div class="clear"></div>282 283 <p>284 <input id="<?php echo $this->get_field_id('styles_default'); ?>" name="<?php echo $this->get_field_name('styles_default'); ?>" type="checkbox" <?php checked($instance['styles_default']); ?> />285 <label for="<?php echo $this->get_field_id('styles_default'); ?>">286 <?php _e('Use Default Styles', 'recent-posts-widget-extended'); ?>287 </label>288 </p>289 290 <p>291 <label for="<?php echo $this->get_field_id('css'); ?>">292 <?php _e('Custom CSS', 'recent-posts-widget-extended'); ?>293 </label>294 <textarea class="widefat" id="<?php echo $this->get_field_id('css'); ?>" name="<?php echo $this->get_field_name('css'); ?>" style="height:180px;"><?php echo $instance['css']; ?></textarea>295 <small><?php _e('If you turn off the default styles, you can use these css code to customize the recent posts style.', 'recent-posts-widget-extended'); ?></small>296 </p> -
recent-posts-widget-extended/trunk/includes/functions.php
r2476478 r2619486 3 3 /** 4 4 * Various functions used by the plugin. 5 *6 * @package Recent_Posts_Widget_Extended7 * @since 0.9.48 * @author Satrya9 * @copyright Copyright (c) 2014, Satrya10 * @license http://www.gnu.org/licenses/gpl-2.0.html11 5 */ 12 6 … … 18 12 function rpwe_get_default_args() { 19 13 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 14 $css_defaults = ".rpwe-block ul{\nlist-style: none !important;\nmargin-left: 0 !important;\npadding-left: 0 !important;\n}\n\n.rpwe-block li{\nborder-bottom: 1px solid #eee;\nmargin-bottom: 10px;\npadding-bottom: 10px;\nlist-style-type: none;\n}\n\n.rpwe-block a{\ndisplay: inline !important;\ntext-decoration: none;\n}\n\n.rpwe-block h3{\nbackground: none !important;\nclear: none;\nmargin-bottom: 0 !important;\nmargin-top: 0 !important;\nfont-weight: 400;\nfont-size: 12px !important;\nline-height: 1.5em;\n}\n\n.rpwe-thumb{\nborder: 1px solid #eee !important;\nbox-shadow: none !important;\nmargin: 2px 10px 2px 0;\npadding: 3px !important;\n}\n\n.rpwe-summary{\nfont-size: 12px;\n}\n\n.rpwe-time{\ncolor: #bbb;\nfont-size: 11px;\n}\n\n.rpwe-comment{\ncolor: #bbb;\nfont-size: 11px;\npadding-left: 5px;\n}\n\n.rpwe-alignleft{\ndisplay: inline;\nfloat: left;\n}\n\n.rpwe-alignright{\ndisplay: inline;\nfloat: right;\n}\n\n.rpwe-aligncenter{\ndisplay: block;\nmargin-left: auto;\nmargin-right: auto;\n}\n\n.rpwe-clearfix:before,\n.rpwe-clearfix:after{\ncontent: \"\";\ndisplay: table !important;\n}\n\n.rpwe-clearfix:after{\nclear: both;\n}\n\n.rpwe-clearfix{\nzoom: 1;\n}\n"; 15 16 $defaults = array( 17 'title' => esc_attr__('Recent Posts', 'rpwe'), 18 'title_url' => '', 19 20 'limit' => 5, 21 'offset' => 0, 22 'order' => 'DESC', 23 'orderby' => 'date', 24 'cat' => array(), 25 'tag' => array(), 26 'taxonomy' => '', 27 'post_type' => array('post'), 28 'post_status' => 'publish', 29 'ignore_sticky' => 1, 30 'exclude_current' => 1, 31 32 'excerpt' => false, 33 'length' => 10, 34 'thumb' => true, 35 'thumb_height' => 45, 36 'thumb_width' => 45, 37 'thumb_default' => 'http://placehold.it/45x45/f0f0f0/ccc', 38 'thumb_align' => 'rpwe-alignleft', 39 'date' => true, 40 'date_relative' => false, 41 'date_modified' => false, 42 'readmore' => false, 43 'readmore_text' => __('Read More »', 'recent-posts-widget-extended'), 44 'comment_count' => false, 45 46 'styles_default' => true, 47 'css' => $css_defaults, 48 'cssID' => '', 49 'css_class' => '', 50 'before' => '', 51 'after' => '' 52 ); 53 54 // Allow plugins/themes developer to filter the default arguments. 55 return apply_filters('rpwe_default_args', $defaults); 62 56 } 63 57 … … 68 62 */ 69 63 function rpwe_recent_posts($args = array()) { 70 64 echo rpwe_get_recent_posts($args); 71 65 } 72 66 … … 80 74 function rpwe_get_recent_posts($args = array()) { 81 75 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 $html .= '<a class="rpwe-img" href="' . esc_url(get_permalink()) . '" rel="bookmark">';131 132 $html .= '<img class="' . esc_attr($args['thumb_align']) . ' rpwe-thumb" src="' . esc_url($image) . '" alt="' . esc_attr(get_the_title()) . '">';133 134 135 136 137 138 139 140 141 142 143 144 �� 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 76 // Set up a default, empty variable. 77 $html = ''; 78 79 // Merge the input arguments and the defaults. 80 $args = wp_parse_args($args, rpwe_get_default_args()); 81 82 // Extract the array to allow easy use of variables. 83 extract($args); 84 85 // Allow devs to hook in stuff before the loop. 86 do_action('rpwe_before_loop'); 87 88 // Display the default style of the plugin. 89 if ($args['styles_default'] === true) { 90 rpwe_custom_styles(); 91 } 92 93 // If the default style is disabled then use the custom css if it's not empty. 94 if ($args['styles_default'] === false && !empty($args['css'])) { 95 echo '<style>' . $args['css'] . '</style>'; 96 } 97 98 // Get the posts query. 99 $posts = rpwe_get_posts($args); 100 101 if ($posts->have_posts()) : 102 103 // Recent posts wrapper 104 $html = '<div ' . (!empty($args['cssID']) ? 'id="' . sanitize_html_class($args['cssID']) . '"' : '') . ' class="rpwe-block ' . (!empty($args['css_class']) ? '' . sanitize_html_class($args['css_class']) . '' : '') . '">'; 105 106 $html .= '<ul class="rpwe-ul">'; 107 108 while ($posts->have_posts()) : $posts->the_post(); 109 110 // Thumbnails 111 $thumb_id = get_post_thumbnail_id(); // Get the featured image id. 112 $img_url = wp_get_attachment_url($thumb_id); // Get img URL. 113 114 // Display the image url and crop using the resizer. 115 $image = rpwe_resize($img_url, $args['thumb_width'], $args['thumb_height'], true); 116 117 // Start recent posts markup. 118 $html .= '<li class="rpwe-li rpwe-clearfix">'; 119 120 if ($args['thumb']) : 121 122 // Check if post has post thumbnail. 123 if (has_post_thumbnail()) : 124 ">'; 125 if ($image) : 126 ) . '">'; 127 else : 128 $html .= get_the_post_thumbnail( 129 get_the_ID(), 130 array($args['thumb_width'], $args['thumb_height']), 131 array( 132 'class' => $args['thumb_align'] . ' rpwe-thumb the-post-thumbnail', 133 'alt' => esc_attr(get_the_title()) 134 ) 135 ); 136 endif; 137 $html .= '</a>'; 138 139 // If no post thumbnail found, check if Get The Image plugin exist and display the image. 140 elseif (function_exists('get_the_image')) : 141 $html .= get_the_image(array( 142 'height' => (int) $args['thumb_height'], 143 'width' => (int) $args['thumb_width'], 144 'image_class' => esc_attr($args['thumb_align']) . ' rpwe-thumb get-the-image', 145 'image_scan' => true, 146 'echo' => false, 147 'default_image' => esc_url($args['thumb_default']) 148 )); 149 150 // Display default image. 151 elseif (!empty($args['thumb_default'])) : 152 $html .= sprintf( 153 '<a class="rpwe-img" href="%1$s" rel="bookmark"><img class="%2$s rpwe-thumb rpwe-default-thumb" src="%3$s" alt="%4$s" width="%5$s" height="%6$s"></a>', 154 esc_url(get_permalink()), 155 esc_attr($args['thumb_align']), 156 esc_url($args['thumb_default']), 157 esc_attr(get_the_title()), 158 (int) $args['thumb_width'], 159 (int) $args['thumb_height'] 160 ); 161 162 endif; 163 164 endif; 165 166 $html .= '<h3 class="rpwe-title"><a href="' . esc_url(get_permalink()) . '" title="' . sprintf(esc_attr__('Permalink to %s', 'recent-posts-widget-extended'), the_title_attribute('echo=0')) . '" rel="bookmark">' . esc_attr(get_the_title()) . '</a></h3>'; 167 168 if ($args['date']) : 169 $date = get_the_date(); 170 if ($args['date_relative']) : 171 $date = sprintf(__('%s ago', 'recent-posts-widget-extended'), human_time_diff(get_the_date('U'), current_time('timestamp'))); 172 endif; 173 $html .= '<time class="rpwe-time published" datetime="' . esc_html(get_the_date('c')) . '">' . esc_html($date) . '</time>'; 174 elseif ($args['date_modified']) : // if both date functions are provided, we use date to be backwards compatible 175 $date = get_the_modified_date(); 176 if ($args['date_relative']) : 177 $date = sprintf(__('%s ago', 'recent-posts-widget-extended'), human_time_diff(get_the_modified_date('U'), current_time('timestamp'))); 178 endif; 179 $html .= '<time class="rpwe-time modfied" datetime="' . esc_html(get_the_modified_date('c')) . '">' . esc_html($date) . '</time>'; 180 endif; 181 182 if ($args['comment_count']) : 183 if (get_comments_number() == 0) { 184 $comments = __('No Comments', 'recent-posts-widget-extended'); 185 } elseif (get_comments_number() > 1) { 186 $comments = sprintf(__('%s Comments', 'recent-posts-widget-extended'), get_comments_number()); 187 } else { 188 $comments = __('1 Comment', 'recent-posts-widget-extended'); 189 } 190 $html .= '<a class="rpwe-comment comment-count" href="' . get_comments_link() . '">' . $comments . '</a>'; 191 endif; 192 193 if ($args['excerpt']) : 194 $html .= '<div class="rpwe-summary">'; 195 $html .= wp_trim_words(apply_filters('rpwe_excerpt', get_the_excerpt()), $args['length'], ' …'); 196 if ($args['readmore']) : 197 $html .= '<a href="' . esc_url(get_permalink()) . '" class="more-link">' . $args['readmore_text'] . '</a>'; 198 endif; 199 $html .= '</div>'; 200 endif; 201 202 $html .= '</li>'; 203 204 endwhile; 205 206 $html .= '</ul>'; 207 208 $html .= '</div><!-- Generated by http://wordpress.org/plugins/recent-posts-widget-extended/ -->'; 209 210 endif; 211 212 // Restore original Post Data. 213 wp_reset_postdata(); 214 215 // Allow devs to hook in stuff after the loop. 216 do_action('rpwe_after_loop'); 217 218 // Return the posts markup. 219 return wp_kses_post($args['before']) . apply_filters('rpwe_markup', $html, $args) . wp_kses_post($args['after']); 226 220 } 227 221 … … 235 229 function rpwe_get_posts($args = array()) { 236 230 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 231 // Query arguments. 232 $query = array( 233 'offset' => $args['offset'], 234 'posts_per_page' => $args['limit'], 235 'orderby' => $args['orderby'], 236 'order' => $args['order'], 237 'post_type' => $args['post_type'], 238 'post_status' => $args['post_status'], 239 'ignore_sticky_posts' => $args['ignore_sticky'], 240 ); 241 242 // Exclude current post 243 if ($args['exclude_current']) { 244 $query['post__not_in'] = array(get_the_ID()); 245 } 246 247 // Limit posts based on category. 248 if (!empty($args['cat'])) { 249 $query['category__in'] = $args['cat']; 250 } 251 252 // Limit posts based on post tag. 253 if (!empty($args['tag'])) { 254 $query['tag__in'] = $args['tag']; 255 } 256 257 /** 258 * Taxonomy query. 259 * Prop Miniloop plugin by Kailey Lampert. 260 */ 261 if (!empty($args['taxonomy'])) { 262 263 parse_str($args['taxonomy'], $taxes); 264 265 $operator = 'IN'; 266 $tax_query = array(); 267 foreach (array_keys($taxes) as $k => $slug) { 268 $ids = explode(',', $taxes[$slug]); 269 if (count($ids) == 1 && $ids['0'] < 0) { 270 // If there is only one id given, and it's negative 271 // Let's treat it as 'posts not in' 272 $ids['0'] = $ids['0'] * -1; 273 $operator = 'NOT IN'; 274 } 275 $tax_query[] = array( 276 'taxonomy' => $slug, 277 'field' => 'id', 278 'terms' => $ids, 279 'operator' => $operator 280 ); 281 } 282 283 $query['tax_query'] = $tax_query; 284 } 285 286 // Allow plugins/themes developer to filter the default query. 287 $query = apply_filters('rpwe_default_query_arguments', $query); 288 289 // Perform the query. 290 $posts = new WP_Query($query); 291 292 return $posts; 299 293 } 300 294 … … 306 300 function rpwe_custom_styles() { 307 301 ?> 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 302 <style> 303 .rpwe-block ul { 304 list-style: none !important; 305 margin-left: 0 !important; 306 padding-left: 0 !important; 307 } 308 309 .rpwe-block li { 310 border-bottom: 1px solid #eee; 311 margin-bottom: 10px; 312 padding-bottom: 10px; 313 list-style-type: none; 314 } 315 316 .rpwe-block a { 317 display: inline !important; 318 text-decoration: none; 319 } 320 321 .rpwe-block h3 { 322 background: none !important; 323 clear: none; 324 margin-bottom: 0 !important; 325 margin-top: 0 !important; 326 font-weight: 400; 327 font-size: 12px !important; 328 line-height: 1.5em; 329 } 330 331 .rpwe-thumb { 332 border: 1px solid #EEE !important; 333 box-shadow: none !important; 334 margin: 2px 10px 2px 0; 335 padding: 3px !important; 336 } 337 338 .rpwe-summary { 339 font-size: 12px; 340 } 341 342 .rpwe-time { 343 color: #bbb; 344 font-size: 11px; 345 } 346 347 .rpwe-comment { 348 color: #bbb; 349 font-size: 11px; 350 padding-left: 5px; 351 } 352 353 .rpwe-alignleft { 354 display: inline; 355 float: left; 356 } 357 358 .rpwe-alignright { 359 display: inline; 360 float: right; 361 } 362 363 .rpwe-aligncenter { 364 display: block; 365 margin-left: auto; 366 margin-right: auto; 367 } 368 369 .rpwe-clearfix:before, 370 .rpwe-clearfix:after { 371 content: ""; 372 display: table !important; 373 } 374 375 .rpwe-clearfix:after { 376 clear: both; 377 } 378 379 .rpwe-clearfix { 380 zoom: 1; 381 } 382 </style> 389 383 <?php 390 384 } -
recent-posts-widget-extended/trunk/includes/helpers.php
r2476478 r2619486 3 3 /** 4 4 * Function helper 5 *6 * @package Recent_Posts_Widget_Extended7 * @since 0.9.9.18 * @author Satrya9 * @copyright Copyright (c) 2015, Satrya10 * @license http://www.gnu.org/licenses/gpl-2.0.html11 5 */ 12 6 -
recent-posts-widget-extended/trunk/includes/shortcode.php
r2476478 r2619486 3 3 /** 4 4 * Shortcode helper 5 *6 * @package Recent_Posts_Widget_Extended7 * @since 0.9.48 * @author Satrya9 * @copyright Copyright (c) 2014, Satrya10 * @license http://www.gnu.org/licenses/gpl-2.0.html11 5 */ 12 6 -
recent-posts-widget-extended/trunk/languages/recent-posts-widget-extended.pot
r2476478 r2619486 14 14 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 15 16 #: classes/widget.php: 2516 #: classes/widget.php: 17 17 msgid "An advanced widget that gives you total control over the output of your site’s most recent Posts." 18 18 msgstr "" 19 19 20 #: classes/widget.php:3 720 #: classes/widget.php:3 21 21 msgid "Recent Posts Extended" 22 22 msgstr "" 23 23 24 #: includes/form.php:1 824 #: includes/form.php:1 25 25 msgid "Title" 26 26 msgstr "" 27 27 28 #: includes/form.php: 2528 #: includes/form.php: 29 29 msgid "Title URL" 30 30 msgstr "" 31 31 32 #: includes/form.php: 3232 #: includes/form.php: 33 33 msgid "CSS ID" 34 34 msgstr "" 35 35 36 #: includes/form.php:3 936 #: includes/form.php:3 37 37 msgid "CSS Class" 38 38 msgstr "" 39 39 40 #: includes/form.php:4 640 #: includes/form.php:4 41 41 msgid "HTML or text before the recent posts" 42 42 msgstr "" 43 43 44 #: includes/form.php: 5344 #: includes/form.php: 45 45 msgid "HTML or text after the recent posts" 46 46 msgstr "" 47 47 48 #: includes/form.php: 6548 #: includes/form.php: 49 49 msgid "Ignore sticky posts" 50 50 msgstr "" 51 51 52 #: includes/form.php: 7252 #: includes/form.php: 53 53 msgid "Exclude current post" 54 54 msgstr "" 55 55 56 #: includes/form.php: 7856 #: includes/form.php: 57 57 msgid "Post Types" 58 58 msgstr "" 59 59 60 #: includes/form.php: 9460 #: includes/form.php: 61 61 msgid "Post Status" 62 62 msgstr "" 63 63 64 #: includes/form.php: 10564 #: includes/form.php: 65 65 msgid "Order" 66 66 msgstr "" 67 67 68 #: includes/form.php:1 1568 #: includes/form.php:1 69 69 msgid "Orderby" 70 70 msgstr "" 71 71 72 #: includes/form.php:1 3172 #: includes/form.php:1 73 73 msgid "Limit to Category" 74 74 msgstr "" 75 75 76 #: includes/form.php:1 4776 #: includes/form.php:1 77 77 msgid "Limit to Tag" 78 78 msgstr "" 79 79 80 #: includes/form.php:1 6380 #: includes/form.php:1 81 81 msgid "Limit to Taxonomy" 82 82 msgstr "" 83 83 84 #: includes/form.php:1 7784 #: includes/form.php:1 85 85 msgid "Number of posts to show" 86 86 msgstr "" 87 87 88 #: includes/form.php:1 8488 #: includes/form.php:1 89 89 msgid "Offset" 90 90 msgstr "" 91 91 92 #: includes/form.php:1 8792 #: includes/form.php:1 93 93 msgid "The number of posts to skip" 94 94 msgstr "" 95 95 96 #: includes/form.php:1 9596 #: includes/form.php:1 97 97 msgid "Display Thumbnail" 98 98 msgstr "" 99 99 100 #: includes/form.php: 201100 #: includes/form.php: 101 101 msgid "Thumbnail (height,width,align)" 102 102 msgstr "" 103 103 104 #: includes/form.php: 206104 #: includes/form.php: 105 105 msgid "Left" 106 106 msgstr "" 107 107 108 #: includes/form.php: 207108 #: includes/form.php: 109 109 msgid "Right" 110 110 msgstr "" 111 111 112 #: includes/form.php: 208112 #: includes/form.php: 113 113 msgid "Center" 114 114 msgstr "" 115 115 116 #: includes/form.php: 214116 #: includes/form.php: 117 117 msgid "Default Thumbnail" 118 118 msgstr "" 119 119 120 #: includes/form.php:2 17120 #: includes/form.php:2 121 121 msgid "Leave it blank to disable." 122 122 msgstr "" 123 123 124 #: includes/form.php:2 25124 #: includes/form.php:2 125 125 msgid "Display Excerpt" 126 126 msgstr "" 127 127 128 #: includes/form.php:2 31128 #: includes/form.php:2 129 129 msgid "Excerpt Length" 130 130 msgstr "" 131 131 132 #: includes/form.php:2 39132 #: includes/form.php:2 133 133 msgid "Display Readmore" 134 134 msgstr "" 135 135 136 #: includes/form.php:2 45136 #: includes/form.php:2 137 137 msgid "Readmore Text" 138 138 msgstr "" 139 139 140 #: includes/form.php:2 53140 #: includes/form.php:2 141 141 msgid "Display Comment Count" 142 142 msgstr "" 143 143 144 #: includes/form.php:2 60144 #: includes/form.php:2 145 145 msgid "Display Date" 146 146 msgstr "" 147 147 148 #: includes/form.php:2 67148 #: includes/form.php:2 149 149 msgid "Display Modification Date" 150 150 msgstr "" 151 151 152 #: includes/form.php:2 74152 #: includes/form.php:2 153 153 msgid "Use Relative Date. eg: 5 days ago" 154 154 msgstr "" 155 155 156 #: includes/form.php:2 86156 #: includes/form.php:2 157 157 msgid "Use Default Styles" 158 158 msgstr "" 159 159 160 #: includes/form.php:2 92160 #: includes/form.php:2 161 161 msgid "Custom CSS" 162 162 msgstr "" 163 163 164 #: includes/form.php:2 95164 #: includes/form.php:2 165 165 msgid "If you turn off the default styles, you can use these css code to customize the recent posts style." 166 166 msgstr "" 167 167 168 #: includes/functions.php:4 9168 #: includes/functions.php:4 169 169 msgid "Read More »" 170 170 msgstr "" 171 171 172 #: includes/functions.php:1 72172 #: includes/functions.php:1 173 173 msgid "Permalink to %s" 174 174 msgstr "" 175 175 176 #: includes/functions.php:1 83, includes/functions.php:177176 #: includes/functions.php:1 177 177 msgid "%s ago" 178 178 msgstr "" 179 179 180 #: includes/functions.php:1 94180 #: includes/functions.php:1 181 181 msgid "1 Comment" 182 182 msgstr "" 183 183 184 #: includes/functions.php:1 92184 #: includes/functions.php:1 185 185 msgid "%s Comments" 186 186 msgstr "" 187 187 188 #: includes/functions.php:1 90188 #: includes/functions.php:1 189 189 msgid "No Comments" 190 190 msgstr "" -
recent-posts-widget-extended/trunk/readme.txt
r2476478 r2619486 3 3 Donate link: https://paypal.me/satrya 4 4 Tags: recent posts, random posts, popular posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, taxonomy, post type, post status, shortcode, multiple widgets 5 Requires at least: 4.86 Tested up to: 5. 65 Requires at least: .8 6 Tested up to: 5. 7 7 Requires PHP: 7.2 8 Stable tag: 1. 0.08 Stable tag: 1..0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 42 42 43 43 * [Translate to your language](https://translate.wordpress.org/projects/wp-plugins/recent-posts-widget-extended/). 44 * Contribute on [Github](https://github.com/ satrya/recent-posts-widget-extended).44 * Contribute on [Github](https://github.com//recent-posts-widget-extended). 45 45 * [Donate](https://paypal.me/satrya). 46 46 … … 231 231 == Changelog == 232 232 233 = 1.0.0 - Feb 17, 2021 = 234 - This is just a maintenance update after a couple years with no update. Thank you for still using this plugin 🥳 235 236 237 233 **1.1.0** 234 235 Release Date: Oct 25, 2021 236 237 This release comes with several fixes and enhancements to support the new Widget Block in WordPress 5.8. 238 239 **Enhancements:** 240 241 - Adds `height` and `width` attribute to the image thumbnail. 242 243 **Bugfixes:** 244 245 - Fixes a bug the widget couldn't load on new Widgets Block page. 246 247 **Warning:** 248 249 Current thumbnail resize system will be deprecated and replaced with WordPress built-in thumbnail resize function. 250 251 252 -
recent-posts-widget-extended/trunk/rpwe.php
r2476478 r2619486 2 2 3 3 /** 4 * Plugin Name: Recent Posts Widget Extended 5 * Plugin URI: https://idenovasi.com/projects/recent-posts-widget-extended/ 6 * Description: Enables advanced widget that gives you total control over the output of your site’s most recent Posts. 7 * Version: 1.0.0 8 * Author: Satrya 9 * Author URI: https://idenovasi.com/ 10 * Author Email: satrya@idenovasi.com 11 * Text Domain: recent-posts-widget-extended 12 * Domain Path: /languages 13 * 14 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU 15 * General Public License as published by the Free Software Foundation; either version 2 of the License, 16 * or (at your option) any later version. 17 * 18 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 19 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 * 21 * You should have received a copy of the GNU General Public License along with this program; if not, write 22 * to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 * 24 * @package Recent_Posts_Widget_Extended 25 * @since 0.1 26 * @author Satrya 27 * @copyright Copyright (c) 2014, Satrya 28 * @license http://www.gnu.org/licenses/gpl-2.0.html 4 * Plugin Name: Recent Posts Widget Extended 5 * Plugin URI: https://idenovasi.com/projects/recent-posts-widget-extended/ 6 * Description: Enables advanced widget that gives you total control over the output of your site’s most recent Posts. 7 * Version: 1.1.0 8 * Requires at least: 5.8 9 * Requires PHP: 7.2 10 * Author: Idenovasi 11 * Author URI: https://idenovasi.com/ 12 * License: GPL v2 or later 13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 14 * Text Domain: recent-posts-widget-extended 15 * Domain Path: /languages 29 16 */ 30 17
Note: See TracChangeset
for help on using the changeset viewer.