Skip to content

Commit

Permalink
v2.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
raducretu committed Jul 29, 2019
1 parent 9fb1045 commit e26803e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions class.sidebars.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,15 @@ public static function sidebar( $default = null, $logic = false, $return = false
$sidebar = get_post_meta( $post->ID, 'white_dynamic_sidebar', true );

if( $return === true ){
if ( $sidebar && is_active_sidebar( $sidebar ) ) return $sidebar;
elseif( is_active_sidebar( $default ) ) return $default;
else return;
if ( is_active_sidebar( $sidebar ) ){
return $sidebar;
}
elseif( is_active_sidebar( $default ) ){
return $default;
}
else {
return;
}
} else {
if ( $logic === true ) {
if ( $sidebar && is_active_sidebar( $sidebar ) ) {
Expand Down Expand Up @@ -269,7 +275,7 @@ public function meta_box_callback( $post ) {

echo '<p><strong><label>'.__('Choose Sidebar:','whitelabel').'</label></strong></p>';
echo '<select name="sidebar" id="sidebar">';
echo '<option>'.__('Choose Sidebar','whitelabel').'</option>';
echo '<option value="">'.__('Choose Sidebar','whitelabel').'</option>';
foreach ( $wp_registered_sidebars as $value ) {
echo '<option value="'.$value['id'].'" '.selected($default_sidebar, $value['id']).'>'.$value['name'].'</option>';
}
Expand Down
3 changes: 2 additions & 1 deletion curly-extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Curly Themes Extension
Plugin URI: http://demo.curlythemes.com
Description: Curly Themes Extension is a collection of Shortcodes, Widgets and Plugins. This plugin exclusive for Curly Themes
Version: 2.4.3
Version: 2.4.4
Author: Curly Themes
Author URI: http://www.curlythemes.com
*/
Expand Down Expand Up @@ -276,5 +276,6 @@ function load_shortcodes_admin_scripts() {

require_once( 'class.vc.php' );
require_once( 'class.shortcodes.php' );
require_once( 'class.sidebars.php' );

?>

0 comments on commit e26803e

Please sign in to comment.