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

dynamic tables to display tables

parent 2f9216ba
Branches
No related tags found
No related merge requests found
......@@ -413,23 +413,38 @@ class Push_Syndication_Server {
$selected_siteoptions = !empty( $selected_siteoptions ) ? $selected_siteoptions : array() ;
$site_options = wp_load_alloptions();
$chunked_arrays = array_chunk( $site_options, 5, true );
foreach( $site_options as $key => $value ) {
echo '<table border="1">';
echo '<tbody>';
foreach( $chunked_arrays as $chunked_array ) {
echo '<tr>';
foreach( $chunked_array as $key => $value ) {
if( $key[0] == '_' )
continue;
?>
<p>
<label>
<input type="checkbox" name="syn_selected_siteoptions[]" value="<?php echo esc_html( $key ); ?>" <?php $this->checked_array( $key, $selected_siteoptions ) ?> />
<?php echo esc_html( $key ); ?>
</label>
</p>
<td>
<label>
<input type="checkbox" name="syn_selected_siteoptions[]" value="<?php echo esc_html( $key ); ?>" <?php $this->checked_array( $key, $selected_siteoptions ) ?> />
<?php echo esc_html( $key ); ?>
</label>
</td>
<?php
}
echo '</tr>';
}
echo '</tbody';
echo '</table>';
}
/******* SYNCING OPTIONS *******/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment