Plugin Directory

Changeset 1774004


Ignore:
Timestamp:
11/23/2017 12:40:56 PM (8 years ago)
Author:
jasie
Message:

added separate section for options like alignment and margins (admin)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • widget-pagination/trunk/admin/partials/widget-pagination-admin-display.php

    r1773799 r1774004  
    146146                <table class="widefat striped" id="items_per_page">
    147147                    <?php
    148                     foreach ($this->widgets as $w => $name) :
    149                         $ipp_value = $options['items_per_page_' . $w]; // no default
     148                    foreach ($this->widgets as $key => $name) :
     149                        $ipp_value = isset($options['items_per_page_' . $key]) ? $options['items_per_page_' . $key] : '';
    150150                        $ipp_name = __($name);
    151151                        ?>
    152152                        <tr>
    153153                            <th>
    154                                 <label for="<?php echo $this->plugin_short . '-items_per_page_' . $w ?>"
     154                                <label for="<?php echo $this->plugin_short . '-items_per_page_' . $key ?>"
    155155                                       ><?php echo $ipp_name ?>:</label>
    156156                            </th>
    157157                            <td>
    158158                                <input type="number" steps="1"
    159                                     id="<?php echo $this->plugin_short . '-items_per_page_' . $w ?>"
    160                                     name="<?php echo $this->plugin_short . '[items_per_page_' . $w .']' ?>"
     159                                    id="<?php echo $this->plugin_short . '-items_per_page_' . $key ?>"
     160                                    name="<?php echo $this->plugin_short . '[items_per_page_' . $key .']' ?>"
    161161                                    value="<?php echo $ipp_value ?>" />
    162162                                <span class="hint">
     
    258258                    </tr>
    259259
     260                    <tr>
     261                        <th>
     262                            <label for="<?php echo $this->plugin_short . '-pag_option_autoscroll_speed_cnt' ?>"
     263                                   ><?php _e('Auto-scroll speed', $this->plugin_short) ?>:</label>
     264                        </th>
     265                        <td>
     266                            <input type="number" maxlength="5" step="1" min="0"
     267                                   id="<?php echo $this->plugin_short . '-pag_option_autoscroll_speed_cnt' ?>"
     268                                   name="<?php echo $this->plugin_short . '[pag_option_autoscroll_speed_cnt]' ?>"
     269                                   value="<?php echo $pag_options_scrollSpeed ?>" /> <?php _e('ms', $this->plugin_short) ?>
     270                            <span class="hint">
     271                                <?php echo $default ?>: 0 (<?php _e('off', $this->plugin_short) ?>)
     272                            </span>
     273                        </td>
     274                    </tr>
     275                </table>
     276
     277                <h3><?php _e('Positioning etc.', $this->plugin_short) ?></h3>
     278
     279                <!---------- POSITIONING ETC ---------------------------------->
     280                <table class="widefat striped">
    260281                    <tr>
    261282                        <th>
     
    316337                        </td>
    317338                    </tr>
    318 
    319                     <tr>
    320                         <th>
    321                             <label for="<?php echo $this->plugin_short . '-pag_option_autoscroll_speed_cnt' ?>"
    322                                    ><?php _e('Auto-scroll speed', $this->plugin_short) ?>:</label>
    323                         </th>
    324                         <td>
    325                             <input type="number" maxlength="5" step="1" min="0"
    326                                    id="<?php echo $this->plugin_short . '-pag_option_autoscroll_speed_cnt' ?>"
    327                                    name="<?php echo $this->plugin_short . '[pag_option_autoscroll_speed_cnt]' ?>"
    328                                    value="<?php echo $pag_options_scrollSpeed ?>" /> <?php _e('ms', $this->plugin_short) ?>
    329                             <span class="hint">
    330                                 <?php echo $default ?>: 0 (<?php _e('off', $this->plugin_short) ?>)
    331                             </span>
    332                         </td>
    333                     </tr>
    334339                </table>
     340
    335341            </div><!-- /postbox -->
    336342
Note: See TracChangeset for help on using the changeset viewer.