Shortcodes by Angie Makes - Version 2.04

Version Description

Download this release

Release Info

Developer cbaldelomar
Plugin Icon wp plugin Shortcodes by Angie Makes
Version 2.04
Comparing to
See all releases

Code changes from version 2.03 to 2.04

README.md CHANGED
@@ -66,6 +66,10 @@ Use the shortcode manager in the TinyMCE text editor
66
 
67
  ## Changelog ##
68
 
 
 
 
 
69
  ### Version 2.03
70
 
71
  * fixed bug with post_slider shortcode
66
 
67
  ## Changelog ##
68
 
69
+ ### Version 2.04
70
+
71
+ * fixed posts_per_page query
72
+
73
  ### Version 2.03
74
 
75
  * fixed bug with post_slider shortcode
includes/shortcode-functions.php CHANGED
@@ -1353,7 +1353,7 @@ if( ! function_exists( 'wc_shortcodes_post_slider' ) ) {
1353
  'post_status' => 'publish',
1354
  'post_type' => 'post', // post, page, wc_portfolio_item, etc
1355
  'posts_per_page' => 10, //number of post to show per page
1356
- 'nopaging' => true, //show all posts or use pagination. Default value is 'false', use paging.
1357
  'ignore_sticky_posts' => 1,
1358
 
1359
  'taxonomy' => '', // category, post_tag, wc_portfolio_tag, etc
@@ -1431,6 +1431,14 @@ if( ! function_exists( 'wc_shortcodes_post_slider' ) ) {
1431
  }
1432
  }
1433
 
 
 
 
 
 
 
 
 
1434
 
1435
  // sanitize dropdown
1436
  $valid_layouts = array( 'bxslider' );
1353
  'post_status' => 'publish',
1354
  'post_type' => 'post', // post, page, wc_portfolio_item, etc
1355
  'posts_per_page' => 10, //number of post to show per page
1356
+ 'nopaging' => false, //show all posts or use pagination. Default value is 'false', use paging.
1357
  'ignore_sticky_posts' => 1,
1358
 
1359
  'taxonomy' => '', // category, post_tag, wc_portfolio_tag, etc
1431
  }
1432
  }
1433
 
1434
+ // sanitize limit
1435
+ if ( $atts['posts_per_page'] < 0 ) {
1436
+ $atts['posts_per_page'] = -1;
1437
+ $atts['nopaging'] = true;
1438
+ }
1439
+ else if ( 0 == $atts['posts_per_page'] ) {
1440
+ return;
1441
+ }
1442
 
1443
  // sanitize dropdown
1444
  $valid_layouts = array( 'bxslider' );
readme.txt CHANGED
@@ -88,6 +88,10 @@ Use the shortcode manager in the TinyMCE text editor
88
 
89
  == Changelog ==
90
 
 
 
 
 
91
  = Version 2.03 =
92
 
93
  * fixed bug with post_slider shortcode
88
 
89
  == Changelog ==
90
 
91
+ = Version 2.04 =
92
+
93
+ * fixed posts_per_page query
94
+
95
  = Version 2.03 =
96
 
97
  * fixed bug with post_slider shortcode
wc-shortcodes.php CHANGED
@@ -5,11 +5,11 @@ Plugin URI: http://webplantmedia.com/starter-themes/wordpresscanvas/features/sho
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
- Version: 2.03
9
  License: GPLv2 or later
10
  */
11
 
12
- define( 'WC_SHORTCODES_VERSION', '2.03' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
5
  Description: A family of shortcodes to enhance site functionality.
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
+ Version: 2.04
9
  License: GPLv2 or later
10
  */
11
 
12
+ define( 'WC_SHORTCODES_VERSION', '2.04' );
13
  define( 'WC_SHORTCODES_PREFIX', 'wc_shortcodes_' );
14
  define( '_WC_SHORTCODES_PREFIX', '_wc_shortcodes_' );
15
  define( 'WC_SHORTCODES_PLUGIN_URL', plugin_dir_url( __FILE__ ) );