Changeset 1124088
- Timestamp:
- 03/31/2015 02:19:20 AM (11 years ago)
- Location:
- custom-nextpage/trunk
- Files:
-
- 6 edited
-
custom-nextpage.php (modified) (5 diffs)
-
includes/class-admin-menu.php (modified) (3 diffs)
-
languages/custom-nextpage-ja.mo (modified) (previous)
-
languages/custom-nextpage-ja.po (modified) (5 diffs)
-
languages/custom-nextpage.pot (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-nextpage/trunk/custom-nextpage.php
r1123345 r1124088 5 5 Description: MultiPage is a customizable plugin. Can any title on the page. 6 6 Author: Webnist 7 Version: 1. 0.67 Version: 1.1.0 8 8 Author URI: http://profiles.wordpress.org/webnist 9 9 License: GPLv2 or later … … 46 46 'beforetext' => '', 47 47 'aftertext' => '', 48 'show_all' => 1, 49 'end_size' => 1, 50 'mid_size' => 2, 48 51 'show_boundary' => 1, 49 52 'show_adjacent' => 1, … … 59 62 $this->beforetext = $this->options['beforetext'] ? $this->options['beforetext'] : ''; 60 63 $this->aftertext = $this->options['aftertext'] ? $this->options['aftertext'] : ''; 64 $this->show_all = $this->options['show_all'] ? $this->options['show_all'] : ''; 65 $this->end_size = $this->options['end_size'] ? $this->options['end_size'] : 1; 66 $this->mid_size = $this->options['mid_size'] ? $this->options['mid_size'] : 2; 61 67 $this->show_boundary = $this->options['show_boundary'] ? $this->options['show_boundary'] : ''; 62 68 $this->show_adjacent = $this->options['show_adjacent'] ? $this->options['show_adjacent'] : ''; … … 140 146 $output = ''; 141 147 if ( $multipage ) { 142 $show_boundary = esc_html( apply_filters( 'custom_next_page_show_boundary', $this->show_boundary ) ); 143 $show_adjacent = esc_html( apply_filters( 'custom_next_page_show_adjacent', $this->show_adjacent ) ); 144 $firstpagelink = esc_html( apply_filters( 'custom_next_page_firstpagelink', $this->firstpagelink ) ); 148 $show_all = (boolean) $this->show_all; 149 $end_size = $this->end_size; 150 $mid_size = $this->mid_size; 151 $show_boundary = esc_html( apply_filters( 'custom_next_page_show_boundary', $this->show_boundary ) ); 152 $show_adjacent = esc_html( apply_filters( 'custom_next_page_show_adjacent', $this->show_adjacent ) ); 153 $firstpagelink = esc_html( apply_filters( 'custom_next_page_firstpagelink', $this->firstpagelink ) ); 145 154 $lastpagelink = esc_html( apply_filters( 'custom_next_page_lastpagelink', $this->lastpagelink ) ); 146 155 $nextpagelink = esc_html( apply_filters( 'custom_next_page_nextpagelink', $this->nextpagelink ) ); … … 162 171 $output .= '<li class="previous">' . $link . $previouspagelink . '</a></li>'; 163 172 } 164 for ( $i = 1; $i <= $numpages; $i++ ) { 165 if ( $page === $i ) { 166 $link = '<li class="numpages current"><span>' . $i . '</span></li>'; 173 174 $p_base = get_permalink(); 175 $p_format = '%#%'; 176 177 if($word = strpos($p_base, '?')){ 178 $p_base = get_option(home).(substr(get_option(home), -1 ,1) === '/' ? '' : '/') 179 .'%_%'.substr($p_base, $word); 180 } else{ 181 $p_base .= (substr($p_base, -1 ,1) === '/' ? '' : '/') .'%_%'; 182 } 183 $nav_list = paginate_links(array( 184 'base' => $p_base, 185 'format' => $p_format, 186 'total' => $numpages, 187 'current' => ($page ? $page : 1), 188 'show_all' => $show_all, 189 'end_size' => $end_size, 190 'mid_size' => $mid_size, 191 'prev_next' => false, 192 'type' => 'array', 193 )); 194 foreach ( $nav_list as $nav ) { 195 if ( stristr( $nav, 'span' ) ) { 196 if ( stristr( $nav, 'dots' ) ) { 197 $output .= '<li class="numpages dots"><span>' . strip_tags( $nav ) . '</span></li>'; 198 } else { 199 $output .= '<li class="numpages current"><span>' . strip_tags( $nav ) . '</span></li>'; 200 } 167 201 } else { 168 $ link = '<li class="numpages">' . _wp_link_page( $i ) . $i . '</a></li>';202 $output .= '<li class="numpages">' . $nav . '</li>'; 169 203 } 170 $output .= $link;171 } 204 } 205 172 206 $i = $page + 1; 173 207 if ( $i <= $numpages ) { -
custom-nextpage/trunk/includes/class-admin-menu.php
r1015430 r1124088 108 108 109 109 add_settings_field( 110 'custom-next-page-show_all', 111 __( 'Show all numbers', $this->domain ), 112 array( &$this, 'check_field' ), 113 $this->plugin_basename, 114 'general', 115 array( 116 'name' => 'custom-next-page[show_all]', 117 'value' => $this->show_all, 118 ) 119 ); 120 add_settings_field( 121 'custom-next-page-end_size', 122 __( 'End size', $this->domain ), 123 array( &$this, 'text_field' ), 124 $this->plugin_basename, 125 'general', 126 array( 127 'name' => 'custom-next-page[end_size]', 128 'value' => $this->end_size, 129 'class' => 'small-text', 130 'desc' => __( 'How many numbers on either the start and the end list edges.', $this->domain ), 131 ) 132 ); 133 add_settings_field( 134 'custom-next-page-mid_size', 135 __( 'Mid size', $this->domain ), 136 array( &$this, 'text_field' ), 137 $this->plugin_basename, 138 'general', 139 array( 140 'name' => 'custom-next-page[mid_size]', 141 'value' => $this->mid_size, 142 'class' => 'small-text', 143 'desc' => __( 'How many numbers to either side of current page, but not including current page.', $this->domain ), 144 ) 145 ); 146 add_settings_field( 110 147 'custom-next-page-boundary', 111 148 __( 'The first and last page links displayed.', $this->domain ), … … 223 260 $id = ! empty( $id ) ? $id : $name; 224 261 $desc = ! empty( $desc ) ? $desc : ''; 225 $output = '<input type="text" name="' . $name .'" id="' . $id .'" class="regular-text" value="' . $value .'" />' . "\n"; 262 $class = ! empty( $class ) ? $class: 'regular-text'; 263 $output = '<input type="text" name="' . $name .'" id="' . $id .'" class="' . $class . '" value="' . $value .'" />' . "\n"; 226 264 if ( $desc ) 227 265 $output .= '<p class="description">' . $desc . '</p>' . "\n"; … … 300 338 public function register_setting_check( $value ) { 301 339 $value['filter'] = (int) $value['filter']; 340 $value['show_all'] = (int) $value['show_all']; 341 $value['end_size'] = (int) $value['end_size']; 342 $value['end_size'] = (int) $value['end_size']; 302 343 $value['show_boundary'] = (int) $value['show_boundary']; 303 344 $value['show_adjacent'] = (int) $value['show_adjacent']; -
custom-nextpage/trunk/languages/custom-nextpage-ja.po
r1071540 r1124088 5 5 "Project-Id-Version: Custom Nextpage 0.9.8\n" 6 6 "Report-Msgid-Bugs-To: http://wordpress.org/tag/custom-nextpage\n" 7 "POT-Creation-Date: 201 4-10-03 04:12:45+00:00\n"8 "PO-Revision-Date: 201 4-10-03 13:21+0900\n"7 "POT-Creation-Date: 2015-03-30 06:27:28+00:00\n" 8 "PO-Revision-Date: 2015-03-30 15:28+0900\n" 9 9 "Last-Translator: Webnist <webnist@webnist.org>\n" 10 10 "Language-Team: LANGUAGE <LL@li.org>\n" … … 16 16 "Plural-Forms: nplurals=1; plural=0;\n" 17 17 18 #: custom-nextpage.php:5 0 custom-nextpage.php:6319 #: includes/class-admin-menu.php:3 1618 #: custom-nextpage.php:53 custom-nextpage.php:69 19 #: includes/class-admin-menu.php:358 20 20 msgid "«" 21 21 msgstr "«" 22 22 23 #: custom-nextpage.php:5 1 custom-nextpage.php:6424 #: includes/class-admin-menu.php:3 1523 #: custom-nextpage.php:54 custom-nextpage.php:70 24 #: includes/class-admin-menu.php:357 25 25 msgid "»" 26 26 msgstr "»" 27 27 28 #: custom-nextpage.php:5 2 custom-nextpage.php:6528 #: custom-nextpage.php:55 custom-nextpage.php:71 29 29 msgid ">" 30 30 msgstr ">" 31 31 32 #: custom-nextpage.php:5 3 custom-nextpage.php:6632 #: custom-nextpage.php:56 custom-nextpage.php:72 33 33 msgid "<" 34 34 msgstr "<" … … 59 59 msgstr "新しいオプションに変換します。" 60 60 61 #: includes/class-admin-menu.php:55 includes/class-admin-menu.php:3 0861 #: includes/class-admin-menu.php:55 includes/class-admin-menu.php:350 62 62 msgid "Convert" 63 63 msgstr "コンバート" … … 67 67 msgstr "設定の初期化" 68 68 69 #: includes/class-admin-menu.php:58 includes/class-admin-menu.php:3 2969 #: includes/class-admin-menu.php:58 includes/class-admin-menu.php:371 70 70 msgid "Initialization" 71 71 msgstr "初期化" … … 88 88 89 89 #: includes/class-admin-menu.php:111 90 msgid "Show all numbers" 91 msgstr "全て表示" 92 93 #: includes/class-admin-menu.php:122 94 msgid "End size" 95 msgstr "End size" 96 97 #: includes/class-admin-menu.php:130 98 msgid "How many numbers on either the start and the end list edges." 99 msgstr "ページ番号のリストの両端(最初と最後)にいくつの数字を表示するか。" 100 101 #: includes/class-admin-menu.php:135 102 msgid "Mid size" 103 msgstr "Mid size" 104 105 #: includes/class-admin-menu.php:143 106 msgid "" 107 "How many numbers to either side of current page, but not including current " 108 "page." 109 msgstr "" 110 "現在のページの両側にいくつの数字を表示するか。ただし現在のページは含みませ" 111 "ん。" 112 113 #: includes/class-admin-menu.php:148 90 114 msgid "The first and last page links displayed." 91 115 msgstr "最初と最後のリンクを表示する" 92 116 93 #: includes/class-admin-menu.php:1 23117 #: includes/class-admin-menu.php:160 94 118 msgid "Next and previous page links to display." 95 119 msgstr "次と前のリンクを表示する" 96 120 97 #: includes/class-admin-menu.php:1 35121 #: includes/class-admin-menu.php:172 98 122 msgid "Text For First Page" 99 123 msgstr "最初のページリンクのテキスト" 100 124 101 #: includes/class-admin-menu.php:1 47125 #: includes/class-admin-menu.php:184 102 126 msgid "Text For Last Page" 103 127 msgstr "最後のページリンクのテキスト" 104 128 105 #: includes/class-admin-menu.php:1 59129 #: includes/class-admin-menu.php:196 106 130 msgid "Text For Next Page" 107 131 msgstr "次のページリンクのテキスト" 108 132 109 #: includes/class-admin-menu.php: 171133 #: includes/class-admin-menu.php:208 110 134 msgid "Text For Previous Page" 111 135 msgstr "前のページリンクのテキスト" 112 136 113 #: includes/class-admin-menu.php: 183137 #: includes/class-admin-menu.php:220 114 138 msgid "Style" 115 139 msgstr "スタイル" 116 140 117 #: includes/class-admin-menu.php: 190141 #: includes/class-admin-menu.php:227 118 142 msgid "Select Style type" 119 143 msgstr "スタイルの選択" 120 144 121 #: includes/class-admin-menu.php: 197145 #: includes/class-admin-menu.php:234 122 146 msgid "Default" 123 147 msgstr "デフォルト" 124 148 125 #: includes/class-admin-menu.php: 198 includes/class-admin-menu.php:207149 #: includes/class-admin-menu.php:235 includes/class-admin-menu.php:244 126 150 msgid "Style Edit" 127 151 msgstr "スタイル編集" 128 152 129 #: includes/class-admin-menu.php: 199153 #: includes/class-admin-menu.php:236 130 154 msgid "Disable" 131 155 msgstr "無効化" 132 156 133 #: includes/class-admin-menu.php:2 15157 #: includes/class-admin-menu.php:252 134 158 msgid "" 135 159 "Press ctrl-space to activate autocompletion. <span class=\"button button-" -
custom-nextpage/trunk/languages/custom-nextpage.pot
r1001285 r1124088 1 # Copyright (C) 201 4Custom Nextpage1 # Copyright (C) 2015 Custom Nextpage 2 2 # This file is distributed under the same license as the Custom Nextpage package. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Custom Nextpage 1. 0.0\n"5 "Project-Id-Version: Custom Nextpage 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: http://wordpress.org/tag/custom-nextpage\n" 7 "POT-Creation-Date: 201 4-10-03 04:12:45+00:00\n"7 "POT-Creation-Date: 2015-03-30 06:27:28+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=UTF-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 201 4-MO-DA HO:MI+ZONE\n"11 "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n" 12 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 13 "Language-Team: LANGUAGE <LL@li.org>\n" 14 14 15 #: custom-nextpage.php:5 0 custom-nextpage.php:6316 #: includes/class-admin-menu.php:3 1615 #: custom-nextpage.php:53 custom-nextpage.php:69 16 #: includes/class-admin-menu.php:358 17 17 msgid "«" 18 18 msgstr "" 19 19 20 #: custom-nextpage.php:5 1 custom-nextpage.php:6421 #: includes/class-admin-menu.php:3 1520 #: custom-nextpage.php:54 custom-nextpage.php:70 21 #: includes/class-admin-menu.php:357 22 22 msgid "»" 23 23 msgstr "" 24 24 25 #: custom-nextpage.php:5 2 custom-nextpage.php:6525 #: custom-nextpage.php:55 custom-nextpage.php:71 26 26 msgid ">" 27 27 msgstr "" 28 28 29 #: custom-nextpage.php:5 3 custom-nextpage.php:6629 #: custom-nextpage.php:56 custom-nextpage.php:72 30 30 msgid "<" 31 31 msgstr "" … … 43 43 msgstr "" 44 44 45 #. #-#-#-#-# custom-nextpage.pot (Custom Nextpage 1. 0.0) #-#-#-#-#45 #. #-#-#-#-# custom-nextpage.pot (Custom Nextpage 1.1.0) #-#-#-#-# 46 46 #. Plugin Name of the plugin/theme 47 47 #: includes/class-admin-menu.php:15 … … 57 57 msgstr "" 58 58 59 #: includes/class-admin-menu.php:55 includes/class-admin-menu.php:3 0859 #: includes/class-admin-menu.php:55 includes/class-admin-menu.php:350 60 60 msgid "Convert" 61 61 msgstr "" … … 65 65 msgstr "" 66 66 67 #: includes/class-admin-menu.php:58 includes/class-admin-menu.php:3 2967 #: includes/class-admin-menu.php:58 includes/class-admin-menu.php:371 68 68 msgid "Initialization" 69 69 msgstr "" … … 86 86 87 87 #: includes/class-admin-menu.php:111 88 msgid "Show all numbers" 89 msgstr "" 90 91 #: includes/class-admin-menu.php:122 92 msgid "End size" 93 msgstr "" 94 95 #: includes/class-admin-menu.php:130 96 msgid "How many numbers on either the start and the end list edges." 97 msgstr "" 98 99 #: includes/class-admin-menu.php:135 100 msgid "Mid size" 101 msgstr "" 102 103 #: includes/class-admin-menu.php:143 104 msgid "" 105 "How many numbers to either side of current page, but not including current " 106 "page." 107 msgstr "" 108 109 #: includes/class-admin-menu.php:148 88 110 msgid "The first and last page links displayed." 89 111 msgstr "" 90 112 91 #: includes/class-admin-menu.php:1 23113 #: includes/class-admin-menu.php:160 92 114 msgid "Next and previous page links to display." 93 115 msgstr "" 94 116 95 #: includes/class-admin-menu.php:1 35117 #: includes/class-admin-menu.php:172 96 118 msgid "Text For First Page" 97 119 msgstr "" 98 120 99 #: includes/class-admin-menu.php:1 47121 #: includes/class-admin-menu.php:184 100 122 msgid "Text For Last Page" 101 123 msgstr "" 102 124 103 #: includes/class-admin-menu.php:1 59125 #: includes/class-admin-menu.php:196 104 126 msgid "Text For Next Page" 105 127 msgstr "" 106 128 107 #: includes/class-admin-menu.php: 171129 #: includes/class-admin-menu.php:208 108 130 msgid "Text For Previous Page" 109 131 msgstr "" 110 132 111 #: includes/class-admin-menu.php: 183133 #: includes/class-admin-menu.php:220 112 134 msgid "Style" 113 135 msgstr "" 114 136 115 #: includes/class-admin-menu.php: 190137 #: includes/class-admin-menu.php:227 116 138 msgid "Select Style type" 117 139 msgstr "" 118 140 119 #: includes/class-admin-menu.php: 197141 #: includes/class-admin-menu.php:234 120 142 msgid "Default" 121 143 msgstr "" 122 144 123 #: includes/class-admin-menu.php: 198 includes/class-admin-menu.php:207145 #: includes/class-admin-menu.php:235 includes/class-admin-menu.php:244 124 146 msgid "Style Edit" 125 147 msgstr "" 126 148 127 #: includes/class-admin-menu.php: 199149 #: includes/class-admin-menu.php:236 128 150 msgid "Disable" 129 151 msgstr "" 130 152 131 #: includes/class-admin-menu.php:2 15153 #: includes/class-admin-menu.php:252 132 154 msgid "" 133 155 "Press ctrl-space to activate autocompletion. <span class=\"button button-" -
custom-nextpage/trunk/readme.txt
r1123345 r1124088 5 5 Requires at least: 3.6 6 6 Tested up to: 4.0 7 Version: 1. 0.67 Version: 1.1.0 8 8 License: GPLv2 or later 9 9 … … 43 43 == Changelog == 44 44 45 = 1.1.0 = 46 Add Grouping multiple pages 47 45 48 = 1.0.6 = 46 49 Fixed bug: Change WP_PLUGIN_URL to WP_PLUGIN_DIR for file_get_contents
Note: See TracChangeset
for help on using the changeset viewer.