Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shin committed Jan 20, 2017
2 parents 441eedc + 9e53e05 commit 4b0aaa6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 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.8
* Version: 1.0.4.9
* 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.8' );
define( 'CHERRY_PORTFOLIO_VERSION', '1.0.4.9' );

/**
* Set the slug of the plugin.
Expand Down
11 changes: 11 additions & 0 deletions public/includes/classes/class-cherry-portfolio-page-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function __construct() {
// Add a filter to load a custom template for a given post.
add_filter( 'single_template', array( $this, 'get_single_template' ) );

add_filter( 'theme_page_templates', array( $this, 'add_templates' ) );

// Add your templates to this array.
$this->templates = array(
'template-portfolio.php' => __( 'Portfolio', 'cherry-portfolio' ),
Expand All @@ -64,6 +66,15 @@ public function __construct() {

}

/**
* Add services page templates.
*
* @param array $templates Existing templates array.
* @return array
*/
public function add_templates( $templates = array() ) {
return array_merge( $templates, $this->templates );
}

/**
* Adds our template to the pages cache in order to trick WordPress
Expand Down

1 comment on commit 4b0aaa6

@donsavoie
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i keep trying to upload this update and it reverts back to the old version

Please sign in to comment.