add_style( 'width', '100%' ); } public function rows( $rows ) { $this->rows = $rows; return $this; } public function columns( $columns ) { $this->columns = $columns; return $this; } public function height( $heights ) { $this->heights = $heights; foreach( $heights as $row => $height ) { $this->add_style( 'height', $height, 'row-' . $row ); } return $this; } public function width( $widths ) { $this->widths = $widths; foreach( $widths as $column => $width ) { $this->add_style( 'width', $width, 'col-' . $column ); } return $this; } public function responsive( $responsive ) { $this->responsive = $responsive; return $this; } public function output( $post, $args = array() ) { if( !$this->output_block( $post, $args ) ) return ''; $args['max_width'] = $this->max_width && $args['max_width'] > $this->max_width ? $this->max_width : $args['max_width']; $args['max_height'] = $this->max_height && $args['max_height'] > $this->max_height ? $this->max_height : $args['max_height']; $args['desktop'] = $args['desktop'] && $this->show_on_desktop; $output = $this->before_output(); ob_start(); ?>
| style( array( 'td', 'row-' . $i, 'col-' . $j ) ); ?>> output_children( $post, $i, $j, $args ); ?> |