Block fetch method update v1.2.1
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 23 Jul 2015 19:52:22 +0000 (15:52 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 23 Jul 2015 19:52:22 +0000 (15:52 -0400)
Update so the blocks can be unlimited.

models/block.php

index e171f89..cda8830 100644 (file)
@@ -193,9 +193,10 @@ class glm_models_block
     {
         global $wpdb, $wp;
         $args   = array(
-            'post_type' => GLM_BLOCK_POST_TYPE,
-            'orderby'   => 'menu_order post_title',
-            'order'     => 'asc'
+               'posts_per_page' => -1,
+            'post_type'      => GLM_BLOCK_POST_TYPE,
+            'orderby'        => 'menu_order post_title',
+            'order'          => 'asc'
         );
         $blocks = get_posts($args);
         foreach ($blocks as $block) {