Skip to content

Commit

Permalink
FIX: prevent PHP notices
Browse files Browse the repository at this point in the history
  • Loading branch information
MjHead committed May 22, 2017
1 parent 32e2795 commit 086a03a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cherry-services-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Cherry Services List
* Plugin URI: http://www.cherryframework.com/plugins/
* Description: Cherry Services is a flexible WordPress plugin that lets you display your company’s services in a variety of ways.
* Version: 1.3.1
* Version: 1.3.2
* Author: TemplateMonster
* Author URI: http://cherryframework.com/
* Text Domain: cherry-services
Expand Down Expand Up @@ -92,7 +92,7 @@ class Cherry_Services_List {
* @access private
* @var string
*/
private $version = '1.3.1';
private $version = '1.3.2';

/**
* Plugin CPT name
Expand Down
11 changes: 9 additions & 2 deletions public/includes/class-cherry-services-list-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,15 @@ public function shortcode_args() {
* @return array
*/
public function get_categories() {
$tax = cherry_services_list()->tax( 'category' );
return cherry_services_list()->utilities->utility->satellite->get_terms_array( $tax, 'slug' );

$tax = cherry_services_list()->tax( 'category' );
$categories = cherry_services_list()->utilities->utility->satellite->get_terms_array( $tax, 'slug' );

if ( empty( $categories ) ) {
$categories = array();
}

return $categories;
}

/**
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Contributors: TemplateMonster 2002
Tags: custom post type, services, service, cherry-framework, elementor, elementor builder
Requires at least: 4.5
Tested up to: 4.7.4
Stable tag: 1.3.1
Tested up to: 4.7.5
Stable tag: 1.3.2
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -44,6 +44,10 @@ If you have Cherry Testimonials plugin installed on your website, you can also i

== Changelog ==

= 1.3.2 =

* FIX: Minor fixes

= 1.3.1 =

* FIX: Prevent PHP notices in Elementor module
Expand Down

0 comments on commit 086a03a

Please # to comment.