Changeset 1893043 for wp-show-posts
- Timestamp:
- 06/14/2018 05:59:30 PM (7 years ago)
- Location:
- wp-show-posts/trunk
- Files:
-
- 8 edited
-
admin/ajax.php (modified) (1 diff)
-
admin/metabox.php (modified) (1 diff)
-
css/wp-show-posts-min.css (modified) (1 diff)
-
css/wp-show-posts.css (modified) (2 diffs)
-
inc/defaults.php (modified) (1 diff)
-
inc/functions.php (modified) (1 diff)
-
readme.txt (modified) (5 diffs)
-
wp-show-posts.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-show-posts/trunk/admin/ajax.php
r1801395 r1893043 33 33 if ( ! isset( $_POST[ 'wpsp_nonce' ] ) || ! wp_verify_nonce( $_POST[ 'wpsp_nonce' ], 'wpsp_nonce' ) ) { 34 34 wp_die( 'Permission declined' ); 35 } 36 37 if ( empty( $_POST['taxonomy'] ) ) { 38 die(); 35 39 } 36 40 -
wp-show-posts/trunk/admin/metabox.php
r1801395 r1893043 468 468 array( 469 469 'sanitize_callback' => 'wp_kses_post', 470 'default' => $defaults[ 'wpsp_read_more_text' ] ? $defaults[ 'wpsp_read_more_text' ] : '' 470 'default' => $defaults[ 'wpsp_read_more_text' ] 471 ) 472 ); 473 474 $manager->register_control( 475 'wpsp_read_more_class', // Same as setting name. 476 array( 477 'type' => 'text', 478 'section' => 'wpsp_content', 479 'label' => esc_html__( 'Read more button class', 'wp-show-posts' ), 480 'priority' => 75 481 ) 482 ); 483 484 $manager->register_setting( 485 'wpsp_read_more_class', // Same as control name. 486 array( 487 'sanitize_callback' => 'esc_attr', 488 'default' => $defaults[ 'wpsp_read_more_class' ] ? $defaults[ 'wpsp_read_more_class' ] : '' 471 489 ) 472 490 ); -
wp-show-posts/trunk/css/wp-show-posts-min.css
r1815911 r1893043 1 body .wp-show-posts a{box-shadow:0 0 0 transparent}.wp-show-posts-entry-title a{text-decoration:none}a.wp-show-posts-read-more,a.wp-show-posts-read-more:visited{display:inline-block;padding:8px 15px;border:2px solid #222;color:#222;font-size: 0.8em;text-decoration:none}.wpsp-read-more{margin:0 0 1em;display:inline-block}a.wp-show-posts-read-more:hover,a.wp-show-posts-read-more:focus{border:2px solid transparent;color:#fff;background:#222;text-decoration:none}.wp-show-posts-image{margin-bottom:1em}.wp-show-posts-image.wpsp-image-left{float:left;margin-right:1.5em}.wp-show-posts-image.wpsp-image-right{float:right;margin-left:1.5em}.wp-show-posts-image.wpsp-image-center{display:block;text-align:center}.wp-show-posts-image img{margin:0 !important;vertical-align:bottom;height:auto}.wp-show-posts-entry-header{margin:0 0 1em;padding:0}.wp-show-posts .wp-show-posts-entry-title{line-height:1.5em;margin:0}.wp-show-posts-updated{display:none}.wp-show-posts-entry-summary,.wp-show-posts-entry-content{margin-bottom:1em}.wp-show-posts-entry-meta{font-size:0.8em}.wp-show-posts-separator{opacity:0.5}.wp-show-posts-meta a,.wp-show-posts-meta a:visited{color:rgba( 0,0,0,0.5 )}.stack-wp-show-posts-byline,.stack-wp-show-posts-posted-on{display:block}.wp-show-posts-entry-meta-below-post{margin-bottom:1em}.wp-show-posts-columns:not(.wp-show-posts-masonry){display:flex;flex-wrap:wrap}.wp-show-posts-columns .wp-show-posts-single:not(.wp-show-posts-masonry-block){display:flex;flex-direction:row}.wp-show-posts-columns .wp-show-posts-single:not(.wp-show-posts-masonry-block) .wp-show-posts-image img{flex:0 0 auto;object-fit:scale-down}.wpsp-clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.wp-show-posts:not(.wp-show-posts-columns) .wp-show-posts-single:not(:last-child){margin-bottom:2em}.wpsp-load-more{margin-top:2em}.wp-show-posts-columns .wp-show-posts-entry-title{font-size:25px}.wp-show-posts-columns .wp-show-posts-single.col-md-4 .wp-show-posts-entry-title,.wp-show-posts-columns .wp-show-posts-single.col-md-3 .wp-show-posts-entry-title,.wp-show-posts-columns .wp-show-posts-single.col-md-20 .wp-show-posts-entry-title{font-size:20px}.wp-show-posts-columns .wp-show-posts-inner{flex:1}.wp-show-posts-inner:after{clear:both;display:table;content:'';width:0;height:0;overflow:hidden;visibility:hidden}.wp-show-posts-single.post {margin-bottom: 0;}@media (min-width: 768px){.wpsp-col-1,.wpsp-col-2,.wpsp-col-3,.wpsp-col-4,.wpsp-col-5,.wpsp-col-6,.wpsp-col-7,.wpsp-col-8,.wpsp-col-9,.wpsp-col-10,.wpsp-col-11,.wpsp-col-12,.wpsp-col-20{float:left}.wpsp-col-1{width:8.333333%}.wpsp-col-2{width:16.666667%}.wpsp-col-3{width:25%}.wpsp-col-4{width:33.333%}.wpsp-col-5{width:41.666667%}.wpsp-col-6{width:50%}.wpsp-col-7{width:58.333333%}.wpsp-col-8{width:66.666667%}.wpsp-col-9{width:75%}.wpsp-col-10{width:83.333333%}.wpsp-col-11{width:91.666667%}.wpsp-col-12{width:100%}.wpsp-col-20{width:20%}}@media (max-width: 767px){.wp-show-posts-columns,.wp-show-posts-inner{margin-left:0 !important;margin-right:0 !important}.wp-show-posts-columns .wp-show-posts-single{display:block;width:100%}.wp-show-posts-image.wpsp-image-left,.wp-show-posts-image.wpsp-image-right{float:none;margin-right:0;margin-left:0}}.wp-show-posts-inner *:last-child{margin-bottom:0}.screen-reader-text{clip:rect(1px, 1px, 1px, 1px);position:absolute !important}.screen-reader-text:hover,.screen-reader-text:active,.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0, 0, 0, 0.6);clip:auto !important;color:#21759b;display:block;font-size:14px;font-weight:bold;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.wpsp-clearfix:after{content:".";display:block;overflow:hidden;visibility:hidden;font-size:0;line-height:0;width:0;height:0}1 body .wp-show-posts a{box-shadow:0 0 0 transparent}.wp-show-posts-entry-title a{text-decoration:none}a.wp-show-posts-read-more,a.wp-show-posts-read-more:visited{display:inline-block;padding:8px 15px;border:2px solid #222;color:#222;font-size:.8em;text-decoration:none}.wpsp-read-more{margin:0 0 1em;display:inline-block}a.wp-show-posts-read-more:focus,a.wp-show-posts-read-more:hover{border:2px solid transparent;color:#fff;background:#222;text-decoration:none}.wp-show-posts-image{margin-bottom:1em}.wp-show-posts-image.wpsp-image-left{float:left;margin-right:1.5em}.wp-show-posts-image.wpsp-image-right{float:right;margin-left:1.5em}.wp-show-posts-image.wpsp-image-center{display:block;text-align:center}.wp-show-posts-image img{margin:0!important;vertical-align:bottom;height:auto}.wp-show-posts-entry-header{margin:0 0 1em;padding:0}.wp-show-posts .wp-show-posts-entry-title{margin:0}.wp-show-posts-updated{display:none}.wp-show-posts-entry-content,.wp-show-posts-entry-summary{margin-bottom:1em}.wp-show-posts-entry-meta{font-size:.8em}.wp-show-posts-separator{opacity:.5}.wp-show-posts-meta a,.wp-show-posts-meta a:visited{color:rgba(0,0,0,.5)}.stack-wp-show-posts-byline,.stack-wp-show-posts-posted-on{display:block}.wp-show-posts-entry-meta-below-post{margin-bottom:1em}.wp-show-posts-columns:not(.wp-show-posts-masonry){display:flex;flex-wrap:wrap}.wp-show-posts-columns .wp-show-posts-single:not(.wp-show-posts-masonry-block){display:flex;flex-direction:row}.wp-show-posts-columns .wp-show-posts-single:not(.wp-show-posts-masonry-block) .wp-show-posts-image img{flex:0 0 auto;object-fit:scale-down}.wpsp-clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.wp-show-posts:not(.wp-show-posts-columns) .wp-show-posts-single:not(:last-child){margin-bottom:2em}.wpsp-load-more{margin-top:2em}.wp-show-posts-columns .wp-show-posts-inner{flex:1}.wp-show-posts-inner:after{clear:both;display:table;content:'';width:0;height:0;overflow:hidden;visibility:hidden}.wp-show-posts-single.post{margin-bottom:0}@media (min-width:768px){.wpsp-col-1,.wpsp-col-10,.wpsp-col-11,.wpsp-col-12,.wpsp-col-2,.wpsp-col-20,.wpsp-col-3,.wpsp-col-4,.wpsp-col-5,.wpsp-col-6,.wpsp-col-7,.wpsp-col-8,.wpsp-col-9{float:left}.wpsp-col-1{width:8.333333%}.wpsp-col-2{width:16.666667%}.wpsp-col-3{width:25%}.wpsp-col-4{width:33.333%}.wpsp-col-5{width:41.666667%}.wpsp-col-6{width:50%}.wpsp-col-7{width:58.333333%}.wpsp-col-8{width:66.666667%}.wpsp-col-9{width:75%}.wpsp-col-10{width:83.333333%}.wpsp-col-11{width:91.666667%}.wpsp-col-12{width:100%}.wpsp-col-20{width:20%}}@media (max-width:767px){.wp-show-posts-columns,.wp-show-posts-inner{margin-left:0!important;margin-right:0!important}.wp-show-posts-columns .wp-show-posts-single{display:block;width:100%}.wp-show-posts-image.wpsp-image-left,.wp-show-posts-image.wpsp-image-right{float:none;margin-right:0;margin-left:0}}.wp-show-posts-inner :last-child{margin-bottom:0}.screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important}.screen-reader-text:active,.screen-reader-text:focus,.screen-reader-text:hover{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.wpsp-clearfix:after{content:".";display:block;overflow:hidden;visibility:hidden;font-size:0;line-height:0;width:0;height:0} -
wp-show-posts/trunk/css/wp-show-posts.css
r1815911 r1893043 61 61 62 62 .wp-show-posts .wp-show-posts-entry-title { 63 line-height: 1.5em;64 63 margin: 0; 65 64 } … … 125 124 .wpsp-load-more { 126 125 margin-top: 2em; 127 }128 129 .wp-show-posts-columns .wp-show-posts-entry-title {130 font-size: 25px;131 }132 133 .wp-show-posts-columns .wp-show-posts-single.col-md-4 .wp-show-posts-entry-title,134 .wp-show-posts-columns .wp-show-posts-single.col-md-3 .wp-show-posts-entry-title,135 .wp-show-posts-columns .wp-show-posts-single.col-md-20 .wp-show-posts-entry-title {136 font-size: 20px;137 126 } 138 127 -
wp-show-posts/trunk/inc/defaults.php
r1801395 r1893043 57 57 'wpsp_wrapper_id' => false, 58 58 'wpsp_wrapper_style' => '', 59 'wpsp_no_results' => __( 'Sorry, no posts were found.','wp-show-posts' ) 59 'wpsp_no_results' => __( 'Sorry, no posts were found.','wp-show-posts' ), 60 'wpsp_read_more_class' => 'wp-show-posts-read-more', 60 61 ); 61 62 -
wp-show-posts/trunk/inc/functions.php
r1801961 r1893043 234 234 function wpsp_read_more( $settings ) { 235 235 if ( $settings[ 'read_more_text' ] ) { 236 echo apply_filters( 'wpsp_read_more_output', sprintf('<div class="wpsp-read-more"><a title="%1$s" class=" wp-show-posts-read-more" href="%2$s">%3$s</a></div>',236 echo apply_filters( 'wpsp_read_more_output', sprintf('<div class="wpsp-read-more"><a title="%1$s" class="%4$s" href="%2$s">%3$s</a></div>', 237 237 the_title_attribute( 'echo=0' ), 238 238 esc_url( get_permalink() ), 239 $settings[ 'read_more_text' ] 239 $settings[ 'read_more_text' ], 240 esc_attr( $settings['read_more_class'] ) 240 241 )); 241 242 } -
wp-show-posts/trunk/readme.txt
r1815911 r1893043 5 5 Requires at least: 4.5 6 6 Tested up to: 4.9 7 Stable tag: 1.1. 27 Stable tag: 1.1.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 50 50 * Include title 51 51 * Read more text 52 * Read more button class 52 53 53 54 = Meta = … … 162 163 163 164 == Changelog == 165 166 = 1.1.3 = 167 * New: Button class option 168 * Fix: Duplicate post classes 169 * Fix: Post classes PHP notice in some themes 170 * Fix: PHP 7.2 PHP warning while editing lists 171 * Tweak: Pass $settings to wpsp_wrapper_atts filter 172 * Tweak: Remove font-size and line-height CSS (allow themes to handle it) 164 173 165 174 = 1.1.2 = … … 200 209 * Use manual excerpt if it's set 201 210 202 = 0.9 =203 * Fix bug where terms weren't saving204 * Strip oembed URLs from excerpt205 206 = 0.8 =207 * Strip shortcodes from excerpts208 * Add ellipses after excerpts209 * Fix some broken text domains for translations210 211 = 0.7 =212 * Prevent direct access to files213 * Add prefix to all column classes to avoid conflicts214 * Use wp_trim_words() function for excerpts215 * Fix conflict with Maintenance plugin216 * Make columns full width on mobile217 * Allow more tag usage when excerpt is set218 * Add blank option in widget to fix bug in Customizer/Elementor219 220 = 0.6 =221 * Add height: auto to images to prevent image stretching in Beaver Builder222 * Prevent horizontal scrolling when posts are in columns223 * Change "More query args" section name to "More settings"224 * Allow multiple IDs in "Post ID" option225 * Add "Exclude IDs" option226 * Add "No results message" option227 * Add "WP Show Posts" widget to add posts in widget areas228 229 = 0.5 =230 * Fix conflict with Yoast SEO causing taxonomy and terms fields to be blank231 * Add support for translations232 233 = 0.4 =234 * Fix column width issue when content is disabled235 * Fix pagination issue when post list is on the front page236 * Disable pagination in single posts237 * Fix saving of taxonomy and terms fields238 * Force no underline on read more buttons239 240 = 0.3 =241 * Remove attachment post type from list for now242 * Don't show pagination if there's no posts243 * Move wpsp_before_title hook into the <header> element244 * New hook: wpsp_before_wrapper245 * New hook: wpsp_before_header246 247 = 0.2 =248 * Fix issue with posts showing up in wrong area on page249 * Remove read more link if the <!-- more --> tag is used250 * Wrap read more button in div: .wpsp-read-more251 252 = 0.1 =253 * Initial release254 255 211 == Upgrade Notice == 212 213 = 1.1.3 = 214 * New: Button class option 215 * Fix: Duplicate post classes 216 * Fix: Post classes PHP notice in some themes 217 * Fix: PHP 7.2 PHP warning while editing lists 218 * Tweak: Pass $settings to wpsp_wrapper_atts filter 219 * Tweak: Remove font-size and line-height CSS (allow themes to handle it) 256 220 257 221 = 1.1.2 = … … 291 255 * Add margin to the top of pagination 292 256 * Use manual excerpt if it's set 293 294 = 0.9 =295 * Fix bug where terms weren't saving296 * Strip oembed URLs from excerpt297 298 = 0.8 =299 * Strip shortcodes from excerpts300 * Add ellipses after excerpts301 * Fix some broken text domains for translations302 303 = 0.7 =304 * Prevent direct access to files305 * Add prefix to all column classes to avoid conflicts306 * Use wp_trim_words() function for excerpts307 * Fix conflict with Maintenance plugin308 * Make columns full width on mobile309 * Allow more tag usage when excerpt is set310 * Add blank option in widget to fix bug in Customizer/Elementor311 312 = 0.6 =313 * Add height: auto to images to prevent image stretching in Beaver Builder314 * Prevent horizontal scrolling when posts are in columns315 * Change "More query args" section name to "More settings"316 * Allow multiple IDs in "Post ID" option317 * Add "Exclude IDs" option318 * Add "No results message" option319 * Add "WP Show Posts" widget to add posts in widget areas320 321 = 0.5 =322 * Fix conflict with Yoast SEO causing taxonomy and terms fields to be blank323 * Add support for translations324 325 = 0.4 =326 * Fix column width issue when content is disabled327 * Fix pagination issue when post list is on the front page328 * Disable pagination in single posts329 * Fix saving of taxonomy and terms fields330 * Force no underline on read more buttons331 332 = 0.3 =333 * Remove attachment post type from list for now334 * Don't show pagination if there's no posts335 * Move wpsp_before_title hook into the <header> element336 * New hook: wpsp_before_wrapper337 * New hook: wpsp_before_header338 339 = 0.2 =340 * Fix issue with posts showing up in wrong area on page341 * Remove read more link if the <!-- more --> tag is used342 * Wrap read more button in div: .wpsp-read-more343 344 = 0.1 =345 * Initial release -
wp-show-posts/trunk/wp-show-posts.php
r1815911 r1893043 4 4 Plugin URI: https://wpshowposts.com 5 5 Description: WP Show Posts allows you to list posts (from any post type) anywhere on your site. This includes WooCommerce products or any other post type you might have! Check out the pro version for even more features at https://wpshowposts.com. 6 Version: 1.1. 26 Version: 1.1.3 7 7 Author: Tom Usborne 8 8 Author URI: https://tomusborne.com … … 18 18 19 19 // Define the current version 20 define( 'WPSP_VERSION', '1.1. 2' );20 define( 'WPSP_VERSION', '1.1.3' ); 21 21 22 22 // Add resizer script … … 143 143 'post_meta_bottom_style' => sanitize_text_field( wpsp_get_setting( $id, 'wpsp_post_meta_bottom_style' ) ), 144 144 'post_meta_top_style' => sanitize_text_field( wpsp_get_setting( $id, 'wpsp_post_meta_top_style' ) ), 145 'read_more_class' => esc_attr( wpsp_get_setting( $id, 'wpsp_read_more_class' ) ), 145 146 ) ); 146 147 … … 366 367 $wrapper_id = ' id="wpsp-' . $id . '"'; 367 368 368 $wrapper_atts = apply_filters( 'wpsp_wrapper_atts', '' );369 $wrapper_atts = apply_filters( 'wpsp_wrapper_atts', '', $settings ); 369 370 370 371 do_action( 'wpsp_before_wrapper', $settings ); … … 404 405 } 405 406 407 $post_classes = implode( ' ', $settings[ 'inner_wrapper_class' ] ); 408 406 409 // Merge our classes with the post classes. 407 remove_filter( 'post_class', 'generate_blog_post_classes' ); // Remove GPP classes. 408 $settings['inner_wrapper_class'] = array_merge( $settings['inner_wrapper_class'], get_post_class() ); 409 add_filter( 'post_class', 'generate_blog_post_classes' ); // Re-add them. 410 if ( has_filter( 'post_class', 'generate_blog_post_classes' ) ) { 411 remove_filter( 'post_class', 'generate_blog_post_classes' ); // Remove GPP classes. 412 } 413 414 $post_classes .= ' ' . implode( ' ', get_post_class() ); 415 416 if ( function_exists( 'generate_blog_post_classes' ) ) { 417 add_filter( 'post_class', 'generate_blog_post_classes' ); // Re-add them. 418 } 410 419 411 420 // Start inner container 412 421 printf( '<%1$s class="%2$s" itemtype="http://schema.org/%3$s" itemscope>', 413 422 $settings[ 'inner_wrapper' ], 414 implode( ' ', $settings[ 'inner_wrapper_class' ] ). $column_class . $featured,423 $post_classes . $column_class . $featured, 415 424 $settings[ 'itemtype' ] 416 425 );
Note: See TracChangeset
for help on using the changeset viewer.