This repository has been archived by the owner on May 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoptions.txt
179 lines (177 loc) · 12.3 KB
/
options.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('showPostCount'); ?>" <?php if ($showPostCount=='yes') echo 'checked'; ?> id="<?php echo $this->get_field_id('collapsArch'); ?>"></input> <label for="collapsArchShowPostCount"><?php _e('Show Post Count', 'collapsArch'); ?> </label>
<input type="checkbox" name="<?php echo $this->get_field_name('showPages'); ?>" <?php if ($showPages=='yes') echo 'checked'; ?>
id="<?php echo $this->get_field_id('showPages'); ?>"></input> <label
for="collapsArchShowPages"><?php _e('Show Pages as well as posts', 'collapsArch'); ?> </label>
</p>
<p><?php _e('Display archives in', 'collapsArch'); ?>
<select name="<?php echo $this->get_field_name('sort'); ?>">
<option <?php if($sort=='ASC') echo 'selected'; ?>
id="<?php echo $this->get_field_id('sort'); ?>"
value='ASC'><?php _e('Chronological order', 'collapsArch'); ?></option>
<option <?php if($sort=='DESC') echo 'selected'; ?>
id="<?php echo $this->get_field_id('sort'); ?>"
value='DESC'><?php _e('Reverse Chronological order', 'collapsArch'); ?></option>
</select>
</p>
<p><?php _e('Expanding and collapse characters:', 'collapsArch');?><br />
<strong>html:</strong> <input type="radio" name="<?php echo $this->get_field_name('expand'); ?>" <?php if($expand==0) echo 'checked'; ?> id="expand0" value='0'></input> <label for="expand0">► ▼</label>
<input type="radio" name="<?php echo $this->get_field_name('expand'); ?>" <?php if($expand==1) echo 'checked'; ?> id="expand1" value='1'></input> <label for="expand1">+ —</label>
<input type="radio" name="<?php echo $this->get_field_name('expand'); ?>"
<?php if($expand==2) echo 'checked'; ?> id="expand2" value='2'></input>
<label for="expand2">[+] [—]</label>
<input type="radio" name="<?php echo $this->get_field_name('expand'); ?>"
<?php if($expand==4) echo 'checked'; ?> id="expand4" value='4'></input>
<label for="expand4">custom</label>
<?php _e('expand:', 'collapsArch'); ?>
<input type="text" size='1' name="<?php echo $this->get_field_name('customExpand'); ?>" value="<?php echo $customExpand ?>" id="<?php echo $this->get_field_id('customExpand'); ?>"></input>
<?php _e('collapse:', 'collapsArch'); ?>
<input type="text" size='1' name="<?php echo $this->get_field_name('customCollapse'); ?>" value="<?php echo $customCollapse ?>" id="<?php echo $this->get_field_id('customCollapse'); ?>"></input>
<?php _e('<strong>images:</strong>', 'collapsArch');?>
<input type="radio" name="<?php echo $this->get_field_name('expand'); ?>"
<?php if($expand==3) echo 'checked'; ?> id="expand0" value='3'></input>
<label for="expand3"><img src='<?php echo get_settings('siteurl') .
"/wp-content/plugins/collapsArch/" ?>img/collapse.gif' /> <img
src='<?php echo get_settings('siteurl') .
"/wp-content/plugins/collapsArch/" ?>img/expand.gif' /></label>
</p>
<p>
<select name="<?php echo $this->get_field_name('inExcludeYear'); ?>">
<option <?php if($inExcludeYear=='include') echo 'selected'; ?> id="<?php echo $this->get_field_id(''); ?>" value='include'><?php _e('Include', 'collapsArch');?></option>
<option <?php if($inExcludeYear=='exclude') echo 'selected'; ?> id="<?php echo $this->get_field_id(''); ?>" value='exclude'><?php _e('Exclude', 'collapsArch');?></option>
</select>
<?php _e('these years (separated by commas):', 'collapsArch');?><br />
<input type="text" name="<?php echo $this->get_field_name('inExcludeYears'); ?>" value="<?php echo $inExcludeYears ?>"
id="<?php echo $this->get_field_id('inExcludeYears'); ?>"></input>
</p>
<p>
<select name="<?php echo $this->get_field_name('inExcludeCat'); ?>">
<option <?php if($inExcludeCat=='include') echo 'selected'; ?> id="<?php echo $this->get_field_id('inExcludeCatInclude') ?>" value='include'>Include</option>
<option <?php if($inExcludeCat=='exclude') echo 'selected'; ?> id="<?php echo $this->get_field_id('inExcludeCatExclude') ?>" value='exclude'>Exclude</option>
</select>
<?php _e('these categories (input slug or ID separated by commas):', 'collapsArch') ?><br />
<input type="text" name="<?php echo $this->get_field_name('inExcludeCats'); ?>" value="<?php echo $inExcludeCats ?>" id="<?php echo $this->get_field_id('inExcludeCats') ?>"</input>
</p>
<?php
// get taxonomy types
global $wp_taxonomies;
?>
<p><?php _e('Taxonomy type','collapsArch')?>:
<select name="<?php echo $this->get_field_name('taxonomy'); ?> id="<?php echo $this->get_field_id('taxonomy'); ?>"">
<option <?php if($taxonomy=='both') echo 'selected="selected"'; ?> value='both'><?php _e('archives and Tags', 'collapsArch') ?></option>
<?php foreach ($wp_taxonomies as $tax): ?>
<option <?php if ($taxonomy == $tax->name) echo "selected='selected'"?> value='<?php echo $tax->name?>'><?php echo $tax->label?> (<?php echo $tax->name?>)</option>
<?php endforeach ?>
</select>
</p>
<?php
//get all post types
global $wp_post_types;
?>
<p><?php _e('Post type','collapsArch')?>:
<select name="<?php echo $this->get_field_name('post_type'); ?>" id="<?php echo $this->get_field_id('post_type'); ?>">
<option <?php if ($post_type == 'all') echo "selected='selected'"?>
value='all'>All post types (regular posts plus custom post types)</option>
<?php foreach ($wp_post_types as $key=>$post): ?>
<option <?php if ($post_type == $key) echo "selected='selected'"?> value='<?php echo $key?>'><?php echo $post->label?> (<?php echo $post->name?>)</option>
<?php endforeach ?>
</select>
<p><?php _e('Clicking on year/month', 'collapsArch'); ?>:<br />
<input type="radio" name="<?php echo $this->get_field_name('linkToArch'); ?>"
<?php if($linkToArch) echo 'checked'; ?>
id="<?php echo $this->get_field_id('collapsArch'); ?>"
value='yes'></input> <label for="collapsArch-linkToArchYes"><?php _e('Links to archive', 'collapsArch'); ?></label>
<input type="radio" name="<?php echo $this->get_field_name('linkToArch'); ?>"
<?php if(!$linkToArch) echo 'checked'; ?>
id="<?php echo $this->get_field_id('collapsArch'); ?>"
value='no'></input> <label for="linkToArchNo"><?php _e('Expands list', 'collapsArch'); ?></label>
</p>
<p>
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('expandCurrentYear'); ?>" <?php if ($expandCurrentYear) echo
'checked'; ?> id="<?php echo $this->get_field_id('expandCurrentYear'); ?>"></input> <label for="expandCurrentYear"><?php _e('Leave Current Year Expanded by Default', 'collapsArch'); ?></label>
</p>
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('showYearCount'); ?>" <?php if ($showYearCount) echo 'checked'; ?>
id="<?php echo $this->get_field_id(''); ?>"></input> <label for="showYearCount"><?php _e('Show Post Count in Year Links', 'collapsArch'); ?></label>
</p>
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('expandYears'); ?>" <?php if ($expandYears) echo 'checked'; ?>
id="<?php echo $this->get_field_id('expandYears'); ?>"></input> <label for="expandYears"><?php _e('Show Month Link', 'collapsArch'); ?></label>
</p>
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('showMonthCount'); ?>" <?php if ($showMonthCount == 'yes') echo
'checked'; ?> id="<?php echo $this->get_field_id('showMonthCount'); ?>"></input> <label
for="showMonthCount"><?php _e('Show Post Count in Month Links', 'collapsArch'); ?></label><br />
<input type="checkbox" name="<?php echo $this->get_field_name('expandMonths'); ?>" <?php if($expandMonths) echo
'checked'; ?> id="<?php echo $this->get_field_id('expandMonths'); ?>"></input> <label
for="expandMonths"><?php _e('Month Links should expand to show Posts', 'collapsArch'); ?></label><br />
<input type="checkbox"
name="<?php echo $this->get_field_name('expandCurrentMonth'); ?>"
<?php if ($expandCurrentMonth) echo 'checked'; ?>
id="<?php echo $this->get_field_id('expandCurrentMonth'); ?>"></input> <label
for="expandCurrentMonth"><?php _e('Leave Current Month Expanded by Default', 'collapsArch'); ?></label>
</p>
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('showPostTitle'); ?>" <?php if ($showPostTitle) echo
'checked'; ?> id="<?php echo $this->get_field_id('showPostTitle'); ?>"></input> <label
for="showPostTitle"><?php _e('Show Post Title', 'collapsArch'); ?></label>
| <?php _e('Truncate Post Title to', 'collapsArch'); ?>
<input type="text" size='3' name="<?php echo $this->get_field_name('postTitleLength'); ?>"
id="<?php echo $this->get_field_id('postTitleLength'); ?>" value="<?php echo
$postTitleLength; ?>"></input> <label
for="postTitleLength"> <?php _e('characters', 'collapsArch'); ?></label>
</p>
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('showPostDate'); ?>" <?php if ($showPostDate) echo
'checked'; ?> id="<?php echo $this->get_field_id('showPostDate'); ?>"></input> <label
for="showPostDate"><?php _e('Show Post Date', 'collapsArch'); ?></label> |
<select name="<?php echo $this->get_field_name('postDateAppend'); ?>">
<option <?php if($postDateAppend=='before') echo 'selected'; ?> id="<?php echo $this->get_field_id('postDateAppendBefore') ?>" value='before'><?php _e('Before post title', 'collapsArch') ?></option>
<option <?php if($postDateAppend=='after') echo 'selected'; ?> id="<?php echo $this->get_field_id('postDateAppendAfter') ?>" value='after'><?php _e('After post title', 'collapsArch') ?></option>
</select>
<label for="postDateFormat"><a href='http://php.net/date'
title='information about date formatting syntax' target='_blank'>
<?php _e('as', 'collapsArch'); ?></a>:</label>
<input type="text" size='8' name="<?php echo $this->get_field_name('postDateFormat'); ?>" value="<?php echo $postDateFormat; ?>"
id="<?php echo $this->get_field_id('postDateFormat'); ?>"></input>
</p>
<p><label for='<?php echo $this->get_field_id("style")?>'><?php _e('Style',
'collapsArch')?></label>
<select id='<?php echo $this->get_field_id("style")?>'
name='<?php echo $this->get_field_name("style")?>'>
<?php foreach ($styleOptions as $key =>$value): ?>
<option value='<?php echo attribute_escape($key) ?>'
<?php if ($style == $key) echo "selected='selected'" ?>>
<?php echo $value ?></option>
<?php endforeach ?>
</select>
</p>
<a style='cursor:pointer' onclick='showAdvanced("<?php echo $this->get_field_id('advanced') ?>", "<?php echo $this->get_field_id('arrow') ?>");'><span id="<?php echo $this->get_field_id('arrow') ?>">▶</span> Advanced options</a>
<div id="<?php echo $this->get_field_id('advanced') ?>" style='display:none;'>
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('useCookies'); ?>"
<?php if ($useCookies) echo 'checked'; ?> id="<?php echo $this->get_field_id('useCookies'); ?>"></input> Remember expanding and collapsing for each visitor (using cookies)
</p>
<p>
<input type="checkbox" id="<?php echo $this->get_field_id('accordion'); ?>" name="<?php echo $this->get_field_name('accordion'); ?>"
<?php if ($accordion) echo 'checked'; ?> id="<?php echo $this->get_field_id('accordion'); ?>"></input><label for="<?php echo $this->get_field_id('accordion'); ?>"><?php _e('Accordion style', 'collapsing-archives')?> <a class='help' title='<?php _e('When expanding one category, close all others', 'collapsing-archives')?>'>?</a></label> </p>
<p>
<input type="checkbox" name="<?php echo $this->get_field_name('debug'); ?>"
<?php if ($debug=='1') echo 'checked'; ?> id="<?php echo $this->get_field_id('collapsArch'); ?>"></input> <label for="collapsArchDebug"><?php _e('Show debugging information
(shows up as a hidden pre right after the title)', 'collapsArch');?></label>
</p>
</div>
<script type='text/javascript'>
function showAdvanced(advancedId, arrowId) {
var advanced = document.getElementById(advancedId);
var arrow = document.getElementById(arrowId);
if (advanced.style.display=='none') {
advanced.style.display='block';
arrow.innerHTML='▼';
} else {
advanced.style.display='none';
arrow.innerHTML='▶';
}
}
</script>