From 781129e1cc8b392c3db7973f93a3ef5ac7148289 Mon Sep 17 00:00:00 2001 From: shin Date: Wed, 16 Dec 2015 15:06:08 +0200 Subject: [PATCH] add: loading mode none attr --- cherry-portfolio.php | 4 ++-- public/includes/classes/class-cherry-portfolio-data.php | 7 ++++++- .../includes/classes/class-cherry-portfolio-shortcode.php | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cherry-portfolio.php b/cherry-portfolio.php index 9eeb5ed..77b7c7a 100644 --- a/cherry-portfolio.php +++ b/cherry-portfolio.php @@ -3,7 +3,7 @@ * Plugin Name: Cherry Portfolio * Plugin URI: http://www.cherryframework.com/ * Description: A portfolio plugin for WordPress. - * Version: 1.0.4.1 + * Version: 1.0.4.2 * Author: Cherry Team * Author URI: http://www.cherryframework.com/ * Text Domain: cherry-portfolio @@ -88,7 +88,7 @@ function constants() { * * @since 1.0.0 */ - define( 'CHERRY_PORTFOLIO_VERSION', '1.0.4.1' ); + define( 'CHERRY_PORTFOLIO_VERSION', '1.0.4.2' ); /** * Set the slug of the plugin. diff --git a/public/includes/classes/class-cherry-portfolio-data.php b/public/includes/classes/class-cherry-portfolio-data.php index 4e37fd3..e089a52 100644 --- a/public/includes/classes/class-cherry-portfolio-data.php +++ b/public/includes/classes/class-cherry-portfolio-data.php @@ -185,6 +185,9 @@ public function the_portfolio( $options = '' ) { case 'portfolio-more-button-mode': $loading_mode = 'more-button'; break; + case 'portfolio-none-mode': + $loading_mode = 'none'; + break; } $container_attr = ''; @@ -280,7 +283,6 @@ public function get_query_portfolio_items( $query_args = '' ) { 'orderby' => 'date', 'posts_per_page' => -1, 'paged' => $paged, - 'offset' => 0, 'post_status' => 'publish', ) ); @@ -1315,6 +1317,9 @@ function get_new_items() { case 'more-button': $html .= $data->build_ajax_more_button( $posts_query->query_vars['paged'], $post_per_page ); break; + case 'none': + $html .= ''; + break; } $html .= ''; echo $html; diff --git a/public/includes/classes/class-cherry-portfolio-shortcode.php b/public/includes/classes/class-cherry-portfolio-shortcode.php index 5e0dd98..bc65211 100644 --- a/public/includes/classes/class-cherry-portfolio-shortcode.php +++ b/public/includes/classes/class-cherry-portfolio-shortcode.php @@ -99,6 +99,7 @@ public function shortcodes( $shortcodes ) { 'loading_mode' => array( 'type' => 'select', 'values' => array( + 'portfolio-none-mode' => __( 'None', 'cherry-portfolio' ), 'portfolio-ajax-pagination-mode' => __('Ajax pagination', 'cherry-portfolio'), 'portfolio-more-button-mode' => __('More button', 'cherry-portfolio'), ),