Plugin Directory

Changeset 558066


Ignore:
Timestamp:
06/14/2012 05:31:20 PM (14 years ago)
Author:
jasie
Message:

added option for the visibility of the prev/next labels

Location:
widget-pagination/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • widget-pagination/trunk/inc/wgpag-options.php

    r558052 r558066  
    106106                                value="<? echo $options['pag_option_next'] ? $options['pag_option_next'] : '>'; ?>" />
    107107                            <span class="hint"><?php _e("e.g.", 'wgpag') ?> &#9654; <?php _e("or", 'wgpag') ?> &rarr; &nbsp;|&nbsp; <? echo $default ?>: &gt;</span>
     108                        </td>
     109                    </tr>
     110
     111                    <tr>
     112                        <th>
     113                            <label for="wgpag-pag_option_prevnext_threshold"><?php _e("Visibility of the labels", 'wgpag') ?>:*</label>
     114                        </th>
     115                        <td>
     116                            <input type="text" size="5" maxlength="5"
     117                                name="wgpag-pag_option_prevnext_threshold"
     118                                id="wgpag-pag_option_prevnext_threshold"
     119                                value="<? echo $options['pag_option_prevnext_threshold'] ?>" />
     120                            <span class="hint"><?php _e("e.g.", 'wgpag') ?> 3 | <? echo $default ?>:  (<?php _e("off", 'wgpag') ?>)</span>
    108121                        </td>
    109122                    </tr>
     
    473486
    474487                <dt><?php _e("Mouseover on linked pagination items", 'wgpag') ?> (e)</dt>
    475                 <dd></dd>
     488                <dd>
     489                    <?php _e("An effect to highlight interactive elements.", 'wgpag') ?>
     490                </dd>
     491
     492                <dt><?php _e("Visibility of the labels", 'wgpag') ?> (f)</dt>
     493                <dd>
     494                    <?php _e("Only show the previous and next labels if there are more pages in the pagination than the number given in this setting.)", 'wgpag') ?>
     495                </dd>
    476496
    477497                <dt><?php _e("px/em units", 'wgpag') ?></dt>
  • widget-pagination/trunk/widget_pagination.php

    r558052 r558066  
    8686                    if (!empty($_POST['wgpag-pag_option_next']))
    8787                        $options['pag_option_next'] = $_POST['wgpag-pag_option_next'];
     88                    if (!empty($_POST['wgpag-pag_option_prevnext_threshold']))
     89                        $options['pag_option_prevnext_threshold'] = $_POST['wgpag-pag_option_prevnext_threshold'];
    8890                    if (!empty($_POST['wgpag-pag_option_hor_align']))
    8991                        $options['pag_option_hor_align'] = $_POST['wgpag-pag_option_hor_align'];
     
    220222
    221223            $options = array(
    222                 'widgets'          => $widgets,
    223                 'pages_to_show'    => $options['pag_option_ptsh'],
    224                 'prev_label'       => $options['pag_option_prev'],
    225                 'next_label'       => $options['pag_option_next'],
    226                 'hor_align'        => $options['pag_option_hor_align'],
    227                 'autoscroll_speed' => $options['pag_option_autoscroll_speed']);
     224                'widgets'            => $widgets,
     225                'pages_to_show'      => $options['pag_option_ptsh'],
     226                'prev_label'         => $options['pag_option_prev'],
     227                'next_label'         => $options['pag_option_next'],
     228                'prevnext_threshold' => $options['pag_option_prevnext_threshold'],
     229                'hor_align'          => $options['pag_option_hor_align'],
     230                'autoscroll_speed'   => $options['pag_option_autoscroll_speed']);
    228231
    229232            wp_localize_script('wgpag', 'wgpag_options',
Note: See TracChangeset for help on using the changeset viewer.