<?php
global $Kd_Share_Post;

?>
	<div id="kd-share-post">
		<form action="?page=kd-supports&tab=share_post" method="POST">
			<table class="form-table kd-settings-table">
				<?php
				$list_network = (array)get_option( 'kd_share_post' );

				foreach ( $list_network as $key => $social ) {
					$check = '';

					if ( ! empty( $social['active'] ) && $social['active'] === 'on' ) {
						$check = ' checked="checked" ';
					}
					?>
					<tr>
						<th><label for="kd-show-on"><?php echo esc_html( $social['title'] ); ?></label></th>
						<td>
							<input name="kd_share_post[<?php echo esc_attr( $key ); ?>][title]" type="hidden" value="<?php echo esc_attr( $social['title'] ); ?>" />
							<input type="checkbox" name="kd_share_post[<?php echo esc_attr( $key ); ?>][active]" <?php echo $check; ?>>
							<input class="" type="text" name="kd_share_post[<?php echo esc_attr( $key ); ?>][name_class]" value="<?php echo esc_attr( $social['name_class'] ); ?>" />
						</td>
					</tr>
					<?php
				}
				?>
			</table>
			<?php submit_button() ?>
		</form>
	</div>
<?php
