Fix checklist outputs in admin

This commit is contained in:
Brian Miyaji
2021-11-17 03:26:22 +09:00
parent a605d7ed1a
commit a4363932f4
2 changed files with 14 additions and 39 deletions

View File

@@ -1131,12 +1131,7 @@ if ( ! function_exists( 'sp_post_checklist' ) ) {
}
?>
<div id="<?php echo esc_attr( $slug ); ?>-all" class="posttypediv tabs-panel wp-tab-panel sp-tab-panel sp-tab-filter-panel sp-select-all-range" style="display: <?php echo esc_attr( $display ); ?>;">
<input type="hidden" value="0" name="<?php echo esc_attr( $slug ); ?>
<?php
if ( isset( $index ) ) {
echo '[' . esc_attr( $index ) . ']';}
?>
[]" />
<input type="hidden" value="0" name="<?php echo esc_attr( $slug ); ?><?php if ( isset( $index ) ) { echo '[' . esc_attr( $index ) . ']';} ?>[]" />
<ul class="categorychecklist form-no-clear">
<li class="sp-select-all-container"><label class="selectit"><input type="checkbox" class="sp-select-all"> <strong><?php esc_attr_e( 'Select All', 'sportspress' ); ?></strong></label></li>
<?php
@@ -1202,12 +1197,7 @@ if ( ! function_exists( 'sp_post_checklist' ) ) {
">
<?php echo wp_kses( str_repeat( '<ul><li>', sizeof( $parents ) ) ); ?>
<label class="selectit">
<input type="checkbox" value="<?php echo esc_attr( $post->ID ); ?>" name="<?php echo esc_attr( $slug ); ?>
<?php
if ( isset( $index ) ) {
echo '[' . esc_attr( $index ) . ']';}
?>
[]"
<input type="checkbox" value="<?php echo esc_attr( $post->ID ); ?>" name="<?php echo esc_attr( $slug ); ?><?php if ( isset( $index ) ) { echo '[' . esc_attr( $index ) . ']';} ?>[]"
<?php
if ( in_array( $post->ID, $selected ) ) {
echo ' checked="checked"';}