public function render() { $name = $this->data->get_checkbox_name(); $id = "{$name}_id"; ?> <tr class="form-field"> <th scope="row"><?php esc_html_e('Redirection', 'multilingual-press'); ?> </th> <td> <label for="<?php echo esc_attr($id); ?> "> <input type="checkbox" name="<?php echo esc_attr($name); ?> " value="1" id="<?php echo esc_attr($id); ?> " <?php checked(1, $this->data->get_current_option_value()); ?> > <?php esc_html_e('Enable automatic redirection', 'multilingual-press'); ?> <?php echo \Inpsyde\MultilingualPress\nonce_field($this->nonce); ?> </label> </td> </tr> <?php }
public function render() { wp_nonce_field($this->nonce->get_action(), $this->nonce->get_name()); $current = $this->data->get_current_option_value(); $label = esc_attr__('Enable automatic redirection', 'multilingualpress'); $name = $this->data->get_checkbox_name(); $id = "{$name}_id"; ?> <tr> <td><?php esc_html_e('Redirection', 'multilingualpress'); ?> </td> <td> <label for="<?php print $id; ?> "> <input type="checkbox" <?php checked(1, $current); ?> id="<?php print $id; ?> " value="1" name="<?php print $name; ?> " /> <?php print $label; ?> </label> </td> </tr> <?php }