'', 'text' => '', 'float' => 'none' ) ); if ( ! isset( $instance['widget_background'] ) ) { $instance['widget_background'] = null; } if ( ! isset( $instance['bootstrap_width'] ) ) { $instance['bootstrap_width'] = null; } if ( ! isset( $instance['text_align'] ) ) { $instance['text_align'] = null; } if ( isset( $instance[ 'bootstrap_custom_width' ] ) ) { $custom_width = $instance[ 'bootstrap_custom_width' ]; } else { $custom_width = ''; } ?>
option_name ); $widget_num = $widget_obj['params'][0]['number']; //arrays with widgets that needs to modify they CSS classes $darklinks_widgets = array( 'widget_recent_comments', ); $greylinks_widgets = array( 'widget_pages', 'widget_nav_menu', 'widget_meta', 'widget_categories', 'widget_archive', 'widget_recent_posts' ); $background_widgets = array(); if ( in_array( $wp_registered_widgets[ $widget_id ]['classname'], $darklinks_widgets ) ) { $params[0]['before_widget'] = str_replace( 'class="widget ', 'class="darklinks widget ', $params[0]['before_widget'] ); } if ( in_array( $wp_registered_widgets[ $widget_id ]['classname'], $greylinks_widgets ) ) { $params[0]['before_widget'] = str_replace( 'class="widget ', 'class="greylinks widget ', $params[0]['before_widget'] ); } if ( in_array( $wp_registered_widgets[ $widget_id ]['classname'], $background_widgets ) ) { $params[0]['before_widget'] = str_replace( 'class="widget ', 'class="with_background widget ', $params[0]['before_widget'] ); } if ( is_active_widget( false, false, 'monster' ) ) { foreach ( $wp_registered_widgets as $key => $widget_instance ) { //working inside monster but not outside if ( is_active_widget( false, false, 'monster' ) ) { if ( in_array( $widget_instance['callback'][0]->widget_options['classname'], $darklinks_widgets ) ) { $widget_instance['callback'][0]->widget_options['classname'] .= ' darklinks'; continue; } if ( in_array( $widget_instance['callback'][0]->widget_options['classname'], $greylinks_widgets ) ) { $widget_instance['callback'][0]->widget_options['classname'] .= ' greylinks'; continue; } if ( in_array( $wp_registered_widgets[ $key ]['classname'], $background_widgets ) ) { $widget_instance['callback'][0]->widget_options['classname'] .= ' with_background'; continue; } } } //foreach } //if monster widget $widget_background = ( !empty( $widget_opt[ $widget_num ]['widget_background'] ) ) ? $widget_opt[ $widget_num ]['widget_background'] : 'widget_no_background'; $bootstrap_width = ( !empty( $widget_opt[ $widget_num ]['bootstrap_width'] ) ) ? $widget_opt[ $widget_num ]['bootstrap_width'] : ''; $bootstrap_custom_width = ( !empty( $widget_opt[ $widget_num ]['bootstrap_custom_width'] ) ) ? $widget_opt[ $widget_num ]['bootstrap_custom_width'] : ''; $text_align = ( !empty( $widget_opt[ $widget_num ]['text_align'] ) ) ? $widget_opt[ $widget_num ]['text_align'] : ''; //creating columns only in footer widget area if ( $bootstrap_width == 'none' || ( $params[0]['id'] !== 'sidebar-footer' && $params[0]['id'] !== 'sidebar-footer-secondary' ) ) { $bootstrap_width = ''; } //if no width set in footer sidebar - set width to 'col-sm-12' if ( ( $bootstrap_width == 'none' || ! $bootstrap_width ) && $params[0]['id'] == 'sidebar-footer' ) { $bootstrap_width = 'col-sm-12'; } //if custom width set if ( !empty( $bootstrap_custom_width ) ) { $bootstrap_width = $bootstrap_custom_width; } $params[0]['before_widget'] = ''; if ( $bootstrap_width ) { $params[0]['before_widget'] = '