PluginProbe
Advanced Excerpt / 4.2
Advanced Excerpt v4.2
trunk 0.2.2 3.0 3.1 4.0 4.1 4.1.1 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 All 30 releases
advanced-excerpt / template / options.php

options.php in Advanced Excerpt 4.2, at template/options.php

220 lines 9.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="wrap advanced-excerpt">
2 <h2><?php _e( "Advanced Excerpt Options", 'advanced-excerpt' ); ?></h2>
3 <?php if ( isset( $_GET['settings-updated'] ) ) : ?>
4 <div id="message" class="updated fade"><p><?php _e( 'Options saved.', 'advanced-excerpt' ); ?></p></div>
5 <?php endif; ?>
6
7 <div class="advanced-excerpt-container">
8
9 <div class="advanced-excerpt-main">
10
11 <form method="post" action="" autocomplete="off">
12 <?php if ( function_exists( 'wp_nonce_field' ) ) wp_nonce_field( 'advanced_excerpt_update_options' ); ?>
13 <table class="form-table">
14 <tr valign="top">
15 <th scope="row">
16 <label for="length">
17 <?php _e( "Excerpt Length:", 'advanced-excerpt' ); ?>
18 </label>
19 </th>
20 <td>
21 <input name="length" type="text" id="length" value="<?php echo $length; ?>" size="2" />
22 <select name="length_type">
23 <option value="characters"<?php echo ( 'characters' == $length_type ) ? ' selected="selected"' : ''; ?>><?php _e( "Characters", 'advanced-excerpt' ); ?></option>
24 <option value="words"<?php echo ( 'words' == $length_type ) ? ' selected="selected"' : ''; ?>><?php _e( "Words", 'advanced-excerpt' ); ?></option>
25 </select>
26 </td>
27 </tr>
28 <tr valign="top">
29 <th scope="row">
30 <label for="ellipsis">
31 <?php _e( "Ellipsis:", 'advanced-excerpt' ); ?>
32 </label>
33 </th>
34 <td>
35 <p>
36 <input name="ellipsis" type="text" id="ellipsis" value="<?php echo $ellipsis; ?>" size="5" />
37 <?php printf( __( '(use <a href="%s" target="_blank">HTML entities</a>)', 'advanced-excerpt' ), 'http://entitycode.com' ); ?>
38 </p>
39 <p class="description"><?php _e( "Will substitute the part of the post that is omitted in the excerpt.", 'advanced-excerpt' ); ?></p>
40 </td>
41 </tr>
42 <tr valign="top">
43 <th scope="row">
44 <?php _e( "Finish:", 'advanced-excerpt' ); ?>
45 </th>
46 <td>
47 <p>
48 <label for="finish-none">
49 <input type="radio" id="finish-none" name="finish" value="exact"<?php echo ( 'exact' == $finish ) ? ' checked="checked"' : ''; ?> />
50 <?php _e( "Exact", 'advanced-excerpt' ); ?>
51 </label><br />
52 <label for="finish-word">
53 <input type="radio" id="finish-word" name="finish" value="word"<?php echo ( 'word' == $finish ) ? ' checked="checked"' : ''; ?> />
54 <?php _e( "Word", 'advanced-excerpt' ); ?>
55 </label><br />
56 <label for="finish-sentence">
57 <input type="radio" id="finish-sentence" name="finish" value="sentence"<?php echo ( 'sentence' == $finish ) ? ' checked="checked"' : ''; ?> />
58 <?php _e( "Sentence", 'advanced-excerpt' ); ?>
59 </label>
60 </p>
61
62 <p class="description"><?php _e( "Prevents cutting a word or sentence at the end of an excerpt. This option can result in (slightly) longer excerpts.", 'advanced-excerpt' ); ?></p>
63 </td>
64 </tr>
65 <tr valign="top">
66 <th scope="row">
67 <?php _e( "Read More Link:", 'advanced-excerpt' ); ?>
68 </th>
69 <td>
70 <label for="add-link">
71 <input name="add_link" type="checkbox" id="add-link" value="on" <?php echo ( 1 == $add_link ) ? 'checked="checked"' : ''; ?> />
72 <?php _e( "Add read more link to excerpt", 'advanced-excerpt' ); ?>
73 </label><br />
74 <input name="read_more" type="text" id="read-more" value="<?php echo $read_more; ?>" <?php echo ( 1 !== $add_link ) ? 'disabled="disabled"' : ''; ?> />
75 </td>
76 </tr>
77 <tr valign="top">
78 <th scope="row">
79 <label for="no-custom">
80 <?php _e( "No Custom Excerpts:", 'advanced-excerpt' ); ?>
81 </label>
82 </th>
83 <td>
84 <label for="no-custom">
85 <input name="no_custom" type="checkbox" id="no-custom" value="on" <?php echo ( 1 == $no_custom ) ? 'checked="checked"' : ''; ?> />
86 <?php _e( "Generate excerpts even if a post has a custom excerpt attached.", 'advanced-excerpt' ); ?>
87 </label>
88 </td>
89 </tr>
90 <tr valign="top">
91 <th scope="row">
92 <label for="no-shortcode">
93 <?php _e( "Strip Shortcodes:", 'advanced-excerpt' ); ?>
94 </label>
95 </th>
96 <td>
97 <label for="no-shortcode">
98 <input name="no_shortcode" type="checkbox" id="no-shortcode" value="on" <?php echo ( 1 == $no_shortcode ) ? 'checked="checked"' : ''; ?> />
99 <?php _e( "Remove shortcodes from the excerpt. <em>(recommended)</em>", 'advanced-excerpt' ); ?>
100 </label>
101 </td>
102 </tr>
103 <tr valign="top">
104 <th scope="row">
105 <?php _e( "Filter:", 'advanced-excerpt' ); ?>
106 </th>
107 <td>
108 <p>
109 <label for="the-excerpt">
110 <input name="the_excerpt" type="checkbox" id="the-excerpt" value="on" <?php echo ( 1 == $the_excerpt ) ? 'checked="checked"' : ''; ?> />
111 <span class='monospaced'>the_excerpt()</span>
112 </label><br />
113 <label for="the-content">
114 <input name="the_content" type="checkbox" id="the-content" value="on" <?php echo ( 1 == $the_content ) ? 'checked="checked"' : ''; ?> />
115 <span class='monospaced'>the_content()</span>
116 </label>
117 </p>
118 <ul class="sub-options">
119 <li>
120 <label id="the-content-no-break-label" for="the-content-no-break" <?php echo ( 1 !== $the_content ) ? 'class="disabled"' : ''; ?>>
121 <input name="the_content_no_break" type="checkbox" id="the-content-no-break" value="on" <?php echo ( 1 == $the_content_no_break && 1 == $the_content ) ? 'checked="checked"' : ''; ?> <?php echo ( 1 !== $the_content ) ? 'disabled="disabled"' : ''; ?> />
122 <?php _e( "Only filter <span class='monospaced'>the_content()</span> when there's no break (&lt;!--more--&gt;) tag in the post content", 'advanced-excerpt' ); ?>
123 </label>
124 </li>
125 </ul>
126
127 <p class="description">
128 <?php _e( 'Themes may use <code>the_excerpt()</code> for some pages (e.g. search results) and <code>the_content()</code> on others (e.g. blog archives). Depending on your theme and what pages you want this plugin to affect, you may need to adjust these settings.', 'advanced-excerpt' ); ?>
129 </p>
130 </td>
131 </tr>
132 <tr valign="top">
133 <th scope="row">
134 <?php _e( "Disable On:", 'advanced-excerpt' ); ?>
135 </th>
136 <td>
137 <p>
138 <?php foreach ( $exclude_pages_list as $key => $label ) :
139 $key_dashed = str_replace( '_', '-', $key ); ?>
140 <label for="<?php echo $key_dashed; ?>">
141 <input name="exclude_pages[]" type="checkbox" id="<?php echo $key_dashed; ?>" value="<?php echo $key; ?>" <?php echo ( in_array( $key, $exclude_pages ) ) ? 'checked="checked"' : ''; ?> />
142 <?php echo $label; ?>
143 </label><br />
144 <?php endforeach; ?>
145 <p>
146
147 <p class="description">
148 <?php _e( 'Disables excerpt filtering for certain page types.', 'advanced-excerpt' ); ?>
149 </p>
150 </td>
151 </tr>
152 <tr valign="top">
153 <th scope="row">
154 <?php _e( "Strip Tags:", 'advanced-excerpt' ); ?>
155 </th>
156 <td>
157 <table id="tags-table">
158 <tr>
159 <td colspan="<?php echo $tag_cols; ?>">
160 <p>
161 <label for="dont-remove-any-tags">
162 <input name="allowed_tags_option" type="radio" id="dont-remove-any-tags" value="dont_remove_any" <?php echo ( 'dont_remove_any' == $allowed_tags_option ) ? 'checked="checked"' : ''; ?> />
163 <?php _e( "Don't remove any tags", 'advanced-excerpt' ); ?>
164 </label><br />
165 <label for="remove-all-tags-except">
166 <input name="allowed_tags_option" type="radio" id="remove-all-tags-except" value="remove_all_tags_except" <?php echo ( 'remove_all_tags_except' == $allowed_tags_option ) ? 'checked="checked"' : ''; ?> />
167 <?php _e( "Remove all tags except the following", 'advanced-excerpt' ); ?>
168 </label>
169 </p>
170 </td>
171 </tr>
172 <?php
173 $i = 0;
174 foreach ( $tag_list as $tag ) :
175 if ( 0 == $i % $tag_cols ) : ?>
176 <tr<?php echo ( 'dont_remove_any' == $allowed_tags_option ) ? ' style="display: none;"' : '' ?>>
177 <?php endif; $i++; ?>
178 <td>
179 <label for="<?php echo 'ae-' . $tag; ?>">
180 <input name="allowed_tags[]" type="checkbox" id="<?php echo 'ae-' . $tag; ?>" value="<?php echo $tag; ?>" <?php echo ( in_array( $tag, $allowed_tags ) ) ? 'checked="checked" ' : ''; ?> />
181 <code><?php echo $tag; ?></code>
182 </label>
183 </td>
184 <?php
185 if ( 0 == $i % $tag_cols ):
186 $i = 0;
187 echo '</tr>';
188 endif;
189 endforeach;
190 if ( 0 != $i % $tag_cols ): ?>
191 <td colspan="<?php echo $tag_cols - $i; ?>">&nbsp;</td>
192 </tr>
193 <?php endif; ?>
194 </table>
195
196 <div class="tags-control"<?php echo ( 'dont_remove_any' == $allowed_tags_option ) ? ' style="display: none;"' : '' ?>>
197 <a href="" id="select-all"><?php _e( "Select all", 'advanced-excerpt' ); ?></a> / <a href="" id="select-none"><?php _e( "Select none", 'advanced-excerpt' ); ?></a><br />
198 <?php _e( "More tags", 'advanced-excerpt' ); ?>
199 <select name="more_tags" id="more-tags">
200 <?php foreach ( array_diff( $this->options_all_tags, $this->options_basic_tags ) as $tag ) : ?>
201 <option value="<?php echo $tag; ?>"><?php echo $tag; ?></option>
202 <?php endforeach; ?>
203 </select>
204
205 <input type="button" name="add_tag" id="add-tag" class="button" value="<?php _e( "Add tag", 'advanced-excerpt' ); ?>" />
206 </div>
207
208 </td>
209 </tr>
210 </table>
211 <p class="submit"><input type="submit" name="Submit" class="button-primary" value="<?php _e( "Save Changes", 'advanced-excerpt' ); ?>" /></p>
212 </form>
213
214 </div>
215
216 <?php require_once $this->plugin_dir_path . 'template/sidebar.php'; ?>
217
218 </div>
219
220 </div>