Skip to content

Commit

Permalink
add: loading mode none attr
Browse files Browse the repository at this point in the history
  • Loading branch information
shin committed Dec 16, 2015
1 parent 2684da1 commit 781129e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cherry-portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
7 changes: 6 additions & 1 deletion public/includes/classes/class-cherry-portfolio-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down Expand Up @@ -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',
)
);
Expand Down Expand Up @@ -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 .= '</div>';
echo $html;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
),
Expand Down

0 comments on commit 781129e

Please sign in to comment.