Version Description
- Released: 2 August 2012
- New: advanced option to prevent the output of this plugin's CSS. This option allows the site owner to incorporate styles in one of their existing style sheets. Thanks to Ivan and Swashata for suggesting it.
- Added Simplified Chinese translation thanks to icedream
- Make more translatable by adding a translation POT file in the languages folder. Translations welcome!
- Adjust multibyte string detection as reported by johnnyvaughan
- Support PHP 5.4.x installations. Thanks to Josh for raising it.
- Fixed: -2 appearing in links when using the TOC+ widget. Thanks to Arturo for raising it.
Download this release
Release Info
Developer | conjur3r |
Plugin | Table of Contents Plus |
Version | 1208 |
Comparing to | |
See all releases |
Code changes from version 1207 to 1208
- assets/banner-772x250.png +0 -0
- languages/toc+-zh_CN.mo +0 -0
- languages/toc+-zh_CN.po +584 -0
- languages/toc+.pot +649 -0
- readme.txt +16 -1
- toc.php +98 -84
assets/banner-772x250.png
DELETED
Binary file
|
languages/toc+-zh_CN.mo
ADDED
Binary file
|
languages/toc+-zh_CN.po
ADDED
@@ -0,0 +1,584 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2012
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: table of contents plus 1207\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/table-of-contents-plus\n"
|
7 |
+
"POT-Creation-Date: 2012-08-01 13:02:20+00:00\n"
|
8 |
+
"PO-Revision-Date: 2012-08-02 11:59+0800\n"
|
9 |
+
"Last-Translator: icedream <icedream@tesfans.org>\n"
|
10 |
+
"Language-Team: Chinese (Simplified) <icedream@tesfans.org>\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Poedit-Language: Chinese\n"
|
15 |
+
"X-Poedit-Country: CHINA\n"
|
16 |
+
|
17 |
+
#: toc.php:169
|
18 |
+
msgid "Settings"
|
19 |
+
msgstr "设置"
|
20 |
+
|
21 |
+
#: toc.php:339
|
22 |
+
#: toc.php:340
|
23 |
+
msgid "TOC"
|
24 |
+
msgstr "TOC"
|
25 |
+
|
26 |
+
#: toc.php:474
|
27 |
+
msgid "Options saved."
|
28 |
+
msgstr "选项已保存。"
|
29 |
+
|
30 |
+
#: toc.php:476
|
31 |
+
msgid "Save failed."
|
32 |
+
msgstr "保存失败。"
|
33 |
+
|
34 |
+
#: toc.php:488
|
35 |
+
msgid "Main Options"
|
36 |
+
msgstr "主要选项"
|
37 |
+
|
38 |
+
#: toc.php:489
|
39 |
+
msgid "Sitemap"
|
40 |
+
msgstr "站点地图"
|
41 |
+
|
42 |
+
#: toc.php:490
|
43 |
+
msgid "Help"
|
44 |
+
msgstr "帮助"
|
45 |
+
|
46 |
+
#: toc.php:498
|
47 |
+
msgid "Position"
|
48 |
+
msgstr "位置"
|
49 |
+
|
50 |
+
#: toc.php:501
|
51 |
+
msgid "Before first heading (default)"
|
52 |
+
msgstr "第一个标题前面(默认)"
|
53 |
+
|
54 |
+
#: toc.php:502
|
55 |
+
msgid "Top"
|
56 |
+
msgstr "顶部"
|
57 |
+
|
58 |
+
#: toc.php:503
|
59 |
+
msgid "Bottom"
|
60 |
+
msgstr "底部"
|
61 |
+
|
62 |
+
#: toc.php:508
|
63 |
+
msgid "Show when"
|
64 |
+
msgstr "当……显示"
|
65 |
+
|
66 |
+
#: toc.php:518
|
67 |
+
msgid "or more headings are present"
|
68 |
+
msgstr "或者更多标题存在时"
|
69 |
+
|
70 |
+
#: toc.php:522
|
71 |
+
msgid "Auto insert for the following content types"
|
72 |
+
msgstr "自动插入以下类别的内容中"
|
73 |
+
|
74 |
+
#: toc.php:535
|
75 |
+
msgid "Heading text"
|
76 |
+
msgstr "标题"
|
77 |
+
|
78 |
+
#: toc.php:537
|
79 |
+
msgid "Show title on top of the table of contents"
|
80 |
+
msgstr "在目录顶部显示标题"
|
81 |
+
|
82 |
+
#: toc.php:540
|
83 |
+
msgid "Eg: Contents, Table of Contents, Page Contents"
|
84 |
+
msgstr "例:目录、Contents、Table of Contents、Page Contents"
|
85 |
+
|
86 |
+
#: toc.php:542
|
87 |
+
msgid "Allow the user to toggle the visibility of the table of contents"
|
88 |
+
msgstr "允许用户显示/隐藏目录"
|
89 |
+
|
90 |
+
#: toc.php:547
|
91 |
+
msgid "Show text"
|
92 |
+
msgstr "显示文本"
|
93 |
+
|
94 |
+
#: toc.php:549
|
95 |
+
msgid "Eg: show"
|
96 |
+
msgstr "例:显示"
|
97 |
+
|
98 |
+
#: toc.php:552
|
99 |
+
msgid "Hide text"
|
100 |
+
msgstr "隐藏文本"
|
101 |
+
|
102 |
+
#: toc.php:554
|
103 |
+
msgid "Eg: hide"
|
104 |
+
msgstr "例:隐藏"
|
105 |
+
|
106 |
+
#: toc.php:563
|
107 |
+
msgid "Show hierarchy"
|
108 |
+
msgstr "显示层次化"
|
109 |
+
|
110 |
+
#: toc.php:567
|
111 |
+
msgid "Number list items"
|
112 |
+
msgstr "显示编号"
|
113 |
+
|
114 |
+
#: toc.php:571
|
115 |
+
msgid "Enable smooth scroll effect"
|
116 |
+
msgstr "开启平滑滚动效果"
|
117 |
+
|
118 |
+
#: toc.php:572
|
119 |
+
msgid "Scroll rather than jump to the anchor link"
|
120 |
+
msgstr "平滑滚动到相应锚位置而不是跳转"
|
121 |
+
|
122 |
+
#: toc.php:577
|
123 |
+
msgid "Appearance"
|
124 |
+
msgstr "外观"
|
125 |
+
|
126 |
+
#: toc.php:581
|
127 |
+
msgid "Width"
|
128 |
+
msgstr "宽度"
|
129 |
+
|
130 |
+
#: toc.php:584
|
131 |
+
msgid "Fixed width"
|
132 |
+
msgstr "固定宽度"
|
133 |
+
|
134 |
+
#: toc.php:588
|
135 |
+
msgid "(default)"
|
136 |
+
msgstr "(默认)"
|
137 |
+
|
138 |
+
#: toc.php:595
|
139 |
+
msgid "Relative"
|
140 |
+
msgstr "相关宽度"
|
141 |
+
|
142 |
+
#: toc.php:596
|
143 |
+
msgid "Auto"
|
144 |
+
msgstr "自动调整"
|
145 |
+
|
146 |
+
#: toc.php:604
|
147 |
+
msgid "Other"
|
148 |
+
msgstr "其他"
|
149 |
+
|
150 |
+
#: toc.php:605
|
151 |
+
msgid "User defined"
|
152 |
+
msgstr "用户自定义"
|
153 |
+
|
154 |
+
#: toc.php:609
|
155 |
+
msgid "Please enter a number and"
|
156 |
+
msgstr "请输入数字并"
|
157 |
+
|
158 |
+
#: toc.php:609
|
159 |
+
msgid "select its units, eg: 100px, 10em"
|
160 |
+
msgstr "选择相应的单位,如:100px, 10em"
|
161 |
+
|
162 |
+
#: toc.php:620
|
163 |
+
msgid "Wrapping"
|
164 |
+
msgstr "自动换行"
|
165 |
+
|
166 |
+
#: toc.php:623
|
167 |
+
msgid "None (default)"
|
168 |
+
msgstr "无(默认)"
|
169 |
+
|
170 |
+
#: toc.php:624
|
171 |
+
msgid "Left"
|
172 |
+
msgstr "向左"
|
173 |
+
|
174 |
+
#: toc.php:625
|
175 |
+
msgid "Right"
|
176 |
+
msgstr "向右"
|
177 |
+
|
178 |
+
#: toc.php:630
|
179 |
+
msgid "Font size"
|
180 |
+
msgstr "字体大小"
|
181 |
+
|
182 |
+
#: toc.php:641
|
183 |
+
msgid "Presentation"
|
184 |
+
msgstr "风格"
|
185 |
+
|
186 |
+
#: toc.php:644
|
187 |
+
msgid "Grey (default)"
|
188 |
+
msgstr "灰色(默认)"
|
189 |
+
|
190 |
+
#: toc.php:649
|
191 |
+
msgid "Light blue"
|
192 |
+
msgstr "淡蓝色"
|
193 |
+
|
194 |
+
#: toc.php:654
|
195 |
+
msgid "White"
|
196 |
+
msgstr "白色"
|
197 |
+
|
198 |
+
#: toc.php:659
|
199 |
+
msgid "Black"
|
200 |
+
msgstr "黑色"
|
201 |
+
|
202 |
+
#: toc.php:664
|
203 |
+
msgid "Transparent"
|
204 |
+
msgstr "透明"
|
205 |
+
|
206 |
+
#: toc.php:669
|
207 |
+
msgid "Custom"
|
208 |
+
msgstr "自定义"
|
209 |
+
|
210 |
+
#: toc.php:679
|
211 |
+
msgid "Background"
|
212 |
+
msgstr "背景"
|
213 |
+
|
214 |
+
#: toc.php:683
|
215 |
+
msgid "Border"
|
216 |
+
msgstr "边框"
|
217 |
+
|
218 |
+
#: toc.php:687
|
219 |
+
#: toc.php:1498
|
220 |
+
msgid "Title"
|
221 |
+
msgstr "标题"
|
222 |
+
|
223 |
+
#: toc.php:691
|
224 |
+
msgid "Links"
|
225 |
+
msgstr "链接"
|
226 |
+
|
227 |
+
#: toc.php:695
|
228 |
+
msgid "Links (hover)"
|
229 |
+
msgstr "链接(鼠标经过)"
|
230 |
+
|
231 |
+
#: toc.php:710
|
232 |
+
msgid "Leaving the value as"
|
233 |
+
msgstr "数值设定为"
|
234 |
+
|
235 |
+
#: toc.php:710
|
236 |
+
msgid "will inherit your theme's styles"
|
237 |
+
msgstr "将使用主题的风格"
|
238 |
+
|
239 |
+
#: toc.php:715
|
240 |
+
msgid "Preserve theme bullets"
|
241 |
+
msgstr "主题兼容"
|
242 |
+
|
243 |
+
#: toc.php:716
|
244 |
+
msgid "If your theme includes background images for unordered list elements, enable this to support them"
|
245 |
+
msgstr "如果您的主题有修改无序列表的背景图片时,您可以开启此功能添加主题兼容。"
|
246 |
+
|
247 |
+
#: toc.php:721
|
248 |
+
msgid "Advanced"
|
249 |
+
msgstr "高级"
|
250 |
+
|
251 |
+
#: toc.php:721
|
252 |
+
#: toc.php:816
|
253 |
+
msgid "show"
|
254 |
+
msgstr "显示"
|
255 |
+
|
256 |
+
#: toc.php:723
|
257 |
+
msgid "Power options"
|
258 |
+
msgstr "驱动选项"
|
259 |
+
|
260 |
+
#: toc.php:727
|
261 |
+
msgid "Include homepage"
|
262 |
+
msgstr "包含首页"
|
263 |
+
|
264 |
+
#: toc.php:728
|
265 |
+
msgid "Show the table of contents for qualifying items on the homepage"
|
266 |
+
msgstr "对首页中排序的列表也添加目录内容支持"
|
267 |
+
|
268 |
+
#: toc.php:731
|
269 |
+
msgid "Exclude CSS file"
|
270 |
+
msgstr "不加载CSS"
|
271 |
+
|
272 |
+
#: toc.php:732
|
273 |
+
msgid "Prevent the loading of this plugin's CSS styles. When selected, the presentation options from above will also be ignored."
|
274 |
+
msgstr "不加载插件内置的CSS。勾选此项后,上面的选项也将失效。"
|
275 |
+
|
276 |
+
#: toc.php:735
|
277 |
+
msgid "Heading levels"
|
278 |
+
msgstr "标题等级"
|
279 |
+
|
280 |
+
#: toc.php:737
|
281 |
+
msgid "Include (or exclude) the following heading levels"
|
282 |
+
msgstr "包含(或者排除)以下标题级别"
|
283 |
+
|
284 |
+
#: toc.php:743
|
285 |
+
msgid "heading "
|
286 |
+
msgstr "标题 "
|
287 |
+
|
288 |
+
#: toc.php:749
|
289 |
+
msgid "Smooth scroll top offset"
|
290 |
+
msgstr "顶部偏移"
|
291 |
+
|
292 |
+
#: toc.php:752
|
293 |
+
msgid "If you have a consistent menu across the top of your site, you can adjust the top offset to stop the headings from appearing underneath the top menu. A setting of 30 accommodates the WordPress admin bar. This setting appears after you have enabled smooth scrolling from above."
|
294 |
+
msgstr "如果您的站点顶部有固定的菜单栏,您可以调整顶部偏移让标题显示在该菜单栏下面。推荐使用的数值30是为Wordpress管理菜单栏设计的。修改以上数值后此设置生效。"
|
295 |
+
|
296 |
+
#: toc.php:756
|
297 |
+
msgid "Default anchor prefix"
|
298 |
+
msgstr "默认锚前缀"
|
299 |
+
|
300 |
+
#: toc.php:759
|
301 |
+
msgid "Anchor targets are restricted to alphanumeric characters as per HTML specification (see readme for more detail). The default anchor prefix will be used when no characters qualify. When left blank, a number will be used instead."
|
302 |
+
msgstr "因为HTML规范化的要求,锚目标只能使用数字或者字幕。(详情可以查看说明文档)。如果您编辑内容时未定义锚前缀,toc+将使用这边的默认值。放空,则使用数字。"
|
303 |
+
|
304 |
+
#: toc.php:760
|
305 |
+
msgid "This option normally applies to content written in character sets other than ASCII."
|
306 |
+
msgstr "此选项只能输入字符集而不是ASCII。"
|
307 |
+
|
308 |
+
#: toc.php:761
|
309 |
+
msgid "Eg: i, toc_index, index, _"
|
310 |
+
msgstr "例:i, toc_index, index, _"
|
311 |
+
|
312 |
+
#: toc.php:767
|
313 |
+
msgid "Usage"
|
314 |
+
msgstr "使用"
|
315 |
+
|
316 |
+
#: toc.php:768
|
317 |
+
msgid "If you would like to fully customise the position of the table of contents, you can use the"
|
318 |
+
msgstr "如果您想要完全自定义目录的显示位置,您可以使用短代码"
|
319 |
+
|
320 |
+
#: toc.php:768
|
321 |
+
msgid "shortcode by placing it at the desired position of your post, page or custom post type. This method allows you to generate the table of contents despite having auto insertion disabled for its content type. Please visit the help tab for further information about this shortcode."
|
322 |
+
msgstr ",并把它放在您想要的位置中,可以是文章、页面或者是自定义的文章类型。此方法方便您在任何情况下生成目录,即使您关闭了该内容类型的自动插入。详细内容可以查看帮助标签中个关于短代码的说明。"
|
323 |
+
|
324 |
+
#: toc.php:776
|
325 |
+
msgid "At its simplest, placing"
|
326 |
+
msgstr "简单点说,输入"
|
327 |
+
|
328 |
+
#: toc.php:776
|
329 |
+
msgid "into a page will automatically create a sitemap of all pages and categories. This also works in a text widget."
|
330 |
+
msgstr "在页面中将显示所有页面、分类的站点地图。您也可以在文本小工具使用此工具。"
|
331 |
+
|
332 |
+
#: toc.php:780
|
333 |
+
msgid "Show page listing"
|
334 |
+
msgstr "显示页面列表"
|
335 |
+
|
336 |
+
#: toc.php:784
|
337 |
+
msgid "Show category listing"
|
338 |
+
msgstr "显示分类列表"
|
339 |
+
|
340 |
+
#: toc.php:788
|
341 |
+
msgid "Heading type"
|
342 |
+
msgstr "标题类型"
|
343 |
+
|
344 |
+
#: toc.php:789
|
345 |
+
msgid "Use"
|
346 |
+
msgstr "使用"
|
347 |
+
|
348 |
+
#: toc.php:798
|
349 |
+
msgid "to print out the titles"
|
350 |
+
msgstr "输出标题"
|
351 |
+
|
352 |
+
#: toc.php:802
|
353 |
+
msgid "Pages label"
|
354 |
+
msgstr "页面标签"
|
355 |
+
|
356 |
+
#: toc.php:804
|
357 |
+
msgid "Eg: Pages, Page List"
|
358 |
+
msgstr "例:页面、页面列表"
|
359 |
+
|
360 |
+
#: toc.php:808
|
361 |
+
msgid "Categories label"
|
362 |
+
msgstr "分类标签"
|
363 |
+
|
364 |
+
#: toc.php:810
|
365 |
+
msgid "Eg: Categories, Category List"
|
366 |
+
msgstr "例:分类、分类列表"
|
367 |
+
|
368 |
+
#: toc.php:816
|
369 |
+
msgid "Advanced usage"
|
370 |
+
msgstr "高级功能"
|
371 |
+
|
372 |
+
#: toc.php:818
|
373 |
+
msgid "lets you print out a listing of only pages. Similarly"
|
374 |
+
msgstr " 用来输出纯页面列表。同样地,"
|
375 |
+
|
376 |
+
#: toc.php:818
|
377 |
+
msgid "can be used to print out a category listing. They both can accept a number of attributes so visit the help tab for more information."
|
378 |
+
msgstr " 用来输出纯分类列表。两者都有其他的参数设定,具体查看帮助标签的内容。"
|
379 |
+
|
380 |
+
#: toc.php:819
|
381 |
+
msgid "Examples"
|
382 |
+
msgstr "例"
|
383 |
+
|
384 |
+
#: toc.php:821
|
385 |
+
msgid "hides the heading from a category listing"
|
386 |
+
msgstr " 将标题从分类列表中移除"
|
387 |
+
|
388 |
+
#: toc.php:822
|
389 |
+
msgid "Uses h6 to display"
|
390 |
+
msgstr " 在一个含页面ID为1和15的页面列表中,用 h6 显示 "
|
391 |
+
|
392 |
+
#: toc.php:822
|
393 |
+
msgid "on a page listing excluding pages with IDs 1 and 15."
|
394 |
+
msgstr "。"
|
395 |
+
|
396 |
+
#: toc.php:830
|
397 |
+
msgid "Where's my table of contents?"
|
398 |
+
msgstr "目录内容显示在哪里?"
|
399 |
+
|
400 |
+
#: toc.php:831
|
401 |
+
msgid "If you're reading this, then chances are you have successfully installed and enabled the plugin and you're just wondering why the index isn't appearing right? Try the following:"
|
402 |
+
msgstr "如果您正在阅读此内容的话,则表示您可以成功安装并开启了此插件。而您现在所困惑的便是为什么目录内容没有正常显示?您可以尝试:"
|
403 |
+
|
404 |
+
#: toc.php:833
|
405 |
+
msgid "In most cases, the post, page or custom post type has less than the minimum number of headings. By default, this is set to four so make sure you have at least four headings within your content. If you want to change this value, you can find it under 'Main Options' > 'Show when'."
|
406 |
+
msgstr "在大部分情况下,您的文章、页面或者自定义文章类别中所含有的标题数量少于要求的最小值。默认下,最小值为4,这表示说如果您想要显示目录,您的内容中至少得有4个标题。如果您需要修改此数值的话,可以再“主要选项” > “当……显示”中调整。"
|
407 |
+
|
408 |
+
#: toc.php:834
|
409 |
+
msgid "Is auto insertion enabled for your content type? By default, only pages are enabled."
|
410 |
+
msgstr "您的内容类别中支持自动插入?默认情况下,仅支持页面类型。"
|
411 |
+
|
412 |
+
#: toc.php:835
|
413 |
+
msgid "Have you got"
|
414 |
+
msgstr "内容中是否使用了 "
|
415 |
+
|
416 |
+
#: toc.php:835
|
417 |
+
msgid "somewhere within the content? This will disable the index for the current post, page or custom post type."
|
418 |
+
msgstr " 短代码?这将阻止当前文章、页面或者自定义页面显示目录。"
|
419 |
+
|
420 |
+
#: toc.php:836
|
421 |
+
msgid "If you are using the TOC+ widget, check if you have the"
|
422 |
+
msgstr "如果您正在使用 TOC+ 小工具,检查以下是否开启了 "
|
423 |
+
|
424 |
+
#: toc.php:836
|
425 |
+
#: toc.php:1504
|
426 |
+
msgid "Show the table of contents only in the sidebar"
|
427 |
+
msgstr "仅在侧边栏中显示目录"
|
428 |
+
|
429 |
+
#: toc.php:836
|
430 |
+
msgid "enabled as this will limit its display to only the sidebar. You can check by going into Appearance > Widgets."
|
431 |
+
msgstr "。如果不了解的么可以到外观 > 小工具中查看。"
|
432 |
+
|
433 |
+
#: toc.php:839
|
434 |
+
msgid "How do I stop the table of contents from appearing on a single page?"
|
435 |
+
msgstr "如果避免在单独页面中显示目录?"
|
436 |
+
|
437 |
+
#: toc.php:840
|
438 |
+
msgid "Place the following"
|
439 |
+
msgstr "在内容任意位置中输入短代码 "
|
440 |
+
|
441 |
+
#: toc.php:840
|
442 |
+
msgid "anywhere on the page to suppress the table of contents. This is known as a shortcode and works for posts, pages and custom post types that make use of the_content()"
|
443 |
+
msgstr "可以避免目录内容的显示。此短代码对任何帖子、页面以及其他使用the_content()的自定义文章类型都有效。"
|
444 |
+
|
445 |
+
#: toc.php:842
|
446 |
+
msgid "I've set wrapping to left or right but the headings don't wrap around the table of contents"
|
447 |
+
msgstr "我已经设置自动换行为左或者右,但是标题并没有环绕在目录附近"
|
448 |
+
|
449 |
+
#: toc.php:843
|
450 |
+
msgid "This normally occurs when there is a CSS clear directive in or around the heading specified by the theme author. This directive tells the user agent to reset the previous wrapping specifications."
|
451 |
+
msgstr "一般是因为您使用的主题中CSS移除了标题的指令。该指令让用户代理重置了前一个自动换行规则。"
|
452 |
+
|
453 |
+
#: toc.php:844
|
454 |
+
msgid "You can adjust your theme's CSS or try moving the table of contents position to the top of the page. If you didn't build your theme, I'd highly suggest you try the"
|
455 |
+
msgstr "您可以调整您的主题CSS或者尝试移动目录内容的位置到页面顶部。如果您对主题并不了解,强烈建议尝试用 "
|
456 |
+
|
457 |
+
#: toc.php:844
|
458 |
+
msgid "if you wish to make CSS changes."
|
459 |
+
msgstr " 修改CSS。"
|
460 |
+
|
461 |
+
#: toc.php:846
|
462 |
+
msgid "Why are some headings not included in the table of contents?"
|
463 |
+
msgstr "为什么部分标题没有显示在目录中?"
|
464 |
+
|
465 |
+
#: toc.php:847
|
466 |
+
msgid "First, make sure the title text that isn't appearing in the table of contents is actually marked up as a heading (eg heading 1 through to 6). After verifying that it really is a heading, make sure that there are no linebreaks or enters from the start to the end of the heading HTML tags. Eg, it should not be like the following:"
|
467 |
+
msgstr "首先,请确认标题中未显示的标题文本确实标记为标题(例:标题1到标题6)。如果已确认是标题的话,请检查一下h标签内的文本是否有跳行。例:不要出现以下形式:"
|
468 |
+
|
469 |
+
#: toc.php:853
|
470 |
+
msgid "Rather, it should be something like:"
|
471 |
+
msgstr "正确地,应该是:"
|
472 |
+
|
473 |
+
#: toc.php:858
|
474 |
+
msgid "The sitemap uses a strange font disimilar to the rest of the site"
|
475 |
+
msgstr "站点地图与站点使用的字体不一样"
|
476 |
+
|
477 |
+
#: toc.php:859
|
478 |
+
msgid "No extra styles are created for the sitemap, instead it inherits any styles you used when adding the shortcode. If you copy and pasted, you probably also copied the 'code' tags surrounding it so remove them if this is the case."
|
479 |
+
msgstr "这边并没有定义站点地图的风格,相反的,它支持继承前一个内容的风格。如果您纯粹的复制粘贴,您可以不小心把风格也给复制进去了。"
|
480 |
+
|
481 |
+
#: toc.php:860
|
482 |
+
msgid "In most cases, try to have the shortcode on its own line with nothing before or after the square brackets."
|
483 |
+
msgstr "大部分情况下,建议重启一行添加短代码,避免受到其他风格的影响。"
|
484 |
+
|
485 |
+
#: toc.php:862
|
486 |
+
msgid "What were those shortcodes and attributes again?"
|
487 |
+
msgstr "什么是短代码?什么又是短代码参数?"
|
488 |
+
|
489 |
+
#: toc.php:863
|
490 |
+
msgid "When attributes are left out for the shortcodes below, they will fallback to the settings you defined under Settings > TOC+."
|
491 |
+
msgstr "如果短代码输入时未输入参数,插件将使用 设置 > TOC+ 的设置。"
|
492 |
+
|
493 |
+
#: toc.php:867
|
494 |
+
msgid "Shortcode"
|
495 |
+
msgstr "短代码"
|
496 |
+
|
497 |
+
#: toc.php:868
|
498 |
+
msgid "Description"
|
499 |
+
msgstr "介绍"
|
500 |
+
|
501 |
+
#: toc.php:869
|
502 |
+
msgid "Attributes"
|
503 |
+
msgstr "参数"
|
504 |
+
|
505 |
+
#: toc.php:875
|
506 |
+
msgid "Lets you generate the table of contents at the preferred position. Also useful for sites that only require a TOC on a small handful of pages."
|
507 |
+
msgstr "在您想要的位置生成目录内容。同时方便那些只有一点儿内容但是需要生成目录的站点。"
|
508 |
+
|
509 |
+
#: toc.php:878
|
510 |
+
msgid "text, title of the table of contents"
|
511 |
+
msgstr ":数值为文本,表示目录的标题"
|
512 |
+
|
513 |
+
#: toc.php:879
|
514 |
+
msgid "true/false, shows or hides the title"
|
515 |
+
msgstr ":数值为true/false,表示显示或者隐藏标题"
|
516 |
+
|
517 |
+
#: toc.php:880
|
518 |
+
msgid "text, either \"left\" or \"right\""
|
519 |
+
msgstr ":数值为文本,可为 \"left\" 或者 \"right\" (分别表示“向左”或者“向右”)"
|
520 |
+
|
521 |
+
#: toc.php:881
|
522 |
+
msgid "numbers, this lets you select the heading levels you want included in the table of contents. Separate multiple levels with a comma. Example: include headings 3, 4 and 5 but exclude the others with"
|
523 |
+
msgstr ":数值为数字,用来选择要再目录中显示的标题级别,可以“,”隔开不同的级别。例:下面代码表示仅显示第三/四/五级标题..."
|
524 |
+
|
525 |
+
#: toc.php:887
|
526 |
+
msgid "Allows you to disable the table of contents for the current post, page, or custom post type."
|
527 |
+
msgstr "用来禁止当前内容中目录的显示。"
|
528 |
+
|
529 |
+
#: toc.php:892
|
530 |
+
msgid "Produces a listing of all pages and categories for your site. You can use this on any post, page or even in a text widget."
|
531 |
+
msgstr "生成站点地图。您可以在文章、页面甚至文本小工具中使用此代码。"
|
532 |
+
|
533 |
+
#: toc.php:897
|
534 |
+
msgid "Lets you print out a listing of only pages."
|
535 |
+
msgstr "仅输出页面的列表。"
|
536 |
+
|
537 |
+
#: toc.php:900
|
538 |
+
msgid "number between 1 and 6, defines which html heading to use"
|
539 |
+
msgstr ":数值为 1 到 6 之间的数字,用来定义html使用的标题"
|
540 |
+
|
541 |
+
#: toc.php:901
|
542 |
+
msgid "text, title of the list"
|
543 |
+
msgstr ":数值为文本,用来定义列表的标题"
|
544 |
+
|
545 |
+
#: toc.php:902
|
546 |
+
msgid "true/false, shows or hides the list heading"
|
547 |
+
msgstr ":数值为true/false,显示/隐藏列表标题"
|
548 |
+
|
549 |
+
#: toc.php:903
|
550 |
+
msgid "IDs of the pages or categories you wish to exclude"
|
551 |
+
msgstr ":数值为数字,表示您移除的页面或者分类的ID"
|
552 |
+
|
553 |
+
#: toc.php:909
|
554 |
+
msgid "Similar to"
|
555 |
+
msgstr "类 "
|
556 |
+
|
557 |
+
#: toc.php:909
|
558 |
+
msgid "but for categories."
|
559 |
+
msgstr " 但仅输出分类。"
|
560 |
+
|
561 |
+
#: toc.php:915
|
562 |
+
msgid "I have another question..."
|
563 |
+
msgstr "还有其他不明白的地方..."
|
564 |
+
|
565 |
+
#: toc.php:916
|
566 |
+
msgid "Visit the"
|
567 |
+
msgstr "可以访问 "
|
568 |
+
|
569 |
+
#: toc.php:916
|
570 |
+
msgid "plugin homepage"
|
571 |
+
msgstr "插件主页"
|
572 |
+
|
573 |
+
#: toc.php:916
|
574 |
+
msgid "to ask your question - who knows, maybe your question has already been answered. I'd really like to hear your suggestions if you have any."
|
575 |
+
msgstr " 求助 - 谁知道呢,也许您的问题已经解答过了。如果您有建议的话,我会更乐意。"
|
576 |
+
|
577 |
+
#: toc.php:922
|
578 |
+
msgid "Update Options"
|
579 |
+
msgstr "更新设置"
|
580 |
+
|
581 |
+
#: toc.php:1413
|
582 |
+
msgid "Display the table of contents in the sidebar with this widget"
|
583 |
+
msgstr "在小工具中显示目录"
|
584 |
+
|
languages/toc+.pot
ADDED
@@ -0,0 +1,649 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2012
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: \n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/table-of-contents-plus\n"
|
7 |
+
"POT-Creation-Date: 2012-08-01 13:02:20+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
|
12 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
|
15 |
+
#: toc.php:169
|
16 |
+
msgid "Settings"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: toc.php:339 toc.php:340
|
20 |
+
msgid "TOC"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: toc.php:474
|
24 |
+
msgid "Options saved."
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: toc.php:476
|
28 |
+
msgid "Save failed."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: toc.php:488
|
32 |
+
msgid "Main Options"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: toc.php:489
|
36 |
+
msgid "Sitemap"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: toc.php:490
|
40 |
+
msgid "Help"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: toc.php:498
|
44 |
+
msgid "Position"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: toc.php:501
|
48 |
+
msgid "Before first heading (default)"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: toc.php:502
|
52 |
+
msgid "Top"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: toc.php:503
|
56 |
+
msgid "Bottom"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: toc.php:508
|
60 |
+
msgid "Show when"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: toc.php:518
|
64 |
+
msgid "or more headings are present"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: toc.php:522
|
68 |
+
msgid "Auto insert for the following content types"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: toc.php:535
|
72 |
+
msgid "Heading text"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: toc.php:537
|
76 |
+
msgid "Show title on top of the table of contents"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: toc.php:540
|
80 |
+
msgid "Eg: Contents, Table of Contents, Page Contents"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: toc.php:542
|
84 |
+
msgid "Allow the user to toggle the visibility of the table of contents"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: toc.php:547
|
88 |
+
msgid "Show text"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: toc.php:549
|
92 |
+
msgid "Eg: show"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: toc.php:552
|
96 |
+
msgid "Hide text"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: toc.php:554
|
100 |
+
msgid "Eg: hide"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: toc.php:563
|
104 |
+
msgid "Show hierarchy"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: toc.php:567
|
108 |
+
msgid "Number list items"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: toc.php:571
|
112 |
+
msgid "Enable smooth scroll effect"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: toc.php:572
|
116 |
+
msgid "Scroll rather than jump to the anchor link"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: toc.php:577
|
120 |
+
msgid "Appearance"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: toc.php:581
|
124 |
+
msgid "Width"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: toc.php:584
|
128 |
+
msgid "Fixed width"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: toc.php:588
|
132 |
+
msgid "(default)"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: toc.php:595
|
136 |
+
msgid "Relative"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: toc.php:596
|
140 |
+
msgid "Auto"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: toc.php:604
|
144 |
+
msgid "Other"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: toc.php:605
|
148 |
+
msgid "User defined"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: toc.php:609
|
152 |
+
msgid "Please enter a number and"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: toc.php:609
|
156 |
+
msgid "select its units, eg: 100px, 10em"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: toc.php:620
|
160 |
+
msgid "Wrapping"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: toc.php:623
|
164 |
+
msgid "None (default)"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: toc.php:624
|
168 |
+
msgid "Left"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: toc.php:625
|
172 |
+
msgid "Right"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: toc.php:630
|
176 |
+
msgid "Font size"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: toc.php:641
|
180 |
+
msgid "Presentation"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: toc.php:644
|
184 |
+
msgid "Grey (default)"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: toc.php:649
|
188 |
+
msgid "Light blue"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: toc.php:654
|
192 |
+
msgid "White"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: toc.php:659
|
196 |
+
msgid "Black"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: toc.php:664
|
200 |
+
msgid "Transparent"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: toc.php:669
|
204 |
+
msgid "Custom"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: toc.php:679
|
208 |
+
msgid "Background"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: toc.php:683
|
212 |
+
msgid "Border"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: toc.php:687 toc.php:1498
|
216 |
+
msgid "Title"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: toc.php:691
|
220 |
+
msgid "Links"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: toc.php:695
|
224 |
+
msgid "Links (hover)"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: toc.php:710
|
228 |
+
msgid "Leaving the value as"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: toc.php:710
|
232 |
+
msgid "will inherit your theme's styles"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: toc.php:715
|
236 |
+
msgid "Preserve theme bullets"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: toc.php:716
|
240 |
+
msgid ""
|
241 |
+
"If your theme includes background images for unordered list elements, enable "
|
242 |
+
"this to support them"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: toc.php:721
|
246 |
+
msgid "Advanced"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: toc.php:721 toc.php:816
|
250 |
+
msgid "show"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: toc.php:723
|
254 |
+
msgid "Power options"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: toc.php:727
|
258 |
+
msgid "Include homepage"
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: toc.php:728
|
262 |
+
msgid "Show the table of contents for qualifying items on the homepage"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: toc.php:731
|
266 |
+
msgid "Exclude CSS file"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: toc.php:732
|
270 |
+
msgid ""
|
271 |
+
"Prevent the loading of this plugin's CSS styles. When selected, the "
|
272 |
+
"presentation options from above will also be ignored."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: toc.php:735
|
276 |
+
msgid "Heading levels"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: toc.php:737
|
280 |
+
msgid "Include (or exclude) the following heading levels"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: toc.php:743
|
284 |
+
msgid "heading "
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: toc.php:749
|
288 |
+
msgid "Smooth scroll top offset"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: toc.php:752
|
292 |
+
msgid ""
|
293 |
+
"If you have a consistent menu across the top of your site, you can adjust "
|
294 |
+
"the top offset to stop the headings from appearing underneath the top menu. "
|
295 |
+
"A setting of 30 accommodates the WordPress admin bar. This setting appears "
|
296 |
+
"after you have enabled smooth scrolling from above."
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: toc.php:756
|
300 |
+
msgid "Default anchor prefix"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: toc.php:759
|
304 |
+
msgid ""
|
305 |
+
"Anchor targets are restricted to alphanumeric characters as per HTML "
|
306 |
+
"specification (see readme for more detail). The default anchor prefix will "
|
307 |
+
"be used when no characters qualify. When left blank, a number will be used "
|
308 |
+
"instead."
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: toc.php:760
|
312 |
+
msgid ""
|
313 |
+
"This option normally applies to content written in character sets other than "
|
314 |
+
"ASCII."
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: toc.php:761
|
318 |
+
msgid "Eg: i, toc_index, index, _"
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: toc.php:767
|
322 |
+
msgid "Usage"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: toc.php:768
|
326 |
+
msgid ""
|
327 |
+
"If you would like to fully customise the position of the table of contents, "
|
328 |
+
"you can use the"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: toc.php:768
|
332 |
+
msgid ""
|
333 |
+
"shortcode by placing it at the desired position of your post, page or custom "
|
334 |
+
"post type. This method allows you to generate the table of contents despite "
|
335 |
+
"having auto insertion disabled for its content type. Please visit the help "
|
336 |
+
"tab for further information about this shortcode."
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: toc.php:776
|
340 |
+
msgid "At its simplest, placing"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: toc.php:776
|
344 |
+
msgid ""
|
345 |
+
"into a page will automatically create a sitemap of all pages and categories. "
|
346 |
+
"This also works in a text widget."
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: toc.php:780
|
350 |
+
msgid "Show page listing"
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: toc.php:784
|
354 |
+
msgid "Show category listing"
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: toc.php:788
|
358 |
+
msgid "Heading type"
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: toc.php:789
|
362 |
+
msgid "Use"
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: toc.php:798
|
366 |
+
msgid "to print out the titles"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
#: toc.php:802
|
370 |
+
msgid "Pages label"
|
371 |
+
msgstr ""
|
372 |
+
|
373 |
+
#: toc.php:804
|
374 |
+
msgid "Eg: Pages, Page List"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: toc.php:808
|
378 |
+
msgid "Categories label"
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
#: toc.php:810
|
382 |
+
msgid "Eg: Categories, Category List"
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: toc.php:816
|
386 |
+
msgid "Advanced usage"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: toc.php:818
|
390 |
+
msgid "lets you print out a listing of only pages. Similarly"
|
391 |
+
msgstr ""
|
392 |
+
|
393 |
+
#: toc.php:818
|
394 |
+
msgid ""
|
395 |
+
"can be used to print out a category listing. They both can accept a number "
|
396 |
+
"of attributes so visit the help tab for more information."
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: toc.php:819
|
400 |
+
msgid "Examples"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: toc.php:821
|
404 |
+
msgid "hides the heading from a category listing"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: toc.php:822
|
408 |
+
msgid "Uses h6 to display"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: toc.php:822
|
412 |
+
msgid "on a page listing excluding pages with IDs 1 and 15."
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: toc.php:830
|
416 |
+
msgid "Where's my table of contents?"
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: toc.php:831
|
420 |
+
msgid ""
|
421 |
+
"If you're reading this, then chances are you have successfully installed and "
|
422 |
+
"enabled the plugin and you're just wondering why the index isn't appearing "
|
423 |
+
"right? Try the following:"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: toc.php:833
|
427 |
+
msgid ""
|
428 |
+
"In most cases, the post, page or custom post type has less than the minimum "
|
429 |
+
"number of headings. By default, this is set to four so make sure you have at "
|
430 |
+
"least four headings within your content. If you want to change this value, "
|
431 |
+
"you can find it under 'Main Options' > 'Show when'."
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: toc.php:834
|
435 |
+
msgid ""
|
436 |
+
"Is auto insertion enabled for your content type? By default, only pages are "
|
437 |
+
"enabled."
|
438 |
+
msgstr ""
|
439 |
+
|
440 |
+
#: toc.php:835
|
441 |
+
msgid "Have you got"
|
442 |
+
msgstr ""
|
443 |
+
|
444 |
+
#: toc.php:835
|
445 |
+
msgid ""
|
446 |
+
"somewhere within the content? This will disable the index for the current "
|
447 |
+
"post, page or custom post type."
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: toc.php:836
|
451 |
+
msgid "If you are using the TOC+ widget, check if you have the"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: toc.php:836 toc.php:1504
|
455 |
+
msgid "Show the table of contents only in the sidebar"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: toc.php:836
|
459 |
+
msgid ""
|
460 |
+
"enabled as this will limit its display to only the sidebar. You can check by "
|
461 |
+
"going into Appearance > Widgets."
|
462 |
+
msgstr ""
|
463 |
+
|
464 |
+
#: toc.php:839
|
465 |
+
msgid "How do I stop the table of contents from appearing on a single page?"
|
466 |
+
msgstr ""
|
467 |
+
|
468 |
+
#: toc.php:840
|
469 |
+
msgid "Place the following"
|
470 |
+
msgstr ""
|
471 |
+
|
472 |
+
#: toc.php:840
|
473 |
+
msgid ""
|
474 |
+
"anywhere on the page to suppress the table of contents. This is known as a "
|
475 |
+
"shortcode and works for posts, pages and custom post types that make use of "
|
476 |
+
"the_content()"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: toc.php:842
|
480 |
+
msgid ""
|
481 |
+
"I've set wrapping to left or right but the headings don't wrap around the "
|
482 |
+
"table of contents"
|
483 |
+
msgstr ""
|
484 |
+
|
485 |
+
#: toc.php:843
|
486 |
+
msgid ""
|
487 |
+
"This normally occurs when there is a CSS clear directive in or around the "
|
488 |
+
"heading specified by the theme author. This directive tells the user agent "
|
489 |
+
"to reset the previous wrapping specifications."
|
490 |
+
msgstr ""
|
491 |
+
|
492 |
+
#: toc.php:844
|
493 |
+
msgid ""
|
494 |
+
"You can adjust your theme's CSS or try moving the table of contents position "
|
495 |
+
"to the top of the page. If you didn't build your theme, I'd highly suggest "
|
496 |
+
"you try the"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: toc.php:844
|
500 |
+
msgid "if you wish to make CSS changes."
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: toc.php:846
|
504 |
+
msgid "Why are some headings not included in the table of contents?"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: toc.php:847
|
508 |
+
msgid ""
|
509 |
+
"First, make sure the title text that isn't appearing in the table of "
|
510 |
+
"contents is actually marked up as a heading (eg heading 1 through to 6). "
|
511 |
+
"After verifying that it really is a heading, make sure that there are no "
|
512 |
+
"linebreaks or enters from the start to the end of the heading HTML tags. "
|
513 |
+
"Eg, it should not be like the following:"
|
514 |
+
msgstr ""
|
515 |
+
|
516 |
+
#: toc.php:853
|
517 |
+
msgid "Rather, it should be something like:"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: toc.php:858
|
521 |
+
msgid "The sitemap uses a strange font disimilar to the rest of the site"
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: toc.php:859
|
525 |
+
msgid ""
|
526 |
+
"No extra styles are created for the sitemap, instead it inherits any styles "
|
527 |
+
"you used when adding the shortcode. If you copy and pasted, you probably "
|
528 |
+
"also copied the 'code' tags surrounding it so remove them if this is the "
|
529 |
+
"case."
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: toc.php:860
|
533 |
+
msgid ""
|
534 |
+
"In most cases, try to have the shortcode on its own line with nothing before "
|
535 |
+
"or after the square brackets."
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: toc.php:862
|
539 |
+
msgid "What were those shortcodes and attributes again?"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: toc.php:863
|
543 |
+
msgid ""
|
544 |
+
"When attributes are left out for the shortcodes below, they will fallback to "
|
545 |
+
"the settings you defined under Settings > TOC+."
|
546 |
+
msgstr ""
|
547 |
+
|
548 |
+
#: toc.php:867
|
549 |
+
msgid "Shortcode"
|
550 |
+
msgstr ""
|
551 |
+
|
552 |
+
#: toc.php:868
|
553 |
+
msgid "Description"
|
554 |
+
msgstr ""
|
555 |
+
|
556 |
+
#: toc.php:869
|
557 |
+
msgid "Attributes"
|
558 |
+
msgstr ""
|
559 |
+
|
560 |
+
#: toc.php:875
|
561 |
+
msgid ""
|
562 |
+
"Lets you generate the table of contents at the preferred position. Also "
|
563 |
+
"useful for sites that only require a TOC on a small handful of pages."
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: toc.php:878
|
567 |
+
msgid "text, title of the table of contents"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: toc.php:879
|
571 |
+
msgid "true/false, shows or hides the title"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: toc.php:880
|
575 |
+
msgid "text, either \"left\" or \"right\""
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: toc.php:881
|
579 |
+
msgid ""
|
580 |
+
"numbers, this lets you select the heading levels you want included in the "
|
581 |
+
"table of contents. Separate multiple levels with a comma. Example: include "
|
582 |
+
"headings 3, 4 and 5 but exclude the others with"
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
+
#: toc.php:887
|
586 |
+
msgid ""
|
587 |
+
"Allows you to disable the table of contents for the current post, page, or "
|
588 |
+
"custom post type."
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: toc.php:892
|
592 |
+
msgid ""
|
593 |
+
"Produces a listing of all pages and categories for your site. You can use "
|
594 |
+
"this on any post, page or even in a text widget."
|
595 |
+
msgstr ""
|
596 |
+
|
597 |
+
#: toc.php:897
|
598 |
+
msgid "Lets you print out a listing of only pages."
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: toc.php:900
|
602 |
+
msgid "number between 1 and 6, defines which html heading to use"
|
603 |
+
msgstr ""
|
604 |
+
|
605 |
+
#: toc.php:901
|
606 |
+
msgid "text, title of the list"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: toc.php:902
|
610 |
+
msgid "true/false, shows or hides the list heading"
|
611 |
+
msgstr ""
|
612 |
+
|
613 |
+
#: toc.php:903
|
614 |
+
msgid "IDs of the pages or categories you wish to exclude"
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#: toc.php:909
|
618 |
+
msgid "Similar to"
|
619 |
+
msgstr ""
|
620 |
+
|
621 |
+
#: toc.php:909
|
622 |
+
msgid "but for categories."
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: toc.php:915
|
626 |
+
msgid "I have another question..."
|
627 |
+
msgstr ""
|
628 |
+
|
629 |
+
#: toc.php:916
|
630 |
+
msgid "Visit the"
|
631 |
+
msgstr ""
|
632 |
+
|
633 |
+
#: toc.php:916
|
634 |
+
msgid "plugin homepage"
|
635 |
+
msgstr ""
|
636 |
+
|
637 |
+
#: toc.php:916
|
638 |
+
msgid ""
|
639 |
+
"to ask your question - who knows, maybe your question has already been "
|
640 |
+
"answered. I'd really like to hear your suggestions if you have any."
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: toc.php:922
|
644 |
+
msgid "Update Options"
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
+
#: toc.php:1413
|
648 |
+
msgid "Display the table of contents in the sidebar with this widget"
|
649 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: table of contents, indexes, toc, sitemap, cms, options, list, page listing, category listing
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.5
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -23,6 +23,12 @@ Includes an administration options panel where you can customise settings like d
|
|
23 |
|
24 |
Custom post types are supported, however, auto insertion works only when the_content() has been used by the custom post type. Each post type will appear in the options panel, so enable the ones you want.
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
If you have questions or suggestions, please place them at [http://dublue.com/plugins/toc/](http://dublue.com/plugins/toc/)
|
27 |
|
28 |
|
@@ -77,6 +83,15 @@ Same as `[sitemap_pages]` but for categories.
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
= 1207 =
|
81 |
* Released: 23 July 2012
|
82 |
* New: when smooth scrolling is enabled, allow the top offset to be specified to support more than the WordPress admin bar (such as Twitter Bootstrap). The offset is displayed in the advanced section after you have enabled smooth scrolling. Thanks to [Nicolaus](http://dublue.com/2012/05/12/another-benefit-to-structure-your-web-pages/#comment-2611) for the suggestion.
|
4 |
Tags: table of contents, indexes, toc, sitemap, cms, options, list, page listing, category listing
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.5
|
7 |
+
Stable tag: 1208
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
23 |
|
24 |
Custom post types are supported, however, auto insertion works only when the_content() has been used by the custom post type. Each post type will appear in the options panel, so enable the ones you want.
|
25 |
|
26 |
+
= Available Languages =
|
27 |
+
* Australian English (default)
|
28 |
+
* Simplified Chinese - [icedream](http://www.tesfans.org/)
|
29 |
+
|
30 |
+
Translations are more than welcome.
|
31 |
+
|
32 |
If you have questions or suggestions, please place them at [http://dublue.com/plugins/toc/](http://dublue.com/plugins/toc/)
|
33 |
|
34 |
|
83 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
= 1208 =
|
87 |
+
* Released: 2 August 2012
|
88 |
+
* New: advanced option to prevent the output of this plugin's CSS. This option allows the site owner to incorporate styles in one of their existing style sheets. Thanks to [Ivan](http://dublue.com/plugins/toc/comment-page-1/#comment-226) and [Swashata](http://dublue.com/plugins/toc/comment-page-3/#comment-3312) for suggesting it.
|
89 |
+
* Added Simplified Chinese translation thanks to [icedream](http://www.tesfans.org/)
|
90 |
+
* Make more translatable by adding a translation POT file in the languages folder. Translations welcome!
|
91 |
+
* Adjust multibyte string detection as reported by [johnnyvaughan](http://wordpress.org/support/topic/plugin-table-of-contents-plus-multibyte-string-detetction)
|
92 |
+
* Support PHP 5.4.x installations. Thanks to [Josh](http://dublue.com/plugins/toc/comment-page-3/#comment-3477) for raising it.
|
93 |
+
* Fixed: -2 appearing in links when using the TOC+ widget. Thanks to [Arturo](http://dublue.com/plugins/toc/comment-page-3/#comment-3337) for raising it.
|
94 |
+
|
95 |
= 1207 =
|
96 |
* Released: 23 July 2012
|
97 |
* New: when smooth scrolling is enabled, allow the top offset to be specified to support more than the WordPress admin bar (such as Twitter Bootstrap). The offset is displayed in the advanced section after you have enabled smooth scrolling. Thanks to [Nicolaus](http://dublue.com/2012/05/12/another-benefit-to-structure-your-web-pages/#comment-2611) for the suggestion.
|
toc.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://dublue.com/plugins/toc/
|
|
5 |
Description: A powerful yet user friendly plugin that automatically creates a table of contents. Can also output a sitemap listing all pages and categories.
|
6 |
Author: Michael Tran
|
7 |
Author URI: http://dublue.com/
|
8 |
-
Version:
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
@@ -109,6 +109,7 @@ if ( !class_exists( 'toc' ) ) :
|
|
109 |
'custom_links_visited_colour' => TOC_DEFAULT_LINKS_VISITED_COLOUR,
|
110 |
'bullet_spacing' => false,
|
111 |
'include_homepage' => false,
|
|
|
112 |
'heading_levels' => array('1', '2', '3', '4', '5', '6'),
|
113 |
'sitemap_show_page_listing' => true,
|
114 |
'sitemap_show_category_listing' => true,
|
@@ -316,6 +317,7 @@ if ( !class_exists( 'toc' ) ) :
|
|
316 |
|
317 |
function init()
|
318 |
{
|
|
|
319 |
wp_register_style( 'toc-screen', $this->path . '/screen.css' );
|
320 |
wp_register_script( 'smooth-scroll', $this->path . '/jquery.smooth-scroll.min.js', array('jquery') );
|
321 |
wp_register_script( 'cookie', $this->path . '/jquery.c.min.js', array('jquery') );
|
@@ -447,6 +449,7 @@ if ( !class_exists( 'toc' ) ) :
|
|
447 |
'custom_links_hover_colour' => $custom_links_hover_colour,
|
448 |
'bullet_spacing' => (isset($_POST['bullet_spacing']) && $_POST['bullet_spacing']) ? true : false,
|
449 |
'include_homepage' => (isset($_POST['include_homepage']) && $_POST['include_homepage']) ? true : false,
|
|
|
450 |
'heading_levels' => @(array)$_POST['heading_levels'],
|
451 |
'sitemap_show_page_listing' => (isset($_POST['sitemap_show_page_listing']) && $_POST['sitemap_show_page_listing']) ? true : false,
|
452 |
'sitemap_show_category_listing' => (isset($_POST['sitemap_show_category_listing']) && $_POST['sitemap_show_category_listing']) ? true : false,
|
@@ -476,7 +479,7 @@ if ( !class_exists( 'toc' ) ) :
|
|
476 |
?>
|
477 |
<div id='toc' class='wrap'>
|
478 |
<div id="icon-options-general" class="icon32"><br /></div>
|
479 |
-
<h2
|
480 |
<?php echo $msg; ?>
|
481 |
<form method="post" action="<?php echo htmlentities('?page=' . $_GET['page'] . '&update'); ?>">
|
482 |
<?php wp_nonce_field( plugin_basename(__FILE__), 'toc-admin-options' ); ?>
|
@@ -495,9 +498,9 @@ if ( !class_exists( 'toc' ) ) :
|
|
495 |
<th><label for="position"><?php _e('Position', 'toc+'); ?></label></th>
|
496 |
<td>
|
497 |
<select name="position" id="position">
|
498 |
-
<option value="<?php echo TOC_POSITION_BEFORE_FIRST_HEADING; ?>"<?php if ( TOC_POSITION_BEFORE_FIRST_HEADING == $this->options['position'] ) echo ' selected="selected"';
|
499 |
-
<option value="<?php echo TOC_POSITION_TOP; ?>"<?php if ( TOC_POSITION_TOP == $this->options['position'] ) echo ' selected="selected"';
|
500 |
-
<option value="<?php echo TOC_POSITION_BOTTOM; ?>"<?php if ( TOC_POSITION_BOTTOM == $this->options['position'] ) echo ' selected="selected"';
|
501 |
</select>
|
502 |
</td>
|
503 |
</tr>
|
@@ -579,24 +582,24 @@ if ( !class_exists( 'toc' ) ) :
|
|
579 |
<td>
|
580 |
<select name="width" id="width">
|
581 |
<optgroup label="<?php _e('Fixed width', 'toc+'); ?>">
|
582 |
-
<option value="200px"<?php if ( '200px' == $this->options['width'] ) echo ' selected="selected"';
|
583 |
-
<option value="225px"<?php if ( '225px' == $this->options['width'] ) echo ' selected="selected"';
|
584 |
-
<option value="250px"<?php if ( '250px' == $this->options['width'] ) echo ' selected="selected"';
|
585 |
-
<option value="275px"<?php if ( '275px' == $this->options['width'] ) echo ' selected="selected"';
|
586 |
-
<option value="300px"<?php if ( '300px' == $this->options['width'] ) echo ' selected="selected"';
|
587 |
-
<option value="325px"<?php if ( '325px' == $this->options['width'] ) echo ' selected="selected"';
|
588 |
-
<option value="350px"<?php if ( '350px' == $this->options['width'] ) echo ' selected="selected"';
|
589 |
-
<option value="375px"<?php if ( '375px' == $this->options['width'] ) echo ' selected="selected"';
|
590 |
-
<option value="400px"<?php if ( '400px' == $this->options['width'] ) echo ' selected="selected"';
|
591 |
</optgroup>
|
592 |
<optgroup label="<?php _e('Relative', 'toc+'); ?>">
|
593 |
-
<option value="Auto"<?php if ( 'Auto' == $this->options['width'] ) echo ' selected="selected"'; ?>><?php _e('Auto'); ?></option>
|
594 |
-
<option value="25%"<?php if ( '25%' == $this->options['width'] ) echo ' selected="selected"';
|
595 |
-
<option value="33%"<?php if ( '33%' == $this->options['width'] ) echo ' selected="selected"';
|
596 |
-
<option value="50%"<?php if ( '50%' == $this->options['width'] ) echo ' selected="selected"';
|
597 |
-
<option value="66%"<?php if ( '66%' == $this->options['width'] ) echo ' selected="selected"';
|
598 |
-
<option value="75%"<?php if ( '75%' == $this->options['width'] ) echo ' selected="selected"';
|
599 |
-
<option value="100%"<?php if ( '100%' == $this->options['width'] ) echo ' selected="selected"';
|
600 |
</optgroup>
|
601 |
<optgroup label="<?php _e('Other', 'toc+'); ?>">
|
602 |
<option value="User defined"<?php if ( 'User defined' == $this->options['width'] ) echo ' selected="selected"'; ?>><?php _e('User defined', 'toc+'); ?></option>
|
@@ -710,19 +713,23 @@ if ( !class_exists( 'toc' ) ) :
|
|
710 |
</tr>
|
711 |
<tr>
|
712 |
<th><label for="bullet_spacing"><?php _e('Preserve theme bullets', 'toc+'); ?></label></th>
|
713 |
-
<td><input type="checkbox" value="1" id="bullet_spacing" name="bullet_spacing"<?php if ( $this->options['bullet_spacing'] ) echo ' checked="checked"'; ?> /><label for="bullet_spacing"> <?php _e(
|
714 |
</tr>
|
715 |
</tbody>
|
716 |
</table>
|
717 |
|
718 |
-
<h3><?php _e('Advanced', 'toc+'); ?> <span class="show_hide">(<a href="#toc_advanced_usage"
|
719 |
<div id="toc_advanced_usage">
|
720 |
<h4><?php _e('Power options', 'toc+'); ?></h4>
|
721 |
<table class="form-table">
|
722 |
<tbody>
|
723 |
<tr>
|
724 |
<th><label for="include_homepage"><?php _e('Include homepage', 'toc+'); ?></label></th>
|
725 |
-
<td><input type="checkbox" value="1" id="include_homepage" name="include_homepage"<?php if ( $this->options['include_homepage'] ) echo ' checked="checked"'; ?> /><label for="include_homepage"> <?php _e(
|
|
|
|
|
|
|
|
|
726 |
</tr>
|
727 |
<tr>
|
728 |
<th><?php _e('Heading levels', 'toc+'); ?></th>
|
@@ -749,7 +756,7 @@ if ( !class_exists( 'toc' ) ) :
|
|
749 |
<th><label for="fragment_prefix"><?php _e('Default anchor prefix', 'toc+'); ?></label></th>
|
750 |
<td>
|
751 |
<input type="text" class="regular-text" value="<?php echo htmlentities( $this->options['fragment_prefix'] ); ?>" id="fragment_prefix" name="fragment_prefix" /><br />
|
752 |
-
<label for="fragment_prefix"><?php _e('Anchor targets are restricted to alphanumeric characters as per HTML specification (see readme for more detail). The default anchor prefix will be used when no characters qualify. When left blank, a number will be used instead.'); ?><br />
|
753 |
<?php _e('This option normally applies to content written in character sets other than ASCII.', 'toc+'); ?><br />
|
754 |
<span class="description"><?php _e('Eg: i, toc_index, index, _', 'toc+'); ?></span></label>
|
755 |
</td>
|
@@ -758,7 +765,7 @@ if ( !class_exists( 'toc' ) ) :
|
|
758 |
</table>
|
759 |
|
760 |
<h4><?php _e('Usage', 'toc+'); ?></h4>
|
761 |
-
<p
|
762 |
</div>
|
763 |
|
764 |
|
@@ -806,13 +813,13 @@ if ( !class_exists( 'toc' ) ) :
|
|
806 |
</tbody>
|
807 |
</table>
|
808 |
|
809 |
-
<h3
|
810 |
<div id="sitemap_advanced_usage">
|
811 |
-
<p><code>[sitemap_pages]</code> lets you print out a listing of only pages. Similarly, <code>[sitemap_categories]</code> can be used to print out a category listing. They both can accept a number of attributes so visit the help tab for more information
|
812 |
-
<p
|
813 |
<ol>
|
814 |
-
<li><code>[sitemap_categories no_label="true"]</code> hides the heading from a category listing
|
815 |
-
<li><code>[sitemap_pages heading="6" label="This is an awesome listing" exclude="1,15"]</code> Uses h6 to display <em>This is an awesome listing</em> on a page listing excluding pages with IDs 1 and 15
|
816 |
</ol>
|
817 |
</div>
|
818 |
|
@@ -820,93 +827,93 @@ if ( !class_exists( 'toc' ) ) :
|
|
820 |
</div>
|
821 |
<div id="tab3" class="tab_content">
|
822 |
|
823 |
-
<h3
|
824 |
-
<p
|
825 |
<ol>
|
826 |
-
<li
|
827 |
-
<li
|
828 |
-
<li
|
829 |
-
<li
|
830 |
</ol>
|
831 |
|
832 |
-
<h3
|
833 |
-
<p
|
834 |
|
835 |
-
<h3
|
836 |
-
<p
|
837 |
-
<p
|
838 |
|
839 |
-
<h3
|
840 |
-
<p
|
841 |
<pre>
|
842 |
<h3>This is
|
843 |
a really
|
844 |
good heading</h3>
|
845 |
</pre>
|
846 |
-
<p
|
847 |
<pre>
|
848 |
<h3>This is a really good heading</h3>
|
849 |
</pre>
|
850 |
|
851 |
-
<h3
|
852 |
-
<p
|
853 |
-
<p
|
854 |
|
855 |
-
<h3
|
856 |
-
<p
|
857 |
<table id="shortcode_table">
|
858 |
<thead>
|
859 |
<tr>
|
860 |
-
<th
|
861 |
-
<th
|
862 |
-
<th
|
863 |
</tr>
|
864 |
</thead>
|
865 |
<tbody>
|
866 |
<tr>
|
867 |
<td>[toc]</td>
|
868 |
-
<td
|
869 |
<td>
|
870 |
<ul>
|
871 |
-
<li><strong>label</strong>: text, title of the table of contents
|
872 |
-
<li><strong>no_label</strong>: true/false, shows or hides the title
|
873 |
-
<li><strong>wrapping</strong>: text, either "left" or "right"
|
874 |
-
<li><strong>heading_levels</strong>: numbers, this lets you select the heading levels you want included in the table of contents. Separate multiple levels with a comma. Example: include headings 3, 4 and 5 but exclude the others with <code>heading_levels="3,4,5"</code></li>
|
875 |
</ul>
|
876 |
</td>
|
877 |
</tr>
|
878 |
<tr>
|
879 |
<td>[no_toc]</td>
|
880 |
-
<td
|
881 |
<td> </td>
|
882 |
</tr>
|
883 |
<tr>
|
884 |
<td>[sitemap]</td>
|
885 |
-
<td
|
886 |
<td> </td>
|
887 |
</tr>
|
888 |
<tr>
|
889 |
<td>[sitemap_pages]</td>
|
890 |
-
<td
|
891 |
<td>
|
892 |
<ul>
|
893 |
-
<li><strong>heading</strong>: number between 1 and 6, defines which html heading to use
|
894 |
-
<li><strong>label</strong>: text, title of the list
|
895 |
-
<li><strong>no_label</strong>: true/false, shows or hides the list heading
|
896 |
-
<li><strong>exclude</strong>: IDs of the pages or categories you wish to exclude
|
897 |
</ul>
|
898 |
</td>
|
899 |
</tr>
|
900 |
<tr>
|
901 |
<td>[sitemap_categories]</td>
|
902 |
-
<td
|
903 |
<td> </td>
|
904 |
</tr>
|
905 |
</tbody>
|
906 |
</table>
|
907 |
|
908 |
-
<h3
|
909 |
-
<p
|
910 |
|
911 |
</div>
|
912 |
</div>
|
@@ -921,7 +928,8 @@ good heading</h3>
|
|
921 |
|
922 |
function public_styles()
|
923 |
{
|
924 |
-
|
|
|
925 |
}
|
926 |
|
927 |
|
@@ -935,7 +943,7 @@ good heading</h3>
|
|
935 |
?>
|
936 |
<style type="text/css">
|
937 |
div#toc_container {
|
938 |
-
<?php if ( $this->options['theme'] == TOC_THEME_CUSTOM ) : ?>
|
939 |
background: <?php echo $this->options['custom_background_colour']; ?>;
|
940 |
border: 1px solid <?php echo $this->options['custom_border_colour']; ?>;
|
941 |
<?php
|
@@ -957,7 +965,10 @@ div#toc_container {
|
|
957 |
}
|
958 |
?>
|
959 |
}
|
960 |
-
<?php
|
|
|
|
|
|
|
961 |
div#toc_container p.toc_title {
|
962 |
color: <?php echo $this->options['custom_title_colour']; ?>;
|
963 |
}
|
@@ -985,7 +996,10 @@ div#toc_container p.toc_title a:visited,
|
|
985 |
div#toc_container ul.toc_list a:visited {
|
986 |
color: <?php echo $this->options['custom_links_visited_colour']; ?>;
|
987 |
}
|
988 |
-
<?php
|
|
|
|
|
|
|
989 |
</style>
|
990 |
<?php
|
991 |
endif;
|
@@ -1155,7 +1169,7 @@ div#toc_container ul.toc_list a:visited {
|
|
1155 |
{
|
1156 |
if ( is_array($find) && is_array($replace) && $string ) {
|
1157 |
// check if multibyte strings are supported
|
1158 |
-
if ( function_exists( '
|
1159 |
for ($i = 0; $i < count($find); $i++) {
|
1160 |
$string =
|
1161 |
mb_substr( $string, 0, mb_strpos($string, $find[$i]) ) . // everything befor $find
|
@@ -1195,6 +1209,11 @@ div#toc_container ul.toc_list a:visited {
|
|
1195 |
$anchor = '';
|
1196 |
$items = false;
|
1197 |
|
|
|
|
|
|
|
|
|
|
|
1198 |
if ( is_array($find) && is_array($replace) && $content ) {
|
1199 |
// get all headings
|
1200 |
// the html spec allows for a maximum of 6 heading depths
|
@@ -1236,7 +1255,7 @@ div#toc_container ul.toc_list a:visited {
|
|
1236 |
|
1237 |
// build a hierarchical toc?
|
1238 |
// we could have tested for $items but that var can be quite large in some cases
|
1239 |
-
if ( $this->options['show_heirarchy'] ) $items = $this->build_hierarchy(
|
1240 |
}
|
1241 |
}
|
1242 |
|
@@ -1281,15 +1300,10 @@ div#toc_container ul.toc_list a:visited {
|
|
1281 |
$items = $css_classes = $anchor = '';
|
1282 |
$custom_toc_position = strpos($content, '<!--TOC-->');
|
1283 |
$find = $replace = array();
|
1284 |
-
|
1285 |
-
// reset the internal collision collection as the_content may have been triggered elsewhere
|
1286 |
-
// eg by themes or other plugins that need to read in content such as metadata fields in
|
1287 |
-
// the head html tag, or to provide descriptions to twitter/facebook
|
1288 |
-
$this->collision_collector = array();
|
1289 |
|
1290 |
if ( $this->is_eligible($custom_toc_position) ) {
|
1291 |
|
1292 |
-
$items = $this->extract_headings(
|
1293 |
|
1294 |
if ( $items ) {
|
1295 |
// do we display the toc within the content or has the user opted
|
@@ -1396,7 +1410,7 @@ if ( !class_exists( 'toc_widget' ) ) :
|
|
1396 |
{
|
1397 |
$widget_options = array(
|
1398 |
'classname' => 'toc_widget',
|
1399 |
-
'description' => 'Display the table of contents in the sidebar with this widget'
|
1400 |
);
|
1401 |
$control_options = array(
|
1402 |
'width' => 250,
|
@@ -1424,7 +1438,7 @@ if ( !class_exists( 'toc_widget' ) ) :
|
|
1424 |
|
1425 |
extract( $args );
|
1426 |
|
1427 |
-
$items = $tic->extract_headings(
|
1428 |
$title = apply_filters('widget_title', $instance['title'] );
|
1429 |
$hide_inline = $toc_options['show_toc_in_widget_only'];
|
1430 |
|
@@ -1481,13 +1495,13 @@ if ( !class_exists( 'toc_widget' ) ) :
|
|
1481 |
|
1482 |
?>
|
1483 |
<p>
|
1484 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"
|
1485 |
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" style="width:100%;" />
|
1486 |
</p>
|
1487 |
|
1488 |
<p>
|
1489 |
<input class="checkbox" type="checkbox" <?php checked( $toc_options['show_toc_in_widget_only'], 1 ); ?> id="<?php echo $this->get_field_id( 'hide_inline' ); ?>" name="<?php echo $this->get_field_name( 'hide_inline' ); ?>" value="1" />
|
1490 |
-
<label for="<?php echo $this->get_field_id( 'hide_inline' ); ?>"> <?php _e('Show the table of contents only in the sidebar'); ?></label>
|
1491 |
</p>
|
1492 |
<?php
|
1493 |
}
|
5 |
Description: A powerful yet user friendly plugin that automatically creates a table of contents. Can also output a sitemap listing all pages and categories.
|
6 |
Author: Michael Tran
|
7 |
Author URI: http://dublue.com/
|
8 |
+
Version: 1208
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
109 |
'custom_links_visited_colour' => TOC_DEFAULT_LINKS_VISITED_COLOUR,
|
110 |
'bullet_spacing' => false,
|
111 |
'include_homepage' => false,
|
112 |
+
'exclude_css' => false,
|
113 |
'heading_levels' => array('1', '2', '3', '4', '5', '6'),
|
114 |
'sitemap_show_page_listing' => true,
|
115 |
'sitemap_show_category_listing' => true,
|
317 |
|
318 |
function init()
|
319 |
{
|
320 |
+
load_plugin_textdomain( 'toc+', false, dirname(plugin_basename(__FILE__)) . '/languages/' );
|
321 |
wp_register_style( 'toc-screen', $this->path . '/screen.css' );
|
322 |
wp_register_script( 'smooth-scroll', $this->path . '/jquery.smooth-scroll.min.js', array('jquery') );
|
323 |
wp_register_script( 'cookie', $this->path . '/jquery.c.min.js', array('jquery') );
|
449 |
'custom_links_hover_colour' => $custom_links_hover_colour,
|
450 |
'bullet_spacing' => (isset($_POST['bullet_spacing']) && $_POST['bullet_spacing']) ? true : false,
|
451 |
'include_homepage' => (isset($_POST['include_homepage']) && $_POST['include_homepage']) ? true : false,
|
452 |
+
'exclude_css' => (isset($_POST['exclude_css']) && $_POST['exclude_css']) ? true : false,
|
453 |
'heading_levels' => @(array)$_POST['heading_levels'],
|
454 |
'sitemap_show_page_listing' => (isset($_POST['sitemap_show_page_listing']) && $_POST['sitemap_show_page_listing']) ? true : false,
|
455 |
'sitemap_show_category_listing' => (isset($_POST['sitemap_show_category_listing']) && $_POST['sitemap_show_category_listing']) ? true : false,
|
479 |
?>
|
480 |
<div id='toc' class='wrap'>
|
481 |
<div id="icon-options-general" class="icon32"><br /></div>
|
482 |
+
<h2>Table of Contents Plus</h2>
|
483 |
<?php echo $msg; ?>
|
484 |
<form method="post" action="<?php echo htmlentities('?page=' . $_GET['page'] . '&update'); ?>">
|
485 |
<?php wp_nonce_field( plugin_basename(__FILE__), 'toc-admin-options' ); ?>
|
498 |
<th><label for="position"><?php _e('Position', 'toc+'); ?></label></th>
|
499 |
<td>
|
500 |
<select name="position" id="position">
|
501 |
+
<option value="<?php echo TOC_POSITION_BEFORE_FIRST_HEADING; ?>"<?php if ( TOC_POSITION_BEFORE_FIRST_HEADING == $this->options['position'] ) echo ' selected="selected"'; ?>><?php _e('Before first heading (default)', 'toc+'); ?></option>
|
502 |
+
<option value="<?php echo TOC_POSITION_TOP; ?>"<?php if ( TOC_POSITION_TOP == $this->options['position'] ) echo ' selected="selected"'; ?>><?php _e('Top', 'toc+'); ?></option>
|
503 |
+
<option value="<?php echo TOC_POSITION_BOTTOM; ?>"<?php if ( TOC_POSITION_BOTTOM == $this->options['position'] ) echo ' selected="selected"'; ?>><?php _e('Bottom', 'toc+'); ?></option>
|
504 |
</select>
|
505 |
</td>
|
506 |
</tr>
|
582 |
<td>
|
583 |
<select name="width" id="width">
|
584 |
<optgroup label="<?php _e('Fixed width', 'toc+'); ?>">
|
585 |
+
<option value="200px"<?php if ( '200px' == $this->options['width'] ) echo ' selected="selected"'; ?>>200px</option>
|
586 |
+
<option value="225px"<?php if ( '225px' == $this->options['width'] ) echo ' selected="selected"'; ?>>225px</option>
|
587 |
+
<option value="250px"<?php if ( '250px' == $this->options['width'] ) echo ' selected="selected"'; ?>>250px</option>
|
588 |
+
<option value="275px"<?php if ( '275px' == $this->options['width'] ) echo ' selected="selected"'; ?>>275px <?php _e('(default)', 'toc+'); ?></option>
|
589 |
+
<option value="300px"<?php if ( '300px' == $this->options['width'] ) echo ' selected="selected"'; ?>>300px</option>
|
590 |
+
<option value="325px"<?php if ( '325px' == $this->options['width'] ) echo ' selected="selected"'; ?>>325px</option>
|
591 |
+
<option value="350px"<?php if ( '350px' == $this->options['width'] ) echo ' selected="selected"'; ?>>350px</option>
|
592 |
+
<option value="375px"<?php if ( '375px' == $this->options['width'] ) echo ' selected="selected"'; ?>>375px</option>
|
593 |
+
<option value="400px"<?php if ( '400px' == $this->options['width'] ) echo ' selected="selected"'; ?>>400px</option>
|
594 |
</optgroup>
|
595 |
<optgroup label="<?php _e('Relative', 'toc+'); ?>">
|
596 |
+
<option value="Auto"<?php if ( 'Auto' == $this->options['width'] ) echo ' selected="selected"'; ?>><?php _e('Auto', 'toc+'); ?></option>
|
597 |
+
<option value="25%"<?php if ( '25%' == $this->options['width'] ) echo ' selected="selected"'; ?>>25%</option>
|
598 |
+
<option value="33%"<?php if ( '33%' == $this->options['width'] ) echo ' selected="selected"'; ?>>33%</option>
|
599 |
+
<option value="50%"<?php if ( '50%' == $this->options['width'] ) echo ' selected="selected"'; ?>>50%</option>
|
600 |
+
<option value="66%"<?php if ( '66%' == $this->options['width'] ) echo ' selected="selected"'; ?>>66%</option>
|
601 |
+
<option value="75%"<?php if ( '75%' == $this->options['width'] ) echo ' selected="selected"'; ?>>75%</option>
|
602 |
+
<option value="100%"<?php if ( '100%' == $this->options['width'] ) echo ' selected="selected"'; ?>>100%</option>
|
603 |
</optgroup>
|
604 |
<optgroup label="<?php _e('Other', 'toc+'); ?>">
|
605 |
<option value="User defined"<?php if ( 'User defined' == $this->options['width'] ) echo ' selected="selected"'; ?>><?php _e('User defined', 'toc+'); ?></option>
|
713 |
</tr>
|
714 |
<tr>
|
715 |
<th><label for="bullet_spacing"><?php _e('Preserve theme bullets', 'toc+'); ?></label></th>
|
716 |
+
<td><input type="checkbox" value="1" id="bullet_spacing" name="bullet_spacing"<?php if ( $this->options['bullet_spacing'] ) echo ' checked="checked"'; ?> /><label for="bullet_spacing"> <?php _e('If your theme includes background images for unordered list elements, enable this to support them', 'toc+'); ?></label></td>
|
717 |
</tr>
|
718 |
</tbody>
|
719 |
</table>
|
720 |
|
721 |
+
<h3><?php _e('Advanced', 'toc+'); ?> <span class="show_hide">(<a href="#toc_advanced_usage"><?php _e('show', 'toc+'); ?></a>)</span></h3>
|
722 |
<div id="toc_advanced_usage">
|
723 |
<h4><?php _e('Power options', 'toc+'); ?></h4>
|
724 |
<table class="form-table">
|
725 |
<tbody>
|
726 |
<tr>
|
727 |
<th><label for="include_homepage"><?php _e('Include homepage', 'toc+'); ?></label></th>
|
728 |
+
<td><input type="checkbox" value="1" id="include_homepage" name="include_homepage"<?php if ( $this->options['include_homepage'] ) echo ' checked="checked"'; ?> /><label for="include_homepage"> <?php _e('Show the table of contents for qualifying items on the homepage', 'toc+'); ?></label></td>
|
729 |
+
</tr>
|
730 |
+
<tr>
|
731 |
+
<th><label for="exclude_css"><?php _e('Exclude CSS file', 'toc+'); ?></label></th>
|
732 |
+
<td><input type="checkbox" value="1" id="exclude_css" name="exclude_css"<?php if ( $this->options['exclude_css'] ) echo ' checked="checked"'; ?> /><label for="exclude_css"> <?php _e("Prevent the loading of this plugin's CSS styles. When selected, the presentation options from above will also be ignored.", 'toc+'); ?></label></td>
|
733 |
</tr>
|
734 |
<tr>
|
735 |
<th><?php _e('Heading levels', 'toc+'); ?></th>
|
756 |
<th><label for="fragment_prefix"><?php _e('Default anchor prefix', 'toc+'); ?></label></th>
|
757 |
<td>
|
758 |
<input type="text" class="regular-text" value="<?php echo htmlentities( $this->options['fragment_prefix'] ); ?>" id="fragment_prefix" name="fragment_prefix" /><br />
|
759 |
+
<label for="fragment_prefix"><?php _e('Anchor targets are restricted to alphanumeric characters as per HTML specification (see readme for more detail). The default anchor prefix will be used when no characters qualify. When left blank, a number will be used instead.', 'toc+'); ?><br />
|
760 |
<?php _e('This option normally applies to content written in character sets other than ASCII.', 'toc+'); ?><br />
|
761 |
<span class="description"><?php _e('Eg: i, toc_index, index, _', 'toc+'); ?></span></label>
|
762 |
</td>
|
765 |
</table>
|
766 |
|
767 |
<h4><?php _e('Usage', 'toc+'); ?></h4>
|
768 |
+
<p><?php _e('If you would like to fully customise the position of the table of contents, you can use the', 'toc+'); ?> <code>[toc]</code> <?php _e('shortcode by placing it at the desired position of your post, page or custom post type. This method allows you to generate the table of contents despite having auto insertion disabled for its content type. Please visit the help tab for further information about this shortcode.', 'toc+'); ?></p>
|
769 |
</div>
|
770 |
|
771 |
|
813 |
</tbody>
|
814 |
</table>
|
815 |
|
816 |
+
<h3><?php _e('Advanced usage', 'toc+'); ?> <span class="show_hide">(<a href="#sitemap_advanced_usage"><?php _e('show', 'toc+'); ?></a>)</span></h3>
|
817 |
<div id="sitemap_advanced_usage">
|
818 |
+
<p><code>[sitemap_pages]</code> <?php _e('lets you print out a listing of only pages. Similarly', 'toc+'); ?>, <code>[sitemap_categories]</code> <?php _e('can be used to print out a category listing. They both can accept a number of attributes so visit the help tab for more information.', 'toc+'); ?></p>
|
819 |
+
<p><?php _e('Examples', 'toc+'); ?></p>
|
820 |
<ol>
|
821 |
+
<li><code>[sitemap_categories no_label="true"]</code> <?php _e('hides the heading from a category listing', 'toc+'); ?></li>
|
822 |
+
<li><code>[sitemap_pages heading="6" label="This is an awesome listing" exclude="1,15"]</code> <?php _e('Uses h6 to display', 'toc+'); ?> <em>This is an awesome listing</em> <?php _e('on a page listing excluding pages with IDs 1 and 15.', 'toc+'); ?></li>
|
823 |
</ol>
|
824 |
</div>
|
825 |
|
827 |
</div>
|
828 |
<div id="tab3" class="tab_content">
|
829 |
|
830 |
+
<h3><?php _e("Where's my table of contents?", 'toc+'); ?></h3>
|
831 |
+
<p><?php _e("If you're reading this, then chances are you have successfully installed and enabled the plugin and you're just wondering why the index isn't appearing right? Try the following:", 'toc+'); ?></p>
|
832 |
<ol>
|
833 |
+
<li><?php _e("In most cases, the post, page or custom post type has less than the minimum number of headings. By default, this is set to four so make sure you have at least four headings within your content. If you want to change this value, you can find it under 'Main Options' > 'Show when'.", 'toc+'); ?></li>
|
834 |
+
<li><?php _e('Is auto insertion enabled for your content type? By default, only pages are enabled.', 'toc+'); ?></li>
|
835 |
+
<li><?php _e('Have you got', 'toc+'); ?> <code>[no_toc]</code> <?php _e('somewhere within the content? This will disable the index for the current post, page or custom post type.', 'toc+'); ?></li>
|
836 |
+
<li><?php _e('If you are using the TOC+ widget, check if you have the', 'toc+'); ?> <em>"<?php _e('Show the table of contents only in the sidebar', 'toc+'); ?>"</em> <?php _e('enabled as this will limit its display to only the sidebar. You can check by going into Appearance > Widgets.', 'toc+'); ?></li>
|
837 |
</ol>
|
838 |
|
839 |
+
<h3><?php _e('How do I stop the table of contents from appearing on a single page?', 'toc+'); ?></h3>
|
840 |
+
<p><?php _e('Place the following', 'toc+'); ?> <code>[no_toc]</code> <?php _e('anywhere on the page to suppress the table of contents. This is known as a shortcode and works for posts, pages and custom post types that make use of the_content()', 'toc+'); ?></p>
|
841 |
|
842 |
+
<h3><?php _e("I've set wrapping to left or right but the headings don't wrap around the table of contents", 'toc+'); ?></h3>
|
843 |
+
<p><?php _e('This normally occurs when there is a CSS clear directive in or around the heading specified by the theme author. This directive tells the user agent to reset the previous wrapping specifications.', 'toc+'); ?></p>
|
844 |
+
<p><?php _e("You can adjust your theme's CSS or try moving the table of contents position to the top of the page. If you didn't build your theme, I'd highly suggest you try the", 'toc+'); ?> <a href="http://wordpress.org/extend/plugins/safecss/">Custom CSS plugin</a> <?php _e('if you wish to make CSS changes.', 'toc+'); ?></p>
|
845 |
|
846 |
+
<h3><?php _e('Why are some headings not included in the table of contents?', 'toc+'); ?></h3>
|
847 |
+
<p><?php _e("First, make sure the title text that isn't appearing in the table of contents is actually marked up as a heading (eg heading 1 through to 6). After verifying that it really is a heading, make sure that there are no linebreaks or enters from the start to the end of the heading HTML tags. Eg, it should not be like the following:", 'toc+'); ?></p>
|
848 |
<pre>
|
849 |
<h3>This is
|
850 |
a really
|
851 |
good heading</h3>
|
852 |
</pre>
|
853 |
+
<p><?php _e('Rather, it should be something like:', 'toc+'); ?></p>
|
854 |
<pre>
|
855 |
<h3>This is a really good heading</h3>
|
856 |
</pre>
|
857 |
|
858 |
+
<h3><?php _e('The sitemap uses a strange font disimilar to the rest of the site', 'toc+'); ?></h3>
|
859 |
+
<p><?php _e("No extra styles are created for the sitemap, instead it inherits any styles you used when adding the shortcode. If you copy and pasted, you probably also copied the 'code' tags surrounding it so remove them if this is the case.", 'toc+'); ?></p>
|
860 |
+
<p><?php _e('In most cases, try to have the shortcode on its own line with nothing before or after the square brackets.', 'toc+'); ?></p>
|
861 |
|
862 |
+
<h3><?php _e('What were those shortcodes and attributes again?', 'toc+'); ?></h3>
|
863 |
+
<p><?php _e('When attributes are left out for the shortcodes below, they will fallback to the settings you defined under Settings > TOC+.', 'toc+'); ?></p>
|
864 |
<table id="shortcode_table">
|
865 |
<thead>
|
866 |
<tr>
|
867 |
+
<th><?php _e('Shortcode', 'toc+'); ?></th>
|
868 |
+
<th><?php _e('Description', 'toc+'); ?></th>
|
869 |
+
<th><?php _e('Attributes', 'toc+'); ?></th>
|
870 |
</tr>
|
871 |
</thead>
|
872 |
<tbody>
|
873 |
<tr>
|
874 |
<td>[toc]</td>
|
875 |
+
<td><?php _e('Lets you generate the table of contents at the preferred position. Also useful for sites that only require a TOC on a small handful of pages.', 'toc+'); ?></td>
|
876 |
<td>
|
877 |
<ul>
|
878 |
+
<li><strong>label</strong>: <?php _e('text, title of the table of contents', 'toc+'); ?></li>
|
879 |
+
<li><strong>no_label</strong>: <?php _e('true/false, shows or hides the title', 'toc+'); ?></li>
|
880 |
+
<li><strong>wrapping</strong>: <?php _e('text, either "left" or "right"', 'toc+'); ?></li>
|
881 |
+
<li><strong>heading_levels</strong>: <?php _e('numbers, this lets you select the heading levels you want included in the table of contents. Separate multiple levels with a comma. Example: include headings 3, 4 and 5 but exclude the others with', 'toc+'); ?> <code>heading_levels="3,4,5"</code></li>
|
882 |
</ul>
|
883 |
</td>
|
884 |
</tr>
|
885 |
<tr>
|
886 |
<td>[no_toc]</td>
|
887 |
+
<td><?php _e('Allows you to disable the table of contents for the current post, page, or custom post type.', 'toc+'); ?></td>
|
888 |
<td> </td>
|
889 |
</tr>
|
890 |
<tr>
|
891 |
<td>[sitemap]</td>
|
892 |
+
<td><?php _e('Produces a listing of all pages and categories for your site. You can use this on any post, page or even in a text widget.', 'toc+'); ?></td>
|
893 |
<td> </td>
|
894 |
</tr>
|
895 |
<tr>
|
896 |
<td>[sitemap_pages]</td>
|
897 |
+
<td><?php _e('Lets you print out a listing of only pages.', 'toc+'); ?></td>
|
898 |
<td>
|
899 |
<ul>
|
900 |
+
<li><strong>heading</strong>: <?php _e('number between 1 and 6, defines which html heading to use', 'toc+'); ?></li>
|
901 |
+
<li><strong>label</strong>: <?php _e('text, title of the list', 'toc+'); ?></li>
|
902 |
+
<li><strong>no_label</strong>: <?php _e('true/false, shows or hides the list heading', 'toc+'); ?></li>
|
903 |
+
<li><strong>exclude</strong>: <?php _e('IDs of the pages or categories you wish to exclude', 'toc+'); ?></li>
|
904 |
</ul>
|
905 |
</td>
|
906 |
</tr>
|
907 |
<tr>
|
908 |
<td>[sitemap_categories]</td>
|
909 |
+
<td><?php _e('Similar to', 'toc+'); ?> [sitemap_pages] <?php _e('but for categories.', 'toc+'); ?></td>
|
910 |
<td> </td>
|
911 |
</tr>
|
912 |
</tbody>
|
913 |
</table>
|
914 |
|
915 |
+
<h3><?php _e('I have another question...', 'toc+'); ?></h3>
|
916 |
+
<p><?php _e('Visit the', 'toc+'); ?> <a href="http://dublue.com/plugins/toc/"><?php _e('plugin homepage', 'toc+'); ?></a> <?php _e("to ask your question - who knows, maybe your question has already been answered. I'd really like to hear your suggestions if you have any.", 'toc+'); ?></p>
|
917 |
|
918 |
</div>
|
919 |
</div>
|
928 |
|
929 |
function public_styles()
|
930 |
{
|
931 |
+
if ( !$this->options['exclude_css'] )
|
932 |
+
wp_enqueue_style("toc-screen");
|
933 |
}
|
934 |
|
935 |
|
943 |
?>
|
944 |
<style type="text/css">
|
945 |
div#toc_container {
|
946 |
+
<?php if ( $this->options['theme'] == TOC_THEME_CUSTOM && !$this->options['exclude_css'] ) : ?>
|
947 |
background: <?php echo $this->options['custom_background_colour']; ?>;
|
948 |
border: 1px solid <?php echo $this->options['custom_border_colour']; ?>;
|
949 |
<?php
|
965 |
}
|
966 |
?>
|
967 |
}
|
968 |
+
<?php
|
969 |
+
if ( !$this->options['exclude_css'] ) {
|
970 |
+
if ( $this->options['custom_title_colour'] != TOC_DEFAULT_TITLE_COLOUR ) :
|
971 |
+
?>
|
972 |
div#toc_container p.toc_title {
|
973 |
color: <?php echo $this->options['custom_title_colour']; ?>;
|
974 |
}
|
996 |
div#toc_container ul.toc_list a:visited {
|
997 |
color: <?php echo $this->options['custom_links_visited_colour']; ?>;
|
998 |
}
|
999 |
+
<?php
|
1000 |
+
endif;
|
1001 |
+
}
|
1002 |
+
?>
|
1003 |
</style>
|
1004 |
<?php
|
1005 |
endif;
|
1169 |
{
|
1170 |
if ( is_array($find) && is_array($replace) && $string ) {
|
1171 |
// check if multibyte strings are supported
|
1172 |
+
if ( function_exists( 'mb_strpos' ) ) {
|
1173 |
for ($i = 0; $i < count($find); $i++) {
|
1174 |
$string =
|
1175 |
mb_substr( $string, 0, mb_strpos($string, $find[$i]) ) . // everything befor $find
|
1209 |
$anchor = '';
|
1210 |
$items = false;
|
1211 |
|
1212 |
+
// reset the internal collision collection as the_content may have been triggered elsewhere
|
1213 |
+
// eg by themes or other plugins that need to read in content such as metadata fields in
|
1214 |
+
// the head html tag, or to provide descriptions to twitter/facebook
|
1215 |
+
$this->collision_collector = array();
|
1216 |
+
|
1217 |
if ( is_array($find) && is_array($replace) && $content ) {
|
1218 |
// get all headings
|
1219 |
// the html spec allows for a maximum of 6 heading depths
|
1255 |
|
1256 |
// build a hierarchical toc?
|
1257 |
// we could have tested for $items but that var can be quite large in some cases
|
1258 |
+
if ( $this->options['show_heirarchy'] ) $items = $this->build_hierarchy( $matches );
|
1259 |
}
|
1260 |
}
|
1261 |
|
1300 |
$items = $css_classes = $anchor = '';
|
1301 |
$custom_toc_position = strpos($content, '<!--TOC-->');
|
1302 |
$find = $replace = array();
|
|
|
|
|
|
|
|
|
|
|
1303 |
|
1304 |
if ( $this->is_eligible($custom_toc_position) ) {
|
1305 |
|
1306 |
+
$items = $this->extract_headings($find, $replace, $content);
|
1307 |
|
1308 |
if ( $items ) {
|
1309 |
// do we display the toc within the content or has the user opted
|
1410 |
{
|
1411 |
$widget_options = array(
|
1412 |
'classname' => 'toc_widget',
|
1413 |
+
'description' => __('Display the table of contents in the sidebar with this widget', 'toc+')
|
1414 |
);
|
1415 |
$control_options = array(
|
1416 |
'width' => 250,
|
1438 |
|
1439 |
extract( $args );
|
1440 |
|
1441 |
+
$items = $tic->extract_headings( $find, $replace, $post->post_content );
|
1442 |
$title = apply_filters('widget_title', $instance['title'] );
|
1443 |
$hide_inline = $toc_options['show_toc_in_widget_only'];
|
1444 |
|
1495 |
|
1496 |
?>
|
1497 |
<p>
|
1498 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('Title', 'toc+'); ?>:</label>
|
1499 |
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" style="width:100%;" />
|
1500 |
</p>
|
1501 |
|
1502 |
<p>
|
1503 |
<input class="checkbox" type="checkbox" <?php checked( $toc_options['show_toc_in_widget_only'], 1 ); ?> id="<?php echo $this->get_field_id( 'hide_inline' ); ?>" name="<?php echo $this->get_field_name( 'hide_inline' ); ?>" value="1" />
|
1504 |
+
<label for="<?php echo $this->get_field_id( 'hide_inline' ); ?>"> <?php _e('Show the table of contents only in the sidebar', 'toc+'); ?></label>
|
1505 |
</p>
|
1506 |
<?php
|
1507 |
}
|