Skip to content
Snippets Groups Projects
Commit f69195b2 authored by Prasath Nadarajah's avatar Prasath Nadarajah
Browse files

displaying options in dynamic tables

parent 8fce6309
No related branches found
No related tags found
No related merge requests found
...@@ -413,20 +413,20 @@ class Push_Syndication_Server { ...@@ -413,20 +413,20 @@ class Push_Syndication_Server {
$selected_siteoptions = !empty( $selected_siteoptions ) ? $selected_siteoptions : array() ; $selected_siteoptions = !empty( $selected_siteoptions ) ? $selected_siteoptions : array() ;
$site_options = wp_load_alloptions(); $site_options = wp_load_alloptions();
$chunked_arrays = array_chunk( $site_options, 5, true );
echo '<table border="1">'; echo '<table border="1">';
echo '<tbody>'; echo '<tbody>';
foreach( $chunked_arrays as $chunked_array ) { $i = 0;
echo '<tr>'; foreach( $site_options as $key => $value ) {
foreach( $chunked_array as $key => $value ) {
if( $key[0] == '_' ) if( $key[0] == '_' )
continue; continue;
if ( $i == 5 )
echo '<tr>';
?> ?>
<td> <td>
<label> <label>
...@@ -436,13 +436,16 @@ class Push_Syndication_Server { ...@@ -436,13 +436,16 @@ class Push_Syndication_Server {
</td> </td>
<?php <?php
} $i++;
echo '</tr>'; if ( $i == 5 ) {
echo '<tr>';
$i = 0;
}
} }
echo '</tbody'; echo '</tbody>';
echo '</table>'; echo '</table>';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment