Plugin Directory

Changeset 1438044


Ignore:
Timestamp:
06/16/2016 08:39:51 PM (10 years ago)
Author:
andtrev
Message:

version 1.1

Location:
tuxedo-responsive-widget-columns/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tuxedo-responsive-widget-columns/trunk/readme.txt

    r1339367 r1438044  
    33Tags: sidebars, sidebar, widget areas, widget, widgets, sidebar columns, widget columns, widget area columns, split sidebar, split widget area, layout, grid, column, columns, row, rows, responsive
    44Requires at least: 3.4
    5 Tested up to: 4.4.1
    6 Stable tag: 1.0
     5Tested up to: 4.5.2
     6Stable tag: 1.1
    77License: GPLv2
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434== Changelog ==
    3535
     36= 1.1 =
     37* If no row/column widgets are used TRWC no longer outputs grid wrappers. Themes that have horizontal widget areas built-in should now function properly.
     38
    3639= 1.0 =
    3740* Initial release.
  • tuxedo-responsive-widget-columns/trunk/tuxedo_responsive_widget_columns.php

    r1339345 r1438044  
    44 * Plugin URI:  https://github.com/andtrev/Tuxedo-Responsive-Widget-Columns
    55 * Description: Split sidebars and widget areas into responsive columns.
    6  * Version:     1.0
     6 * Version:     1.1
    77 * Author:      Trevor Anderson
    88 * Author URI:  https://github.com/andtrev
     
    206206        static $cur_col_in_row = 1;        // Current column in row.
    207207        static $cols_per_row = array( 1 ); // Columns per row.
     208        static $total_tux_widgets = 0;     // Total row/column widgets.
    208209        $before = '';
    209210
     
    216217            $cur_row = 0;
    217218            $cols_per_row = array( 1 );
     219            $total_tux_widgets = 0;
    218220            foreach ( $sidebar_widgets[$sidebar_id] as $widget_id ) {
    219221                if ( strpos( $widget_id, 'tux_col' ) !== false ) {
     
    224226                        $cols_per_row[$cur_row]++;
    225227                    }
     228                    $total_tux_widgets++;
    226229                } elseif ( strpos( $widget_id, 'tux_row' ) !== false ) {
    227230                    $cur_row++;
    228231                    $cols_per_row[$cur_row] = 1;
     232                    $total_tux_widgets++;
    229233                }
    230234            }
     
    232236            $before = '<div class="tux-row"><div class="tux-col tux-span-1-of-' . $cols_per_row[0] . '">';
    233237
     238        }
     239
     240        if ( $total_tux_widgets < 1 ) {
     241            return $params;
    234242        }
    235243
Note: See TracChangeset for help on using the changeset viewer.