PluginProbe ʕ •ᴥ•ʔ
WP Popular Posts / 3.0.2
WP Popular Posts v3.0.2
4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 5.0.0 5.0.1 5.0.2 5.1.0 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.4.0 5.4.1 5.4.2 5.5.0 5.5.1 6.0.0 6.0.1 6.0.2 6.0.3 6.0.4 6.0.5 6.1.0 6.1.1 6.1.2 6.1.3 6.1.4 6.2.0 6.2.1 6.3.0 6.3.1 6.3.2 6.3.3 6.3.4 6.4.0 6.4.1 6.4.2 7.0.0 7.0.1 7.1.0 7.2.0 7.3.0 7.3.1 7.3.2 7.3.3 7.3.4 7.3.5 7.3.6 7.3.7 7.3.8 7.4.0 trunk 2.3.7 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.2 4.0.3 4.0.5 4.0.6
wordpress-popular-posts / views / admin.php
wordpress-popular-posts / views Last commit date
admin.php 12 years ago form.php 12 years ago index.php 12 years ago
admin.php
725 lines
1 <?php
2 if (basename($_SERVER['SCRIPT_NAME']) == basename(__FILE__))
3 exit('Please do not load this page directly');
4
5 define('WPP_ADMIN', true);
6
7 // Set active tab
8 if ( isset($_GET['tab']) )
9 $current = $_GET['tab'];
10 else
11 $current = 'stats';
12
13 // Update options on form submission
14 if ( isset($_POST['section']) ) {
15
16 if ( "stats" == $_POST['section'] ) {
17 $current = 'stats';
18
19 $this->user_settings['stats']['order_by'] = $_POST['stats_order'];
20 $this->user_settings['stats']['limit'] = (is_numeric($_POST['stats_limit']) && $_POST['stats_limit'] > 0) ? $_POST['stats_limit'] : 10;
21 $this->user_settings['stats']['post_type'] = empty($_POST['stats_type']) ? "post,page" : $_POST['stats_type'];
22 $this->user_settings['stats']['freshness'] = empty($_POST['stats_freshness']) ? false : $_POST['stats_freshness'];
23
24 update_site_option('wpp_settings_config', $this->user_settings);
25 echo "<div class=\"updated\"><p><strong>" . __('Settings saved.', $this->plugin_slug ) . "</strong></p></div>";
26 }
27 elseif ( "misc" == $_POST['section'] ) {
28 $current = 'tools';
29
30 $this->user_settings['tools']['link']['target'] = $_POST['link_target'];
31 $this->user_settings['tools']['css'] = $_POST['css'];
32
33 update_site_option('wpp_settings_config', $this->user_settings);
34 echo "<div class=\"updated\"><p><strong>" . __('Settings saved.', $this->plugin_slug ) . "</strong></p></div>";
35 }
36 elseif ( "thumb" == $_POST['section'] ) {
37 $current = 'tools';
38
39 if ($_POST['thumb_source'] == "custom_field" && (!isset($_POST['thumb_field']) || empty($_POST['thumb_field']))) {
40 echo '<div id="wpp-message" class="error fade"><p>'.__('Please provide the name of your custom field.', $this->plugin_slug).'</p></div>';
41 } else {
42 $this->user_settings['tools']['thumbnail']['source'] = $_POST['thumb_source'];
43 $this->user_settings['tools']['thumbnail']['field'] = ( !empty( $_POST['thumb_field']) ) ? $_POST['thumb_field'] : "wpp_thumbnail";
44 $this->user_settings['tools']['thumbnail']['default'] = ( !empty( $_POST['upload_thumb_src']) ) ? $_POST['upload_thumb_src'] : "";
45 $this->user_settings['tools']['thumbnail']['resize'] = $_POST['thumb_field_resize'];
46
47 update_site_option('wpp_settings_config', $this->user_settings);
48 echo "<div class=\"updated\"><p><strong>" . __('Settings saved.', $this->plugin_slug ) . "</strong></p></div>";
49 }
50 }
51 elseif ( "data" == $_POST['section'] ) {
52 $current = 'tools';
53
54 $this->user_settings['tools']['log']['level'] = $_POST['log_option'];
55 $this->user_settings['tools']['ajax'] = $_POST['ajax'];
56
57 // if any of the caching settings was updated, destroy all transients created by the plugin
58 if ( $this->user_settings['tools']['cache']['active'] != $_POST['cache'] || $this->user_settings['tools']['cache']['interval']['time'] != $_POST['cache_interval_time'] || $this->user_settings['tools']['cache']['interval']['value'] != $_POST['cache_interval_value'] ) {
59 $this->__flush_transients();
60 }
61
62 $this->user_settings['tools']['cache']['active'] = $_POST['cache'];
63 $this->user_settings['tools']['cache']['interval']['time'] = $_POST['cache_interval_time'];
64 $this->user_settings['tools']['cache']['interval']['value'] = ( isset($_POST['cache_interval_value']) && is_numeric($_POST['cache_interval_value']) && $_POST['cache_interval_value'] > 0 )
65 ? $_POST['cache_interval_value']
66 : 1;
67
68 update_site_option('wpp_settings_config', $this->user_settings);
69 echo "<div class=\"updated\"><p><strong>" . __('Settings saved.', $this->plugin_slug ) . "</strong></p></div>";
70 }
71
72 }
73
74 $rand = md5(uniqid(rand(), true));
75 $wpp_rand = get_site_option("wpp_rand");
76 if (empty($wpp_rand)) {
77 add_site_option("wpp_rand", $rand);
78 } else {
79 update_site_option("wpp_rand", $rand);
80 }
81
82 ?>
83 <script type="text/javascript">
84 // TOOLS
85 function confirm_reset_cache() {
86 if (confirm("<?php _e("This operation will delete all entries from Wordpress Popular Posts' cache table and cannot be undone.", $this->plugin_slug); ?> \n" + "<?php _e("Do you want to continue?", $this->plugin_slug); ?>")) {
87 jQuery.post(ajaxurl, {action: 'wpp_clear_data', token: '<?php echo get_site_option("wpp_rand"); ?>', clear: 'cache'}, function(data){
88 alert(data);
89 });
90 }
91 }
92
93 function confirm_reset_all() {
94 if (confirm("<?php _e("This operation will delete all stored info from Wordpress Popular Posts' data tables and cannot be undone.", $this->plugin_slug); ?> \n" + "<?php _e("Do you want to continue?", $this->plugin_slug); ?>")) {
95 jQuery.post(ajaxurl, {action: 'wpp_clear_data', token: '<?php echo get_site_option("wpp_rand"); ?>', clear: 'all'}, function(data){
96 alert(data);
97 });
98 }
99 }
100
101 </script>
102
103 <div class="wrap">
104 <div id="icon-options-general" class="icon32"><br /></div>
105 <h2>Wordpress Popular Posts</h2>
106
107 <h2 class="nav-tab-wrapper">
108 <?php
109 // build tabs
110 $tabs = array(
111 'stats' => __('Stats', $this->plugin_slug),
112 'tools' => __('Tools', $this->plugin_slug),
113 'params' => __('Parameters', $this->plugin_slug),
114 'faq' => __('FAQ', $this->plugin_slug),
115 'about' => __('About', $this->plugin_slug)
116 );
117 foreach( $tabs as $tab => $name ){
118 $class = ( $tab == $current ) ? ' nav-tab-active' : '';
119 echo "<a class='nav-tab$class' href='?page=wordpress-popular-posts&tab=$tab'>$name</a>";
120 }
121 ?>
122 </h2>
123
124 <!-- Start stats -->
125 <div id="wpp_stats" class="wpp_boxes"<?php if ( "stats" == $current ) {?> style="display:block;"<?php } ?>>
126 <p><?php _e("Click on each tab to see what are the most popular entries on your blog in the last 24 hours, this week, last 30 days or all time since Wordpress Popular Posts was installed.", $this->plugin_slug); ?></p>
127
128 <div class="tablenav top">
129 <div class="alignleft actions">
130 <form action="" method="post" id="wpp_stats_options" name="wpp_stats_options">
131 <select name="stats_order">
132 <option <?php if ($this->user_settings['stats']['order_by'] == "comments") {?>selected="selected"<?php } ?> value="comments"><?php _e("Order by comments", $this->plugin_slug); ?></option>
133 <option <?php if ($this->user_settings['stats']['order_by'] == "views") {?>selected="selected"<?php } ?> value="views"><?php _e("Order by views", $this->plugin_slug); ?></option>
134 <option <?php if ($this->user_settings['stats']['order_by'] == "avg") {?>selected="selected"<?php } ?> value="avg"><?php _e("Order by avg. daily views", $this->plugin_slug); ?></option>
135 </select>
136 <label for="stats_type"><?php _e("Post type", $this->plugin_slug); ?>:</label> <input type="text" name="stats_type" value="<?php echo $this->user_settings['stats']['post_type']; ?>" size="15" />
137 <label for="stats_limits"><?php _e("Limit", $this->plugin_slug); ?>:</label> <input type="text" name="stats_limit" value="<?php echo $this->user_settings['stats']['limit']; ?>" size="5" />
138 &nbsp;&nbsp;&nbsp;<label for="stats_freshness"><input type="checkbox" class="checkbox" <?php echo ($this->user_settings['stats']['freshness']) ? 'checked="checked"' : ''; ?> id="stats_freshness" name="stats_freshness" /> <?php _e('Display only posts published within the selected Time Range', 'wordpress-popular-posts'); ?></label>&nbsp;&nbsp;&nbsp;&nbsp;
139 <input type="hidden" name="section" value="stats" />
140 <input type="submit" class="button-secondary action" value="<?php _e("Apply", $this->plugin_slug); ?>" name="" />
141 </form>
142 </div>
143 </div>
144 <br />
145 <div id="wpp-stats-tabs">
146 <a href="#" class="button-primary" rel="wpp-daily"><?php _e("Last 24 hours", $this->plugin_slug); ?></a>
147 <a href="#" class="button-secondary" rel="wpp-weekly"><?php _e("Last 7 days", $this->plugin_slug); ?></a>
148 <a href="#" class="button-secondary" rel="wpp-monthly"><?php _e("Last 30 days", $this->plugin_slug); ?></a>
149 <a href="#" class="button-secondary" rel="wpp-all"><?php _e("All-time", $this->plugin_slug); ?></a>
150 </div>
151 <div id="wpp-stats-canvas">
152 <div class="wpp-stats wpp-stats-active" id="wpp-daily">
153 <?php echo do_shortcode("[wpp range='daily' post_type='".$this->user_settings['stats']['post_type']."' stats_comments=1 stats_views=1 order_by='".$this->user_settings['stats']['order_by']."' wpp_start='<ol>' wpp_end='</ol>' post_html='<li>{title} <span class=\"post-stats\">{stats}</span></li>' limit=".$this->user_settings['stats']['limit']." freshness=" . $this->user_settings['stats']['freshness'] . "]"); ?>
154 </div>
155 <div class="wpp-stats" id="wpp-weekly">
156 <?php echo do_shortcode("[wpp range='weekly' post_type='".$this->user_settings['stats']['post_type']."' stats_comments=1 stats_views=1 order_by='".$this->user_settings['stats']['order_by']."' wpp_start='<ol>' wpp_end='</ol>' post_html='<li>{title} <span class=\"post-stats\">{stats}</span></li>' limit=".$this->user_settings['stats']['limit']." freshness=" . $this->user_settings['stats']['freshness'] . "]"); ?>
157 </div>
158 <div class="wpp-stats" id="wpp-monthly">
159 <?php echo do_shortcode("[wpp range='monthly' post_type='".$this->user_settings['stats']['post_type']."' stats_comments=1 stats_views=1 order_by='".$this->user_settings['stats']['order_by']."' wpp_start='<ol>' wpp_end='</ol>' post_html='<li>{title} <span class=\"post-stats\">{stats}</span></li>' limit=".$this->user_settings['stats']['limit']." freshness=" . $this->user_settings['stats']['freshness'] . "]"); ?>
160 </div>
161 <div class="wpp-stats" id="wpp-all">
162 <?php echo do_shortcode("[wpp range='all' post_type='".$this->user_settings['stats']['post_type']."' stats_comments=1 stats_views=1 order_by='".$this->user_settings['stats']['order_by']."' wpp_start='<ol>' wpp_end='</ol>' post_html='<li>{title} <span class=\"post-stats\">{stats}</span></li>' limit=".$this->user_settings['stats']['limit']." freshness=" . $this->user_settings['stats']['freshness'] . "]"); ?>
163 </div>
164 </div>
165 </div>
166 <!-- End stats -->
167
168 <!-- Start tools -->
169 <div id="wpp_tools" class="wpp_boxes"<?php if ( "tools" == $current ) {?> style="display:block;"<?php } ?>>
170
171 <h3 class="wmpp-subtitle"><?php _e("Thumbnails", $this->plugin_slug); ?></h3>
172 <form action="" method="post" id="wpp_thumbnail_options" name="wpp_thumbnail_options">
173 <table class="form-table">
174 <tbody>
175 <tr valign="top">
176 <th scope="row"><label for="thumb_default"><?php _e("Default thumbnail", $this->plugin_slug); ?>:</label></th>
177 <td>
178 <div id="thumb-review">
179 <img src="<?php echo $this->user_settings['tools']['thumbnail']['default']; ?>" alt="" border="0" />
180 </div>
181 <input id="upload_thumb_button" type="button" class="button" value="<?php _e( "Upload thumbnail", $this->plugin_slug ); ?>" />
182 <input type="hidden" id="upload_thumb_src" name="upload_thumb_src" value="" />
183 <br /><br />
184 <p class="description"><?php _e("How-to: upload (or select) an image, set Size to Full and click on Upload. After it's done, hit on Apply to save changes", $this->plugin_slug); ?></p>
185 </td>
186 </tr>
187 <tr valign="top">
188 <th scope="row"><label for="thumb_source"><?php _e("Pick image from", $this->plugin_slug); ?>:</label></th>
189 <td>
190 <select name="thumb_source" id="thumb_source">
191 <option <?php if ($this->user_settings['tools']['thumbnail']['source'] == "featured") {?>selected="selected"<?php } ?> value="featured"><?php _e("Featured image", $this->plugin_slug); ?></option>
192 <option <?php if ($this->user_settings['tools']['thumbnail']['source'] == "first_image") {?>selected="selected"<?php } ?> value="first_image"><?php _e("First image on post", $this->plugin_slug); ?></option>
193 <option <?php if ($this->user_settings['tools']['thumbnail']['source'] == "custom_field") {?>selected="selected"<?php } ?> value="custom_field"><?php _e("Custom field", $this->plugin_slug); ?></option>
194 </select>
195 <br />
196 <p class="description"><?php _e("Tell Wordpress Popular Posts where it should get thumbnails from", $this->plugin_slug); ?></p>
197 </td>
198 </tr>
199 <tr valign="top" <?php if ($this->user_settings['tools']['thumbnail']['source'] != "custom_field") {?>style="display:none;"<?php } ?> id="row_custom_field">
200 <th scope="row"><label for="thumb_field"><?php _e("Custom field name", $this->plugin_slug); ?>:</label></th>
201 <td>
202 <input type="text" id="thumb_field" name="thumb_field" value="<?php echo $this->user_settings['tools']['thumbnail']['field']; ?>" size="10" <?php if ($this->user_settings['tools']['thumbnail']['source'] != "custom_field") {?>style="display:none;"<?php } ?> />
203 </td>
204 </tr>
205 <tr valign="top" <?php if ($this->user_settings['tools']['thumbnail']['source'] != "custom_field") {?>style="display:none;"<?php } ?> id="row_custom_field_resize">
206 <th scope="row"><label for="thumb_field_resize"><?php _e("Resize image from Custom field?", $this->plugin_slug); ?>:</label></th>
207 <td>
208 <select name="thumb_field_resize" id="thumb_field_resize">
209 <option <?php if ( !$this->user_settings['tools']['thumbnail']['resize'] ) {?>selected="selected"<?php } ?> value="0"><?php _e("No, I will upload my own thumbnail", $this->plugin_slug); ?></option>
210 <option <?php if ( $this->user_settings['tools']['thumbnail']['resize'] == 1 ) {?>selected="selected"<?php } ?> value="1"><?php _e("Yes", $this->plugin_slug); ?></option>
211 </select>
212 </td>
213 </tr>
214 <tr valign="top">
215 <td colspan="2">
216 <input type="hidden" name="section" value="thumb" />
217 <input type="submit" class="button-secondary action" id="btn_th_ops" value="<?php _e("Apply", $this->plugin_slug); ?>" name="" />
218 </td>
219 </tr>
220 </tbody>
221 </table>
222 </form>
223 <br />
224 <p style="display:block; float:none; clear:both">&nbsp;</p>
225
226 <h3 class="wmpp-subtitle"><?php _e("Data", $this->plugin_slug); ?></h3>
227 <form action="" method="post" id="wpp_ajax_options" name="wpp_ajax_options">
228 <table class="form-table">
229 <tbody>
230 <tr valign="top">
231 <th scope="row"><label for="log_option"><?php _e("Log views from", $this->plugin_slug); ?>:</label></th>
232 <td>
233 <select name="log_option" id="log_option">
234 <option <?php if ($this->user_settings['tools']['log']['level'] == 0) {?>selected="selected"<?php } ?> value="0"><?php _e("Visitors only", $this->plugin_slug); ?></option>
235 <option <?php if ($this->user_settings['tools']['log']['level'] == 2) {?>selected="selected"<?php } ?> value="2"><?php _e("Logged-in users only", $this->plugin_slug); ?></option>
236 <option <?php if ($this->user_settings['tools']['log']['level'] == 1) {?>selected="selected"<?php } ?> value="1"><?php _e("Everyone", $this->plugin_slug); ?></option>
237 </select>
238 <br />
239 </td>
240 </tr>
241 <tr valign="top">
242 <th scope="row"><label for="ajax"><?php _e("Ajaxify widget", $this->plugin_slug); ?>:</label></th>
243 <td>
244 <select name="ajax" id="ajax">
245 <option <?php if (!$this->user_settings['tools']['ajax']) {?>selected="selected"<?php } ?> value="0"><?php _e("Disabled", $this->plugin_slug); ?></option>
246 <option <?php if ($this->user_settings['tools']['ajax']) {?>selected="selected"<?php } ?> value="1"><?php _e("Enabled", $this->plugin_slug); ?></option>
247 </select>
248
249 <br />
250 <p class="description"><?php _e("If you are using a caching plugin such as WP Super Cache, enabling this feature will keep the popular list from being cached by it", $this->plugin_slug); ?></p>
251 </td>
252 </tr>
253 <tr valign="top">
254 <th scope="row"><label for="cache"><?php _e("Listing refresh interval", $this->plugin_slug); ?>:</label></th>
255 <td>
256 <select name="cache" id="cache">
257 <option <?php if ( !$this->user_settings['tools']['cache']['active'] ) { ?>selected="selected"<?php } ?> value="0"><?php _e("Live", $this->plugin_slug); ?></option>
258 <option <?php if ( $this->user_settings['tools']['cache']['active'] ) { ?>selected="selected"<?php } ?> value="1"><?php _e("Custom interval", $this->plugin_slug); ?></option>
259 </select>
260
261 <br />
262 <p class="description"><?php _e("Sets how often the listing should be updated. For most sites the Live option should be fine, however if you are experiencing slowdowns or your blog gets a lot of visitors then you might want to change the refresh rate", $this->plugin_slug); ?></p>
263 </td>
264 </tr>
265 <tr valign="top" <?php if ( !$this->user_settings['tools']['cache']['active'] ) { ?>style="display:none;"<?php } ?> id="cache_refresh_interval">
266 <th scope="row"><label for="cache_interval_value"><?php _e("Refresh list every", $this->plugin_slug); ?>:</label></th>
267 <td>
268 <input name="cache_interval_value" type="text" id="cache_interval_value" value="<?php echo ( isset($this->user_settings['tools']['cache']['interval']['value']) ) ? (int) $this->user_settings['tools']['cache']['interval']['value'] : 1; ?>" class="small-text">
269 <select name="cache_interval_time" id="cache_interval_time">
270 <option <?php if ($this->user_settings['tools']['cache']['interval']['time'] == "hour") {?>selected="selected"<?php } ?> value="hour"><?php _e("Hour(s)", $this->plugin_slug); ?></option>
271 <option <?php if ($this->user_settings['tools']['cache']['interval']['time'] == "day") {?>selected="selected"<?php } ?> value="day"><?php _e("Day(s)", $this->plugin_slug); ?></option>
272 <option <?php if ($this->user_settings['tools']['cache']['interval']['time'] == "week") {?>selected="selected"<?php } ?> value="week"><?php _e("Week(s)", $this->plugin_slug); ?></option>
273 <option <?php if ($this->user_settings['tools']['cache']['interval']['time'] == "month") {?>selected="selected"<?php } ?> value="month"><?php _e("Month(s)", $this->plugin_slug); ?></option>
274 <option <?php if ($this->user_settings['tools']['cache']['interval']['time'] == "year") {?>selected="selected"<?php } ?> value="month"><?php _e("Year(s)", $this->plugin_slug); ?></option>
275 </select>
276 <br />
277 <p class="description" style="display:none;" id="cache_too_long"><?php _e("Really? That long?", $this->plugin_slug); ?></p>
278 </td>
279 </tr>
280 <tr valign="top">
281 <td colspan="2">
282 <input type="hidden" name="section" value="data" />
283 <input type="submit" class="button-secondary action" id="btn_ajax_ops" value="<?php _e("Apply", $this->plugin_slug); ?>" name="" />
284 </td>
285 </tr>
286 </tbody>
287 </table>
288 </form>
289 <br />
290 <p style="display:block; float:none; clear:both">&nbsp;</p>
291
292 <h3 class="wmpp-subtitle"><?php _e("Miscellaneous", $this->plugin_slug); ?></h3>
293 <form action="" method="post" id="wpp_link_options" name="wpp_link_options">
294 <table class="form-table">
295 <tbody>
296 <tr valign="top">
297 <th scope="row"><label for="link_target"><?php _e("Open links in", $this->plugin_slug); ?>:</label></th>
298 <td>
299 <select name="link_target" id="link_target">
300 <option <?php if ( $this->user_settings['tools']['link']['target'] == '_self' ) {?>selected="selected"<?php } ?> value="_self"><?php _e("Current window", $this->plugin_slug); ?></option>
301 <option <?php if ( $this->user_settings['tools']['link']['target'] == '_blank' ) {?>selected="selected"<?php } ?> value="_blank"><?php _e("New tab/window", $this->plugin_slug); ?></option>
302 </select>
303 <br />
304 </td>
305 </tr>
306 <tr valign="top">
307 <th scope="row"><label for="css"><?php _e("Use plugin's stylesheet", $this->plugin_slug); ?>:</label></th>
308 <td>
309 <select name="css" id="css">
310 <option <?php if ($this->user_settings['tools']['css']) {?>selected="selected"<?php } ?> value="1"><?php _e("Enabled", $this->plugin_slug); ?></option>
311 <option <?php if (!$this->user_settings['tools']['css']) {?>selected="selected"<?php } ?> value="0"><?php _e("Disabled", $this->plugin_slug); ?></option>
312 </select>
313 <br />
314 <p class="description"><?php _e("By default, the plugin includes a stylesheet called wpp.css which you can use to style your popular posts listing. If you wish to use your own stylesheet or do not want it to have it included in the header section of your site, use this.", $this->plugin_slug); ?></p>
315 </td>
316 </tr>
317 <tr valign="top">
318 <td colspan="2">
319 <input type="hidden" name="section" value="misc" />
320 <input type="submit" class="button-secondary action" value="<?php _e("Apply", $this->plugin_slug); ?>" name="" />
321 </td>
322 </tr>
323 </tbody>
324 </table>
325 </form>
326 <br />
327 <p style="display:block; float:none; clear:both">&nbsp;</p>
328
329 <br /><br />
330
331 <p><?php _e('Wordpress Popular Posts maintains data in two separate tables: one for storing the most popular entries on a daily basis (from now on, "cache"), and another one to keep the All-time data (from now on, "historical data" or just "data"). If for some reason you need to clear the cache table, or even both historical and cache tables, please use the buttons below to do so.', $this->plugin_slug) ?></p>
332 <p><input type="button" name="wpp-reset-cache" id="wpp-reset-cache" class="button-secondary" value="<?php _e("Empty cache", $this->plugin_slug); ?>" onclick="confirm_reset_cache()" /> <label for="wpp-reset-cache"><small><?php _e('Use this button to manually clear entries from WPP cache only', $this->plugin_slug); ?></small></label></p>
333 <p><input type="button" name="wpp-reset-all" id="wpp-reset-all" class="button-secondary" value="<?php _e("Clear all data", $this->plugin_slug); ?>" onclick="confirm_reset_all()" /> <label for="wpp-reset-all"><small><?php _e('Use this button to manually clear entries from all WPP data tables', $this->plugin_slug); ?></small></label></p>
334 </div>
335 <!-- End tools -->
336
337 <!-- Start params -->
338 <div id="wpp_params" class="wpp_boxes"<?php if ( "params" == $current ) {?> style="display:block;"<?php } ?>>
339 <div>
340 <p><?php printf( __('With the following parameters you can customize the popular posts list when using either the <a href="%1$s">wpp_get_most_popular() template tag</a> or the <a href="%2$s">[wpp] shortcode</a>.', $this->plugin_slug),
341 admin_url('options-general.php?page=wordpress-popular-posts&tab=faq#template-tags'),
342 admin_url('options-general.php?page=wordpress-popular-posts&tab=faq#shortcode')
343 ); ?></p>
344 <br />
345 <table cellspacing="0" class="wp-list-table widefat fixed posts">
346 <thead>
347 <tr>
348 <th class="manage-column column-title"><?php _e('Parameter', $this->plugin_slug); ?></th>
349 <th class="manage-column column-title"><?php _e('What it does ', $this->plugin_slug); ?></th>
350 <th class="manage-column column-title"><?php _e('Possible values', $this->plugin_slug); ?></th>
351 <th class="manage-column column-title"><?php _e('Defaults to', $this->plugin_slug); ?></th>
352 <th class="manage-column column-title"><?php _e('Example', $this->plugin_slug); ?></th>
353 </tr>
354 </thead>
355 <tbody>
356 <tr>
357 <td><strong>header</strong></td>
358 <td><?php _e('Sets a heading for the list', $this->plugin_slug); ?></td>
359 <td><?php _e('Text string', $this->plugin_slug); ?></td>
360 <td><?php _e('Popular Posts', $this->plugin_slug); ?></td>
361 <td>header="Popular Posts"</td>
362 </tr>
363 <tr class="alternate">
364 <td><strong>header_start</strong></td>
365 <td><?php _e('Set the opening tag for the heading of the list', $this->plugin_slug); ?></td>
366 <td><?php _e('Text string', $this->plugin_slug); ?></td>
367 <td>&lt;h2&gt;</td>
368 <td>header_start="&lt;h2&gt;"</td>
369 </tr>
370 <tr>
371 <td><strong>header_end</strong></td>
372 <td><?php _e('Set the closing tag for the heading of the list', $this->plugin_slug); ?></td>
373 <td><?php _e('Text string', $this->plugin_slug); ?></td>
374 <td>&lt;/h2&gt;</td>
375 <td>header_end="&lt;/h2&gt;"</td>
376 </tr>
377 <tr class="alternate">
378 <td><strong>limit</strong></td>
379 <td><?php _e('Sets the maximum number of popular posts to be shown on the listing', $this->plugin_slug); ?></td>
380 <td><?php _e('Positive integer', $this->plugin_slug); ?></td>
381 <td>10</td>
382 <td>limit=10</td>
383 </tr>
384 <tr>
385 <td><strong>range</strong></td>
386 <td><?php _e('Tells Wordpress Popular Posts to retrieve the most popular entries within the time range specified by you', $this->plugin_slug); ?></td>
387 <td>"daily", "weekly", "monthly", "all"</td>
388 <td>daily</td>
389 <td>range="daily"</td>
390 </tr>
391 <tr class="alternate">
392 <td><strong>freshness</strong></td>
393 <td><?php _e('Tells Wordpress Popular Posts to retrieve the most popular entries published within the time range specified by you', $this->plugin_slug); ?></td>
394 <td>1 (true), 0 (false)</td>
395 <td>0</td>
396 <td>freshness=1</td>
397 </tr>
398 <tr>
399 <td><strong>order_by</strong></td>
400 <td><?php _e('Sets the sorting option of the popular posts', $this->plugin_slug); ?></td>
401 <td>"comments", "views", "avg" <?php _e('(for average views per day)', $this->plugin_slug); ?></td>
402 <td>views</td>
403 <td>order_by="comments"</td>
404 </tr>
405 <tr class="alternate">
406 <td><strong>post_type</strong></td>
407 <td><?php _e('Defines the type of posts to show on the listing', $this->plugin_slug); ?></td>
408 <td><?php _e('Text string', $this->plugin_slug); ?></td>
409 <td>post,page</td>
410 <td>post_type=post,page,your-custom-post-type</td>
411 </tr>
412 <tr>
413 <td><strong>pid</strong></td>
414 <td><?php _e('If set, Wordpress Popular Posts will exclude the specified post(s) ID(s) form the listing.', $this->plugin_slug); ?></td>
415 <td><?php _e('Text string', $this->plugin_slug); ?></td>
416 <td><?php _e('None', $this->plugin_slug); ?></td>
417 <td>pid="60,25,31"</td>
418 </tr>
419 <tr class="alternate">
420 <td><strong>cat</strong></td>
421 <td><?php _e('If set, Wordpress Popular Posts will retrieve all entries that belong to the specified category(ies) ID(s). If a minus sign is used, the category(ies) will be excluded instead.', $this->plugin_slug); ?></td>
422 <td><?php _e('Text string', $this->plugin_slug); ?></td>
423 <td><?php _e('None', $this->plugin_slug); ?></td>
424 <td>cat="1,55,-74"</td>
425 </tr>
426 <tr>
427 <td><strong>author</strong></td>
428 <td><?php _e('If set, Wordpress Popular Posts will retrieve all entries created by specified author(s) ID(s).', $this->plugin_slug); ?></td>
429 <td><?php _e('Text string', $this->plugin_slug); ?></td>
430 <td><?php _e('None', $this->plugin_slug); ?></td>
431 <td>author="75,8,120"</td>
432 </tr>
433 <tr class="alternate">
434 <td><strong>title_length</strong></td>
435 <td><?php _e('If set, Wordpress Popular Posts will shorten each post title to "n" characters whenever possible', $this->plugin_slug); ?></td>
436 <td><?php _e('Positive integer', $this->plugin_slug); ?></td>
437 <td>25</td>
438 <td>title_length=25</td>
439 </tr>
440 <tr>
441 <td><strong>title_by_words</strong></td>
442 <td><?php _e('If set to 1, Wordpress Popular Posts will shorten each post title to "n" words instead of characters', $this->plugin_slug); ?></td>
443 <td>1 (true), (0) false</td>
444 <td>0</td>
445 <td>title_by_words=1</td>
446 </tr>
447 <tr class="alternate">
448 <td><strong>excerpt_length</strong></td>
449 <td><?php _e('If set, Wordpress Popular Posts will build and include an excerpt of "n" characters long from the content of each post listed as popular', $this->plugin_slug); ?></td>
450 <td><?php _e('Positive integer', $this->plugin_slug); ?></td>
451 <td>0</td>
452 <td>excerpt_length=55</td>
453 </tr>
454 <tr>
455 <td><strong>excerpt_format</strong></td>
456 <td><?php _e('If set, Wordpress Popular Posts will maintaing all styling tags (strong, italic, etc) and hyperlinks found in the excerpt', $this->plugin_slug); ?></td>
457 <td>1 (true), (0) false</td>
458 <td>0</td>
459 <td>excerpt_format=1</td>
460 </tr>
461 <tr class="alternate">
462 <td><strong>excerpt_by_words</strong></td>
463 <td><?php _e('If set to 1, Wordpress Popular Posts will shorten the excerpt to "n" words instead of characters', $this->plugin_slug); ?></td>
464 <td>1 (true), (0) false</td>
465 <td>0</td>
466 <td>excerpt_by_words=1</td>
467 </tr>
468 <tr>
469 <td><strong>thumbnail_width</strong></td>
470 <td><?php _e('If set, and if your current server configuration allows it, you will be able to display thumbnails of your posts. This attribute sets the width for thumbnails', $this->plugin_slug); ?></td>
471 <td><?php _e('Positive integer', $this->plugin_slug); ?></td>
472 <td>15</td>
473 <td>thumbnail_width=30</td>
474 </tr>
475 <tr class="alternate">
476 <td><strong>thumbnail_height</strong></td>
477 <td><?php _e('If set, and if your current server configuration allows it, you will be able to display thumbnails of your posts. This attribute sets the height for thumbnails', $this->plugin_slug); ?></td>
478 <td><?php _e('Positive integer', $this->plugin_slug); ?></td>
479 <td>15</td>
480 <td>thumbnail_height=30</td>
481 </tr>
482 <tr>
483 <td><strong>rating</strong></td>
484 <td><?php _e('If set, and if the WP-PostRatings plugin is installed and enabled on your blog, Wordpress Popular Posts will show how your visitors are rating your entries', $this->plugin_slug); ?></td>
485 <td>1 (true), (0) false</td>
486 <td>0</td>
487 <td>rating=1</td>
488 </tr>
489 <tr class="alternate">
490 <td><strong>stats_comments</strong></td>
491 <td><?php _e('If set, Wordpress Popular Posts will show how many comments each popular post has got until now', $this->plugin_slug); ?></td>
492 <td>1 (true), 0 (false)</td>
493 <td>1</td>
494 <td>stats_comments=1</td>
495 </tr>
496 <tr>
497 <td><strong>stats_views</strong></td>
498 <td><?php _e('If set, Wordpress Popular Posts will show how many views each popular post has got since it was installed', $this->plugin_slug); ?></td>
499 <td>1 (true), (0) false</td>
500 <td>0</td>
501 <td>stats_views=1</td>
502 </tr>
503 <tr class="alternate">
504 <td><strong>stats_author</strong></td>
505 <td><?php _e('If set, Wordpress Popular Posts will show who published each popular post on the list', $this->plugin_slug); ?></td>
506 <td>1 (true), (0) false</td>
507 <td>0</td>
508 <td>stats_author=1</td>
509 </tr>
510 <tr>
511 <td><strong>stats_date</strong></td>
512 <td><?php _e('If set, Wordpress Popular Posts will display the date when each popular post on the list was published', $this->plugin_slug); ?></td>
513 <td>1 (true), (0) false</td>
514 <td>0</td>
515 <td>stats_date=1</td>
516 </tr>
517 <tr class="alternate">
518 <td><strong>stats_date_format</strong></td>
519 <td><?php _e('Sets the date format', $this->plugin_slug); ?></td>
520 <td><?php _e('Text string', $this->plugin_slug); ?></td>
521 <td>0</td>
522 <td>stats_date_format='F j, Y'</td>
523 </tr>
524 <tr>
525 <td><strong>stats_category</strong></td>
526 <td><?php _e('If set, Wordpress Popular Posts will display the category', $this->plugin_slug); ?></td>
527 <td>1 (true), (0) false</td>
528 <td>0</td>
529 <td>stats_category=1</td>
530 </tr>
531 <tr class="alternate">
532 <td><strong>wpp_start</strong></td>
533 <td><?php _e('Sets the opening tag for the listing', $this->plugin_slug); ?></td>
534 <td><?php _e('Text string', $this->plugin_slug); ?></td>
535 <td>&lt;ul&gt;</td>
536 <td>wpp_start="&lt;ul&gt;"</td>
537 </tr>
538 <tr>
539 <td><strong>wpp_end</strong></td>
540 <td><?php _e('Sets the closing tag for the listing', $this->plugin_slug); ?></td>
541 <td><?php _e('Text string', $this->plugin_slug); ?></td>
542 <td>&lt;/ul&gt;</td>
543 <td>wpp_end="&lt;/ul&gt;"</td>
544 </tr>
545 <tr class="alternate">
546 <td><strong>post_html</strong></td>
547 <td><?php _e('Sets the HTML structure of each post', $this->plugin_slug); ?></td>
548 <td><?php _e('Text string, custom HTML', $this->plugin_slug); ?>.<br /><br /><strong><?php _e('Available Content Tags', $this->plugin_slug); ?>:</strong> <br /><em>{thumb}</em> (<?php _e('displays thumbnail linked to post/page', $this->plugin_slug); ?>)<br /> <em>{title}</em> (<?php _e('displays linked post/page title', $this->plugin_slug); ?>)<br /> <em>{summary}</em> (<?php _e('displays post/page excerpt, and requires excerpt_length to be greater than 0', $this->plugin_slug); ?>)<br /> <em>{stats}</em> (<?php _e('displays the default stats tags', $this->plugin_slug); ?>)<br /> <em>{rating}</em> (<?php _e('displays post/page current rating, requires WP-PostRatings installed and enabled', $this->plugin_slug); ?>)<br /> <em>{score}</em> (<?php _e('displays post/page current rating as an integer, requires WP-PostRatings installed and enabled', $this->plugin_slug); ?>)<br /> <em>{url}</em> (<?php _e('outputs the URL of the post/page', $this->plugin_slug); ?>)<br /> <em>{text_title}</em> (<?php _e('displays post/page title, no link', $this->plugin_slug); ?>)<br /> <em>{author}</em> (<?php _e('displays linked author name, requires stats_author=1', $this->plugin_slug); ?>)<br /> <em>{category}</em> (<?php _e('displays linked category name, requires stats_category=1', $this->plugin_slug); ?>)<br /> <em>{views}</em> (<?php _e('displays views count only, no text', $this->plugin_slug); ?>)<br /> <em>{comments}</em> (<?php _e('displays comments count only, no text, requires stats_comments=1', $this->plugin_slug); ?>)</td>
549 <td>&lt;li&gt;{thumb} {title} {stats}&lt;/li&gt;</td>
550 <td>post_html="&lt;li&gt;{thumb} &lt;a href='{url}'&gt;{text_title}&lt;/a&gt; &lt;/li&gt;"</td>
551 </tr>
552 </tbody>
553 </table>
554 </div>
555 </div>
556 <!-- End params -->
557
558 <!-- Start faq -->
559 <div id="wpp_faq" class="wpp_boxes"<?php if ( "faq" == $current ) {?> style="display:block;"<?php } ?>>
560 <h4 id="widget-title">&raquo; <a href="#" rel="q-1"><?php _e('What does "Title" do?', $this->plugin_slug); ?></a></h4>
561
562 <div class="wpp-ans" id="q-1">
563 <p><?php _e('It allows you to show a heading for your most popular posts listing. If left empty, no heading will be displayed at all.', $this->plugin_slug); ?></p>
564 </div>
565
566 <h4 id="time-range">&raquo; <a href="#" rel="q-2"><?php _e('What is Time Range for?', $this->plugin_slug); ?></a></h4>
567 <div class="wpp-ans" id="q-2">
568 <p><?php _e('It will tell Wordpress Popular Posts to retrieve all posts with most views / comments within the selected time range.', $this->plugin_slug); ?></p>
569 </div>
570
571 <h4 id="sorting">&raquo; <a href="#" rel="q-3"><?php _e('What is "Sort post by" for?', $this->plugin_slug); ?></a></h4>
572 <div class="wpp-ans" id="q-3">
573 <p><?php _e('It allows you to decide whether to order your popular posts listing by total views, comments, or average views per day.', $this->plugin_slug); ?></p>
574 </div>
575
576 <h4 id="display-rating">&raquo; <a href="#" rel="q-4"><?php _e('What does "Display post rating" do?', $this->plugin_slug); ?></a></h4>
577 <div class="wpp-ans" id="q-4">
578 <p><?php _e('If checked, Wordpress Popular Posts will show how your readers are rating your most popular posts. This feature requires having WP-PostRatings plugin installed and enabled on your blog for it to work.', $this->plugin_slug); ?></p>
579 </div>
580
581 <h4 id="shorten-title">&raquo; <a href="#" rel="q-5"><?php _e('What does "Shorten title" do?', $this->plugin_slug); ?></a></h4>
582 <div class="wpp-ans" id="q-5">
583 <p><?php _e('If checked, all posts titles will be shortened to "n" characters/words. A new "Shorten title to" option will appear so you can set it to whatever you like.', $this->plugin_slug); ?></p>
584 </div>
585
586 <h4 id="display-excerpt">&raquo; <a href="#" rel="q-6"><?php _e('What does "Display post excerpt" do?', $this->plugin_slug); ?></a></h4>
587 <div class="wpp-ans" id="q-6">
588 <p><?php _e('If checked, Wordpress Popular Posts will also include a small extract of your posts in the list. Similarly to the previous option, you will be able to decide how long the post excerpt should be.', $this->plugin_slug); ?></p>
589 </div>
590
591 <h4 id="keep-format">&raquo; <a href="#" rel="q-7"><?php _e('What does "Keep text format and links" do?', $this->plugin_slug); ?></a></h4>
592 <div class="wpp-ans" id="q-7">
593 <p><?php _e('If checked, and if the Post Excerpt feature is enabled, Wordpress Popular Posts will keep the styling tags (eg. bold, italic, etc) that were found in the excerpt. Hyperlinks will remain intact, too.', $this->plugin_slug); ?></p>
594 </div>
595
596 <h4 id="filter-post-type">&raquo; <a href="#" rel="q-8"><?php _e('What is "Post type" for?', $this->plugin_slug); ?></a></h4>
597 <div class="wpp-ans" id="q-8">
598 <p><?php _e('This filter allows you to decide which post types to show on the listing. By default, it will retrieve only posts and pages (which should be fine for most cases).', $this->plugin_slug); ?></p>
599 </div>
600
601 <h4 id="filter_category">&raquo; <a href="#" rel="q-9"><?php _e('What is "Category(ies) ID(s)" for?', $this->plugin_slug); ?></a></h4>
602 <div class="wpp-ans" id="q-9">
603 <p><?php _e('This filter allows you to select which categories should be included or excluded from the listing. A negative sign in front of the category ID number will exclude posts belonging to it from the list, for example. You can specify more than one ID with a comma separated list.', $this->plugin_slug); ?></p>
604 </div>
605
606 <h4 id="filter-author">&raquo; <a href="#" rel="q-10"><?php _e('What is "Author(s) ID(s)" for?', $this->plugin_slug); ?></a></h4>
607 <div class="wpp-ans" id="q-10">
608 <p><?php _e('Just like the Category filter, this one lets you filter posts by author ID. You can specify more than one ID with a comma separated list.', $this->plugin_slug); ?></p>
609 </div>
610
611 <h4 id="display-thumb">&raquo; <a href="#" rel="q-11"><?php _e('What does "Display post thumbnail" do?', $this->plugin_slug); ?></a></h4>
612 <div class="wpp-ans" id="q-11">
613 <p><?php _e('If checked, Wordpress Popular Posts will attempt to retrieve the thumbnail of each post. You can set up the source of the thumbnail via Settings - Wordpress Popular Posts - Tools.', $this->plugin_slug); ?></p>
614 </div>
615
616 <h4 id="stats-comments">&raquo; <a href="#" rel="q-12"><?php _e('What does "Display comment count" do?', $this->plugin_slug); ?></a></h4>
617 <div class="wpp-ans" id="q-12">
618 <p><?php _e('If checked, Wordpress Popular Posts will display how many comments each popular post has got in the selected Time Range.', $this->plugin_slug); ?></p>
619 </div>
620
621 <h4 id="stats-views">&raquo; <a href="#" rel="q-13"><?php _e('What does "Display views" do?', $this->plugin_slug); ?></a></h4>
622 <div class="wpp-ans" id="q-13">
623 <p><?php _e('If checked, Wordpress Popular Posts will show how many pageviews a single post has gotten in the selected Time Range.', $this->plugin_slug); ?></p>
624 </div>
625
626 <h4 id="stats-author">&raquo; <a href="#" rel="q-14"><?php _e('What does "Display author" do?', $this->plugin_slug); ?></a></h4>
627 <div class="wpp-ans" id="q-14">
628 <p><?php _e('If checked, Wordpress Popular Posts will display the name of the author of each entry listed.', $this->plugin_slug); ?></p>
629 </div>
630
631 <h4 id="stats-date">&raquo; <a href="#" rel="q-15"><?php _e('What does "Display date" do?', $this->plugin_slug); ?></a></h4>
632 <div class="wpp-ans" id="q-15">
633 <p><?php _e('If checked, Wordpress Popular Posts will display the date when each popular posts was published.', $this->plugin_slug); ?></p>
634 </div>
635
636 <h4 id="stats-cat">&raquo; <a href="#" rel="q-16"><?php _e('What does "Display category" do?', $this->plugin_slug); ?></a></h4>
637 <div class="wpp-ans" id="q-16">
638 <p><?php _e('If checked, Wordpress Popular Posts will display the category of each post.', $this->plugin_slug); ?></p>
639 </div>
640
641 <h4 id="custom-html-markup">&raquo; <a href="#" rel="q-17"><?php _e('What does "Use custom HTML Markup" do?', $this->plugin_slug); ?></a></h4>
642 <div class="wpp-ans" id="q-17">
643 <p><?php _e('If checked, you will be able to customize the HTML markup of your popular posts listing. For example, you can decide whether to wrap your posts in an unordered list, an ordered list, a div, etc. If you know xHTML/CSS, this is for you!', $this->plugin_slug); ?></p>
644 </div>
645
646 <h4>&raquo; <a href="#" rel="q-18"><?php _e('What are "Content Tags"?', $this->plugin_slug); ?></a></h4>
647 <div class="wpp-ans" id="q-18">
648 <p><?php echo sprintf( __('Content Tags are codes to display a variety of items on your popular posts custom HTML structure. For example, setting it to "{title}: {summary}" (without the quotes) would display "Post title: excerpt of the post here". For more Content Tags, see the <a href="%s" target="_blank">Parameters</a> section.', $this->plugin_slug), admin_url('options-general.php?page=wordpress-popular-posts&tab=params') ); ?></p>
649 </div>
650
651 <h4 id="template-tags">&raquo; <a href="#" rel="q-19"><?php _e('What are "Template Tags"?', $this->plugin_slug); ?></a></h4>
652 <div class="wpp-ans" id="q-19">
653 <p><?php _e('Template Tags are simply php functions that allow you to perform certain actions. For example, Wordpress Popular Posts currently supports two different template tags: wpp_get_mostpopular() and wpp_get_views().', $this->plugin_slug); ?></p>
654 </div>
655
656 <h4>&raquo; <a href="#" rel="q-20"><?php _e('What are the template tags that Wordpress Popular Posts supports?', $this->plugin_slug); ?></a></h4>
657 <div class="wpp-ans" id="q-20">
658 <p><?php _e('The following are the template tags supported by Wordpress Popular Posts', $this->plugin_slug); ?>:</p>
659 <table cellspacing="0" class="wp-list-table widefat fixed posts">
660 <thead>
661 <tr>
662 <th class="manage-column column-title"><?php _e('Template tag', $this->plugin_slug); ?></th>
663 <th class="manage-column column-title"><?php _e('What it does ', $this->plugin_slug); ?></th>
664 <th class="manage-column column-title"><?php _e('Parameters', $this->plugin_slug); ?></th>
665 <th class="manage-column column-title"><?php _e('Example', $this->plugin_slug); ?></th>
666 </tr>
667 </thead>
668 <tbody>
669 <tr>
670 <td><strong>wpp_get_mostpopular()</strong></td>
671 <td><?php printf( __('Similar to the widget functionality, this tag retrieves the most popular posts on your blog. This function also accepts <a href="%1$s">parameters</a> so you can customize your popular listing, but these are not required.', $this->plugin_slug), admin_url('options-general.php?page=wordpress-popular-posts&tab=params') ); ?></td>
672 <td><?php printf( __('Please refer to the <a href="%1$s">Parameters section</a> for a complete list of attributes.', $this->plugin_slug), admin_url('options-general.php?page=wordpress-popular-posts&tab=params') ); ?></td>
673 <td>&lt;?php wpp_get_mostpopular(); ?&gt;<br />&lt;?php wpp_get_mostpopular("range=weekly&amp;limit=7"); ?&gt;</td>
674 </tr>
675 <tr class="alternate">
676 <td><strong>wpp_get_views()</strong></td>
677 <td><?php _e('Displays the number of views of a single post. Post ID is required or it will return false.', $this->plugin_slug); ?></td>
678 <td><?php _e('Post ID', $this->plugin_slug); ?>, range ("daily", "weekly", "monthly", "all")</td>
679 <td>&lt;?php echo wpp_get_views($post->ID); ?&gt;<br />&lt;?php echo wpp_get_views(15, 'weekly'); ?&gt;</td>
680 </tr>
681 </tbody>
682 </table>
683 </div>
684
685 <h4 id="shortcode">&raquo; <a href="#" rel="q-21"><?php _e('What are "shortcodes"?', $this->plugin_slug); ?></a></h4>
686 <div class="wpp-ans" id="q-21">
687 <p><?php echo sprintf( __('Shortcodes are similar to BB Codes, these allow us to call a php function by simply typing something like [shortcode]. With Wordpress Popular Posts, the shortcode [wpp] will let you insert a list of the most popular posts in posts content and pages too! For more information about shortcodes, please visit the <a href="%s" target="_blank">Wordpress Shortcode API</a> page.', $this->plugin_slug), 'http://codex.wordpress.org/Shortcode_API' ); ?></p>
688 </div>
689 </div>
690 <!-- End faq -->
691
692 <!-- Start about -->
693 <div id="wpp_faq" class="wpp_boxes"<?php if ( "about" == $current ) {?> style="display:block;"<?php } ?>>
694
695 <div style="float:left; width:800px;">
696 <h3><?php echo sprintf( __('About Wordpress Popular Posts %s', $this->plugin_slug), $this->version); ?></h3>
697 <p><?php _e( 'This version includes the following changes', $this->plugin_slug ); ?>:</p>
698 <ul>
699 <li>Fixes bug on wpp_get_views.</li>
700 <li>Sustitutes WP_DEBUG with custom debugging constant.</li>
701 <li>Fixes bug that prevented disabling plugin's stylesheet.</li>
702 </ul>
703 </div>
704
705 <div style="display:inline; float:right; margin:15px 0 0 0; padding:10px; width:230px; background:#f9f9f9; border: 1px solid #ccc;">
706 <h3 style="margin-top:0; text-align:center;"><?php _e('Do you like this plugin?', $this->plugin_slug); ?></h3>
707 <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
708 <input type="hidden" name="cmd" value="_s-xclick">
709 <input type="hidden" name="hosted_button_id" value="RP9SK8KVQHRKS">
710 <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" style="display:block; margin:0 auto;">
711 <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
712 </form>
713 <p><?php _e( 'Each donation motivates me to keep releasing free stuff for the Wordpress community!', $this->plugin_slug ); ?></p>
714 <p><?php echo sprintf( __('You can <a href="%s" target="_blank">leave a review</a>, too!', $this->plugin_slug), 'http://wordpress.org/support/view/plugin-reviews/wordpress-popular-posts' ); ?></p>
715 </div>
716
717 <div style="display:inline; float:right; clear:right; margin:15px 0 0 0; padding:10px; width:230px; background:#f9f9f9; border: 1px solid #ccc;">
718 <h3 style="margin-top:0; text-align:center;"><?php _e('Need help?', $this->plugin_slug); ?></h3>
719 <p><?php echo sprintf( __('Visit <a href="%s" target="_blank">the forum</a> for support, questions and feedback.', $this->plugin_slug), 'http://wordpress.org/support/plugin/wordpress-popular-posts' ); ?></p>
720 <p><?php _e('Let\'s make this plugin even better!', $this->plugin_slug); ?></p>
721 </div>
722 </div>
723 <!-- End about -->
724
725 </div>