Plugin Directory

Changeset 995884


Ignore:
Timestamp:
09/24/2014 07:23:37 AM (11 years ago)
Author:
Webnist
Message:

Version 0.9.9

Location:
custom-nextpage/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • custom-nextpage/trunk/custom-nextpage.php

    r991536 r995884  
    55Description: MultiPage is a customizable plugin. Can any title on the page.
    66Author: Webnist
    7 Version: 0.9.8
     7Version: 0.9.9
    88Author URI: http://profiles.wordpress.org/webnist
    99License: GPLv2 or later
     
    4444            'beforetext'       => '',
    4545            'aftertext'        => '',
    46             'nextpagelink'     => __( '»', 'custom-nextpage' ),
    47             'previouspagelink' => __( '«', 'custom-nextpage' ),
     46            'show_boundary'    => 1,
     47            'show_adjacent'    => 1,
     48            'firstpagelink'    => __( '«', 'custom-nextpage' ),
     49            'lastpagelink'     => __( '»', 'custom-nextpage' ),
     50            'nextpagelink'     => __( '>', 'custom-nextpage' ),
     51            'previouspagelink' => __( '<', 'custom-nextpage' ),
    4852        );
    4953        $this->options         = get_option( 'custom-next-page', $this->default_options );
     
    120124        $output = '';
    121125        if ( $multipage ) {
    122             $nextpagelink     = apply_filters( 'custom_next_page_nextpagelink', $this->options['nextpagelink'] );
    123             $previouspagelink = apply_filters( 'custom_next_page_previouspagelink', $this->options['previouspagelink'] );
     126            $show_boundary     = esc_html( apply_filters( 'custom_next_page_show_boundary', $this->options['show_boundary'] ) );
     127            $show_adjacent     = esc_html( apply_filters( 'custom_next_page_show_adjacent', $this->options['show_adjacent'] ) );
     128            $firstpagelink     = esc_html( apply_filters( 'custom_next_page_firstpagelink', $this->options['firstpagelink'] ) );
     129            $lastpagelink     = esc_html( apply_filters( 'custom_next_page_lastpagelink', $this->options['lastpagelink'] ) );
     130            $nextpagelink     = esc_html( apply_filters( 'custom_next_page_nextpagelink', $this->options['nextpagelink'] ) );
     131            $previouspagelink = esc_html( apply_filters( 'custom_next_page_previouspagelink', $this->options['previouspagelink'] ) );
    124132            $id               = get_the_ID();
    125133            $next_page_title  = self::next_page_title( $id );
     
    129137            $output .= '<ul class="page-links">' ."\n";
    130138            $i = $page - 1;
     139
    131140            if ( $page > 1 ) {
    132                 $link = _wp_link_page( $i );
    133                 $output .= '<li class="previous">' . $link . $previouspagelink . '</a></li>';
     141                $first_link = _wp_link_page( 1 );
     142                $link       = _wp_link_page( $i );
     143                if ( $show_boundary )
     144                    $output .= '<li class="first">' . $first_link . $firstpagelink . '</a></li>';
     145                if ( $show_adjacent )
     146                    $output .= '<li class="previous">' . $link . $previouspagelink . '</a></li>';
    134147            }
    135148            for ( $i = 1; $i <= $numpages; $i++ ) {
     
    143156            $i = $page + 1;
    144157            if ( $i <= $numpages ) {
    145                 $link = _wp_link_page( $i );
    146                 $output .= '<li class="next">' . $link . $nextpagelink . '</a></li>';
     158                $last_link = _wp_link_page( $numpages );
     159                $link      = _wp_link_page( $i );
     160                if ( $show_adjacent )
     161                    $output .= '<li class="next">' . $last_link . $nextpagelink . '</a></li>';
     162
     163                if ( $show_boundary )
     164                    $output .= '<li class="last">' . $link . $lastpagelink . '</a></li>';
    147165            }
    148166            $output .= '</ul>' ."\n";
  • custom-nextpage/trunk/includes/class-admin-menu.php

    r991536 r995884  
    7878
    7979        add_settings_field(
     80            'custom-next-page-boundary',
     81            __( 'The first and last page links displayed.', $this->domain ),
     82            array( &$this, 'check_field' ),
     83            $this->plugin_basename ,
     84            'general',
     85            array(
     86                'name'  => 'custom-next-page[show_boundary]',
     87                'value' => $this->options['show_boundary'],
     88            )
     89        );
     90
     91        add_settings_field(
     92            'custom-next-page-adjacent',
     93            __( 'Next and previous page links to display.', $this->domain ),
     94            array( &$this, 'check_field' ),
     95            $this->plugin_basename ,
     96            'general',
     97            array(
     98                'name'  => 'custom-next-page[show_adjacent]',
     99                'value' => $this->options['show_adjacent'],
     100            )
     101        );
     102
     103        add_settings_field(
     104            'custom-next-page-firstpagelink',
     105            __( 'Text For First Page', $this->domain ),
     106            array( &$this, 'text_field' ),
     107            $this->plugin_basename ,
     108            'general',
     109            array(
     110                'name'  => 'custom-next-page[firstpagelink]',
     111                'value' => $this->options['firstpagelink'],
     112            )
     113        );
     114
     115        add_settings_field(
     116            'custom-next-page-lastpagelink',
     117            __( 'Text For Last Page', $this->domain ),
     118            array( &$this, 'text_field' ),
     119            $this->plugin_basename ,
     120            'general',
     121            array(
     122                'name'  => 'custom-next-page[lastpagelink]',
     123                'value' => $this->options['lastpagelink'],
     124            )
     125        );
     126
     127        add_settings_field(
    80128            'custom-next-page-nextpagelink',
    81129            __( 'Text For Next Page', $this->domain ),
     
    158206        delete_option( 'custom-next-page-before-text' );
    159207        delete_option( 'custom-next-page-after-text' );
     208        delete_option( 'custom-next-page-firstpagelink' );
     209        delete_option( 'custom-next-page-lastpagelink' );
    160210        delete_option( 'custom-next-page-nextpagelink' );
    161211        delete_option( 'custom-next-page-previouspagelink' );
  • custom-nextpage/trunk/languages/custom-nextpage-ja.po

    r991536 r995884  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Custom Nextpage 0.9.1\n"
    6 "Report-Msgid-Bugs-To: http://wordpress.org/tag/custom-nextpage\n"
    7 "POT-Creation-Date: 2014-08-30 08:18:29+00:00\n"
     5"Project-Id-Version: Custom Nextpage 0.9.8\n"
     6"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/custom-nextpage\n"
     7"POT-Creation-Date: 2014-09-24 07:05:35+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "PO-Revision-Date: 2014-08-30 17:24+0900\n"
     11"PO-Revision-Date: 2014-09-24 16:10+0900\n"
    1212"Last-Translator: Webnist <webnist@webnist.org>\n"
    1313"Language-Team: LANGUAGE <LL@li.org>\n"
     
    1616"Language: ja\n"
    1717
    18 #: custom-nextpage.php:46 includes/class-admin-menu.php:157
     18#: custom-nextpage.php:48 includes/class-admin-menu.php:203
     19msgid "&#171;"
     20msgstr "&#187;"
     21
     22#: custom-nextpage.php:49 includes/class-admin-menu.php:202
    1923msgid "&#187;"
    2024msgstr "&#187;"
    2125
    22 #: custom-nextpage.php:47 includes/class-admin-menu.php:158
    23 msgid "&#171;"
    24 msgstr "&#171;"
     26#: custom-nextpage.php:50
     27msgid "&gt;"
     28msgstr "&gt;"
    2529
    26 #: includes/class-admin-editor.php:52
     30#: custom-nextpage.php:51
     31msgid "&lt;"
     32msgstr "&lt;"
     33
     34#: includes/class-admin-editor.php:54
    2735msgid "Title:"
    2836msgstr "タイトル:"
    2937
    30 #: includes/class-admin-editor.php:58
     38#: includes/class-admin-editor.php:60
    3139msgid "OK"
    3240msgstr "OK"
    3341
    34 #: includes/class-admin-editor.php:61
     42#: includes/class-admin-editor.php:63
    3543msgid "Cancel"
    3644msgstr "キャンセル"
     
    4957msgstr "新しいオプションに変換します。"
    5058
    51 #: includes/class-admin-menu.php:26 includes/class-admin-menu.php:150
     59#: includes/class-admin-menu.php:26 includes/class-admin-menu.php:195
    5260msgid "Convert"
    5361msgstr "コンバート"
     
    5765msgstr "設定の初期化"
    5866
    59 #: includes/class-admin-menu.php:29 includes/class-admin-menu.php:169
     67#: includes/class-admin-menu.php:29 includes/class-admin-menu.php:216
    6068msgid "Initialization"
    6169msgstr "初期化"
     
    7886
    7987#: includes/class-admin-menu.php:81
     88msgid "The first and last page links displayed."
     89msgstr "最初と最後のリンクを表示する"
     90
     91#: includes/class-admin-menu.php:93
     92msgid "Next and previous page links to display."
     93msgstr "次と前のリンクを表示する"
     94
     95#: includes/class-admin-menu.php:105
     96msgid "Text For First Page"
     97msgstr "最初のページリンクのテキスト"
     98
     99#: includes/class-admin-menu.php:117
     100msgid "Text For Last Page"
     101msgstr "最後のページリンクのテキスト"
     102
     103#: includes/class-admin-menu.php:129
    80104msgid "Text For Next Page"
    81105msgstr "次のページリンクのテキスト"
    82106
    83 #: includes/class-admin-menu.php:93
     107#: includes/class-admin-menu.php:141
    84108msgid "Text For Previous Page"
    85109msgstr "前のページリンクのテキスト"
  • custom-nextpage/trunk/languages/custom-nextpage.pot

    r991536 r995884  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Custom Nextpage 0.9.1\n"
    6 "Report-Msgid-Bugs-To: http://wordpress.org/tag/custom-nextpage\n"
    7 "POT-Creation-Date: 2014-08-30 08:18:29+00:00\n"
     5"Project-Id-Version: Custom Nextpage 0.9.8\n"
     6"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/custom-nextpage\n"
     7"POT-Creation-Date: 2014-09-24 07:05:35+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    1313"Language-Team: LANGUAGE <LL@li.org>\n"
    1414
    15 #: custom-nextpage.php:46 includes/class-admin-menu.php:157
     15#: custom-nextpage.php:48 includes/class-admin-menu.php:203
     16msgid "&#171;"
     17msgstr ""
     18
     19#: custom-nextpage.php:49 includes/class-admin-menu.php:202
    1620msgid "&#187;"
    1721msgstr ""
    1822
    19 #: custom-nextpage.php:47 includes/class-admin-menu.php:158
    20 msgid "&#171;"
     23#: custom-nextpage.php:50
     24msgid "&gt;"
    2125msgstr ""
    2226
    23 #: includes/class-admin-editor.php:52
     27#: custom-nextpage.php:51
     28msgid "&lt;"
     29msgstr ""
     30
     31#: includes/class-admin-editor.php:54
    2432msgid "Title:"
    2533msgstr ""
    2634
    27 #: includes/class-admin-editor.php:58
     35#: includes/class-admin-editor.php:60
    2836msgid "OK"
    2937msgstr ""
    3038
    31 #: includes/class-admin-editor.php:61
     39#: includes/class-admin-editor.php:63
    3240msgid "Cancel"
    3341msgstr ""
    3442
    35 #. #-#-#-#-#  custom-nextpage.pot (Custom Nextpage 0.9.1)  #-#-#-#-#
     43#. #-#-#-#-#  custom-nextpage.pot (Custom Nextpage 0.9.8)  #-#-#-#-#
    3644#. Plugin Name of the plugin/theme
    3745#: includes/class-admin-menu.php:12
     
    4755msgstr ""
    4856
    49 #: includes/class-admin-menu.php:26 includes/class-admin-menu.php:150
     57#: includes/class-admin-menu.php:26 includes/class-admin-menu.php:195
    5058msgid "Convert"
    5159msgstr ""
     
    5563msgstr ""
    5664
    57 #: includes/class-admin-menu.php:29 includes/class-admin-menu.php:169
     65#: includes/class-admin-menu.php:29 includes/class-admin-menu.php:216
    5866msgid "Initialization"
    5967msgstr ""
     
    7684
    7785#: includes/class-admin-menu.php:81
     86msgid "The first and last page links displayed."
     87msgstr ""
     88
     89#: includes/class-admin-menu.php:93
     90msgid "Next and previous page links to display."
     91msgstr ""
     92
     93#: includes/class-admin-menu.php:105
     94msgid "Text For First Page"
     95msgstr ""
     96
     97#: includes/class-admin-menu.php:117
     98msgid "Text For Last Page"
     99msgstr ""
     100
     101#: includes/class-admin-menu.php:129
    78102msgid "Text For Next Page"
    79103msgstr ""
    80104
    81 #: includes/class-admin-menu.php:93
     105#: includes/class-admin-menu.php:141
    82106msgid "Text For Previous Page"
    83107msgstr ""
  • custom-nextpage/trunk/readme.txt

    r991536 r995884  
    1616A plug-in installation screen is displayed on the WordPress admin panel.
    1717It installs it in `wp-content/plugins`.
    18 The plug-in is made effective.
     18The plug-in is made effective. 
    1919Open \'Settings\' -> \'Custom Nextpage\' menu.
    2020
     
    3131
    3232== Changelog ==
     33= 0.9.9 =
     34Add First page link
     35Add Last page link
     36Add Link display options
     37
    3338= 0.9.8 =
    3439Class adjustment
Note: See TracChangeset for help on using the changeset viewer.