Merge pull request #10079 from woothemes/add/select-all-buttons-multiselect-field
Settings API: add optional "select all"/"select none" buttons to multiselect fields
This commit is contained in:
commit
f4fddf2252
|
@ -666,6 +666,7 @@ abstract class WC_Settings_API {
|
|||
'desc_tip' => false,
|
||||
'description' => '',
|
||||
'custom_attributes' => array(),
|
||||
'allbuttons' => false,
|
||||
'options' => array()
|
||||
);
|
||||
|
||||
|
@ -688,6 +689,9 @@ abstract class WC_Settings_API {
|
|||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php echo $this->get_description_html( $data ); ?>
|
||||
<?php if ( $data['allbuttons'] ) : ?>
|
||||
<br/><a class="select_all button" href="#"><?php _e( 'Select all', 'woocommerce' ); ?></a> <a class="select_none button" href="#"><?php _e( 'Select none', 'woocommerce' ); ?></a>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue