Changeset 2617350
- Timestamp:
- 10/20/2021 04:58:09 PM (4 years ago)
- Location:
- post-volume-stats/trunk
- Files:
-
- 9 edited
-
post-volume-stats.php (modified) (5 diffs)
-
readme.txt (modified) (1 diff)
-
sdpvs_bar.php (modified) (6 diffs)
-
sdpvs_css.css (modified) (1 diff)
-
sdpvs_lists.php (modified) (2 diffs)
-
sdpvs_loader.js (modified) (1 diff)
-
sdpvs_settings.php (modified) (1 diff)
-
sdpvs_subs.php (modified) (1 diff)
-
sdpvs_widget.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-volume-stats/trunk/post-volume-stats.php
r2616158 r2617350 2 2 /** 3 3 * @package post-volume-stats 4 * @version 3.3.0 44 * @version 3.3.05 5 5 */ 6 6 /* … … 10 10 * Author: Neil Ludlow 11 11 * Text Domain: post-volume-stats 12 * Version: 3.3.0 412 * Version: 3.3.05 13 13 * Author URI: http://www.shortdark.net/ 14 14 */ … … 39 39 define('SDPVS__PLUGIN_SETTINGS', 'post-volume-stats-settings'); 40 40 define('SDPVS__FILTER_RESULTS', 'post-volume-stats-daterange'); 41 define('SDPVS__VERSION_NUMBER', '3.3.0 4');41 define('SDPVS__VERSION_NUMBER', '3.3.05'); 42 42 43 43 /****************** … … 48 48 49 49 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_arrays.php'); 50 51 50 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_info.php'); 52 53 51 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_bar.php'); 54 55 52 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_pie.php'); 56 57 53 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_lists.php'); 58 59 54 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_main.php'); 60 61 55 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_subs.php'); 62 63 56 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_widget.php'); 64 65 57 require_once (SDPVS__PLUGIN_DIR . 'sdpvs_settings.php'); 66 58 … … 238 230 // Content goes here 239 231 echo '<h1 class="sdpvs">' . esc_html__('Post Volume Stats: Filter Results', 'post-volume-stats') . '</h1>'; 240 echo "<p>On this page you can filter the results on the main Post Volume Stats page by a year/date range and/or a word.</p>";241 echo "<p>232 echo '<p>On this page you can filter the results on the main Post Volume Stats page by a year/date range and/or a word.</p>'; 233 echo '<p>' . esc_html__(' 242 234 You can either select a year or you can select a date range and filter the results to only search for posts which have a certain text string within them. 243 Selecting a year on this page is an alternative to clicking the bars of the \"Year\" bar chart on the other pages. To de-select the year and view all years together select the blank option at the top.244 Only if the \"Year\" is blank will the date range be used.235 Selecting a year on this page is an alternative to clicking the bars of the "Year" bar chart on the other pages. To de-select the year and view all years together select the blank option at the top. 236 Only if the "Year" is blank will the date range be used. 245 237 You must enter both a start date and an end date. 246 238 If a date range is entered (with no year selected) it will be applied to the main page, but not the Tag/Category/Custom pages. 247 There is a bug where any posts on the \"end date\" are not counted. To fix this, add an extra day onto the \"end date\" to get the desired range.</p>"; 248 249 echo "<p> 250 Filtering by \"Post Content\" allows you to only display posts which contain a certain word in the text. 251 This should work for the main Post Volume Stats bar charts, but not currently the pie charts. 252 </p>"; 239 There is a bug where any posts on the "end date" are not counted. To fix this, add an extra day onto the "end date" to get the desired range.', 'post-volume-stats') . '</p>'; 240 241 echo '<p>' . esc_html__(' 242 Filtering by "Post Content" allows you to only display posts which contain a certain word in the text. 243 This should work for the main Post Volume Stats bar charts, pie charts, and "Show Data" lists. 244 The data may look incorrect for tags and categories because if a post has multiple tags and categories the post will 245 appear more than once in the pie charts.', 'post-volume-stats') . '</p>'; 253 246 254 247 echo "<form action='" . esc_url(admin_url('options.php')) . "' method='POST'>"; -
post-volume-stats/trunk/readme.txt
r2616158 r2617350 49 49 == Changelog == 50 50 51 = 3.3.05 = 52 53 * FIX: Select/deselect all links fixed on tag/cat pages. 54 * FIX: Bug with pie charts on the widget. 55 * UPDATED: Shortened author names replaced underscore with period on main page. 56 * UPDATED: Year shortened to two characters when there are many years of posts. 57 * UPDATED: Author/year text is clickable on author/year charts on main page. 58 51 59 = 3.3.04 = 52 60 53 * U pdated: Fixesfor PHP 8.61 * UPDATED: More fixing for PHP 8. 54 62 55 63 = 3.3.03 = -
post-volume-stats/trunk/sdpvs_bar.php
r2616158 r2617350 152 152 $graphleft = 25; 153 153 154 if ($bars_total <= 0) {155 $bars_total = 1;156 }154 if ($bars_total <= 0) { 155 $bars_total = 1; 156 } 157 157 $bar_width = $graphwidth / $bars_total; 158 158 $svgwidth = $graphwidth + $graphleft; … … 205 205 $x_start = $bar_width + $graphleft + ($i * $bar_width); 206 206 } 207 if ($chart_array[$i]['name'] == $searchyear and"year" == $which) {207 if ($chart_array[$i]['name'] == $searchyear && "year" == $which) { 208 208 $color = $highlight_color; 209 209 $set_explicit_color = "background-color: $color;"; 210 }elseif ( isset($chart_array[$i]['id']) and $chart_array[$i]['id'] == $searchauthor and"author" == $which) {210 }elseif ( isset($chart_array[$i]['id']) && $chart_array[$i]['id'] == $searchauthor && "author" == $which) { 211 211 $color = $highlight_color; 212 212 $set_explicit_color = "background-color: $color;"; 213 }elseif ( ($chart_array[$i]['name'] == "Saturday" or $chart_array[$i]['name'] == "Sunday") and"dayofweek" == $which) {213 }elseif ( ($chart_array[$i]['name'] == "Saturday" || $chart_array[$i]['name'] == "Sunday") && "dayofweek" == $which) { 214 214 $color = $weekend_color; 215 215 $set_explicit_color = "background-color: $color;"; … … 226 226 $year_form_value = $chart_array[$i]['name']; 227 227 } 228 228 229 $legend = $chart_array[$i]['name']; 229 if (strlen($legend) * 7 < $bar_width) { 230 $legend_x = $x_start - ($bar_width / 2) - (strlen($legend) * 7) / 2; 231 $legend_y = $y_start + 17; 232 echo "<text x=\"$legend_x\" y=\"$legend_y\" font-family=\"sans-serif\" font-size=\"12px\" fill=\"$text_color\">" . sprintf(esc_html__('%d', 'my-text-domain'), $legend) . "</text>"; 233 } 230 $legend_x = $x_start - ($bar_width / 2) - (strlen($legend) * 7) / 2; 231 $legend_y = $y_start + 17; 232 $legendShort = $legend; 233 $year_legend_button_x = $x_start - $bar_width; 234 if ($bars_total > $i) { 235 if (strlen($legendShort) * 7 > $bar_width) { 236 $legendShort = substr($legend, -2); 237 $legend_x = $x_start - ($bar_width / 2) - (strlen($legendShort) * 7) / 2; 238 } 239 echo "<text x=\"$legend_x\" y=\"$legend_y\" font-family=\"sans-serif\" font-size=\"11px\" fill=\"$text_color\">" . sprintf(esc_html__('%d', 'my-text-domain'), $legendShort) . "</text>"; 240 if ("y" != $public) { 241 echo "<foreignObject x=\"$year_legend_button_x\" y=\"$y_start\" width=\"$bar_width\" height=\"24\">"; 242 echo "<form action=\"options.php\" method=\"post\" class=\"sdpvs_year_form\" style=\"border:0; margin:0;padding:0;\">"; 243 settings_fields('sdpvs_year_option'); 244 echo " <input type=\"hidden\" name=\"sdpvs_year_option[year_number]\" id=\"year-number\" value=\"$year_form_value\"> 245 <input type=\"submit\" style=\"height: 24px; width: " . $bar_width . "px;\" title=\"{$chart_array[$i]['name']}, {$chart_array[$i]['volume']} posts\" class=\"sdpvs_author_legend\">"; 246 echo "</form></foreignObject>"; 247 } 248 } 249 234 250 $form_y_offset = $y_start - $bar_height; 235 251 $form_x_offset = $x_start - $bar_width; … … 258 274 $legend_y = $y_start + 17; 259 275 if (strlen($legend) * 7 >= $bar_width) { 260 $shorten_to = absint($bar_width / 7) ;276 $shorten_to = absint($bar_width / 7) - 1; 261 277 $legend_x = $x_start - ($bar_width / 2) - ($shorten_to * 7) / 2; 262 $legend = substr($legend, 0, $shorten_to); 263 } 264 echo "<text x=\"$legend_x\" y=\"$legend_y\" font-family=\"sans-serif\" font-size=\"12px\" fill=\"$text_color\">" . sprintf(esc_html__('%s', 'my-text-domain'), $legend) . "</text>"; 278 $legendShort = trim(substr($legend, 0, $shorten_to)) . '.'; 279 } else { 280 $legendShort = $legend; 281 } 265 282 $form_y_offset = $y_start - $bar_height; 266 283 $form_x_offset = $x_start - $bar_width; 284 $author_button_height = $bar_height + 20; 285 $auth_legend_button_x = $x_start - $bar_width; 286 287 288 289 290 //echo "<a xlink:href=\"#\" xlink:title=\"{$chart_array[$i]['name']}, {$chart_array[$i]['volume']} posts\"><text x=\"$legend_x\" y=\"$legend_y\" font-family=\"sans-serif\" font-size=\"12px\" fill=\"$text_color\">" . sprintf(esc_html__('%s', 'my-text-domain'), $legendShort) . "</text></a>"; 291 267 292 268 293 if ("y" != $public) { 294 // Text 295 echo "<text x=\"$legend_x\" y=\"$legend_y\" font-family=\"sans-serif\" font-size=\"12px\" fill=\"$text_color\">" . sprintf(esc_html__('%s', 'my-text-domain'), $legendShort) . "</text>"; 296 echo "<foreignObject x=\"$auth_legend_button_x\" y=\"$y_start\" width=\"$bar_width\" height=\"24\">"; 297 echo "<form action=\"options.php\" method=\"post\" class=\"sdpvs_year_form\" style=\"border:0; margin:0;padding:0;\">"; 298 settings_fields('sdpvs_author_option'); 299 echo " <input type=\"hidden\" name=\"sdpvs_author_option[author_number]\" id=\"author-number\" value=\"$author_form_value\"> 300 <input type=\"submit\" style=\"height: 24px; width: " . $bar_width . "px;\" title=\"{$chart_array[$i]['name']}, {$chart_array[$i]['volume']} posts\" class=\"sdpvs_author_legend\">"; 301 echo "</form></foreignObject>"; 302 303 // Bar 269 304 echo "<path fill-opacity=\"0.5\" d=\"M$x_start $y_start v -$bar_height h -$bar_width v $bar_height h $bar_width \" fill=\"white\"></path>"; 270 305 echo "<foreignObject x=\"$form_x_offset\" y=\"$form_y_offset\" width=\"$bar_width\" height=\"$bar_height\">"; … … 272 307 settings_fields('sdpvs_author_option'); 273 308 echo " <input type=\"hidden\" name=\"sdpvs_author_option[author_number]\" id=\"author-number\" value=\"$author_form_value\"> 274 <input type=\"submit\" style=\"height: " . $ bar_height . "px; width: " . $bar_width . "px; $set_explicit_color\" title=\"{$chart_array[$i]['name']}, {$chart_array[$i]['volume']} posts\" class=\"sdpvs_year_bar\">309 <input type=\"submit\" style=\"height: " . $author_button_height . "px; width: " . $bar_width . "px; $set_explicit_color\" title=\"{$chart_array[$i]['name']}, {$chart_array[$i]['volume']} posts\" class=\"sdpvs_year_bar\"> 275 310 </form> 276 311 </foreignObject>"; 277 312 } else { 313 echo "<text x=\"$legend_x\" y=\"$legend_y\" font-family=\"sans-serif\" font-size=\"12px\" fill=\"$text_color\">" . sprintf(esc_html__('%s', 'my-text-domain'), $legendShort) . "</text>"; 278 314 echo "<a xlink:title=\"{$chart_array[$i]['name']}, {$chart_array[$i]['volume']} posts\"><path fill-opacity=\"0.5\" d=\"M$x_start $y_start v -$bar_height h -$bar_width v $bar_height h $bar_width \" fill=\"$color\" class=\"sdpvs_bar\"></path></a>"; 279 315 } … … 285 321 }else{ 286 322 // Label the year even if there are no posts 287 if ("year" == $which ) {323 if ("year" == $which && $bars_total > $i) { 288 324 $x_start = $svgwidth - ($i * $bar_width); 289 325 $legend = $chart_array[$i]['name']; 290 if (strlen($legend) * 7 < $bar_width) { 291 $legend_x = $x_start - ($bar_width / 2) - (strlen($legend) * 7) / 2; 292 $legend_y = $y_start + 17; 293 echo "<text x=\"$legend_x\" y=\"$legend_y\" font-family=\"sans-serif\" font-size=\"11px\" fill=\"$text_color\">" . sprintf(esc_html__('%d', 'my-text-domain'), $legend) . "</text>"; 294 } 326 $legend_x = $x_start - ($bar_width / 2) - (strlen($legend) * 7) / 2; 327 $legend_y = $y_start + 17; 328 $legendShort = $legend; 329 330 if (strlen($legendShort) * 7 > $bar_width) { 331 $legendShort = substr($legend, -2); 332 $legend_x = $x_start - ($bar_width / 2) - (strlen($legendShort) * 7) / 2; 333 } 334 echo "<text x=\"$legend_x\" y=\"$legend_y\" font-family=\"sans-serif\" font-size=\"11px\" fill=\"$text_color\">" . sprintf(esc_html__('%d', 'my-text-domain'), $legendShort) . "</text>"; 295 335 } 296 336 } -
post-volume-stats/trunk/sdpvs_css.css
r1575553 r2617350 31 31 cursor: pointer; 32 32 opacity: 0.5; 33 } 34 35 .sdpvs_author_legend { 36 border: 0; 37 margin: 0; 38 padding: 0; 39 color: transparent; 40 cursor: pointer; 41 opacity: 0.1; 33 42 } 34 43 -
post-volume-stats/trunk/sdpvs_lists.php
r2616158 r2617350 31 31 32 32 parent::sdpvs_number_of_posts_per_author($searchyear, $start_date, $end_date, $search_text); 33 $this->list_string = '<h2>' . sprintf(esc_html__('Post Volumes per Author%1$s%2$s', 'post-volume-stats'), $extradesc, $label) . '</h2>'; 33 $this->list_string = '<h2>'; 34 $this->list_string .= sprintf(esc_html__('Post Volumes per Author%1$s%2$s', 'post-volume-stats'), $extradesc, $label); 35 if (!empty($search_text)) { 36 $this->output_compare_list .= sprintf(__(' containing "%s"', 'post-volume-stats'), $search_text); 37 } 38 $this->list_string .= '</h2>'; 34 39 $i=0; 35 40 while ( array_key_exists($i, $this->list_array) ) { … … 671 676 672 677 673 $this->output_compare_list .= '<h2>';678 $this->output_compare_list = '<h2>'; 674 679 675 680 if ("hour" == $type) { -
post-volume-stats/trunk/sdpvs_loader.js
r2616158 r2617350 15 15 16 16 $('#select-all').click(function(e) { 17 // Iterate each checkbox 18 $(':checkbox').each(function() { 19 this.checked = true; 20 }); 17 // Iterate each checkbox 18 $(':checkbox').each(function() { 19 this.checked = true; 20 }); 21 $(".sdpvs_preview").attr('disabled', false); 21 22 }); 22 23 23 24 $('#deselect-all').click(function(e) { 24 // Iterate each checkbox 25 $(':checkbox').each(function() { 26 this.checked = false; 27 }); 25 // Iterate each checkbox 26 $(':checkbox').each(function() { 27 this.checked = false; 28 }); 29 $(".sdpvs_preview").attr('disabled', true); 28 30 }); 29 31 -
post-volume-stats/trunk/sdpvs_settings.php
r2616158 r2617350 130 130 131 131 echo "<label><input name=\"sdpvs_year_option[search_text]\" id=\"search-text\" value=\"$selected\" placeholder=\"Filter text...\">"; 132 echo " (i.e. only show the posts which contain a keyword in the bar chartson the main Post Volume Stats page)";132 echo " (i.e. only show the posts which contain a keyword on the main Post Volume Stats page)"; 133 133 echo "</label><br>"; 134 134 echo "</div>"; -
post-volume-stats/trunk/sdpvs_subs.php
r2616158 r2617350 9 9 // create an instance of the required classes 10 10 $sdpvs_bar = new sdpvsBarChart(); 11 $sdpvs_pie = new sdpvsPieChart();11 //$sdpvs_pie = new sdpvsPieChart(); 12 12 $sdpvs_lists = new sdpvsTextLists(); 13 13 -
post-volume-stats/trunk/sdpvs_widget.php
r2616158 r2617350 56 56 // year bar chart 57 57 echo "<div class='sdpvs_col'>"; 58 $sdpvs_bar ->sdpvs_draw_bar_chart_svg('year','','','n','y',$label_color);58 $sdpvs_bar->sdpvs_draw_bar_chart_svg('year','','','n','y',$label_color); 59 59 echo "</div>"; 60 60 } … … 62 62 // month bar chart 63 63 echo "<div class='sdpvs_col'>"; 64 $sdpvs_bar ->sdpvs_draw_bar_chart_svg('month','','','n','y',$label_color);64 $sdpvs_bar->sdpvs_draw_bar_chart_svg('month','','','n','y',$label_color); 65 65 echo "</div>"; 66 66 } … … 68 68 // dayofmonth bar chart 69 69 echo "<div class='sdpvs_col'>"; 70 $sdpvs_bar ->sdpvs_draw_bar_chart_svg('dayofmonth','','','n','y',$label_color);70 $sdpvs_bar->sdpvs_draw_bar_chart_svg('dayofmonth','','','n','y',$label_color); 71 71 echo "</div>"; 72 72 } … … 74 74 // dayofmonth bar chart 75 75 echo "<div class='sdpvs_col'>"; 76 $sdpvs_bar ->sdpvs_draw_bar_chart_svg('dayofweek','','','n','y',$label_color);76 $sdpvs_bar->sdpvs_draw_bar_chart_svg('dayofweek','','','n','y',$label_color); 77 77 echo "</div>"; 78 78 } … … 80 80 // dayofmonth bar chart 81 81 echo "<div class='sdpvs_col'>"; 82 $sdpvs_bar ->sdpvs_draw_bar_chart_svg('hour','','','n','y',$label_color);82 $sdpvs_bar->sdpvs_draw_bar_chart_svg('hour','','','n','y',$label_color); 83 83 echo "</div>"; 84 84 } … … 86 86 // dayofmonth bar chart 87 87 echo "<div class='sdpvs_col'>"; 88 $sdpvs_bar ->sdpvs_draw_bar_chart_svg('words','','','n','y',$label_color);88 $sdpvs_bar->sdpvs_draw_bar_chart_svg('words','','','n','y',$label_color); 89 89 echo "</div>"; 90 90 } … … 92 92 // dayofmonth bar chart 93 93 echo "<div class='sdpvs_col'>"; 94 $sdpvs_bar ->sdpvs_draw_bar_chart_svg('interval','','','n','y',$label_color);94 $sdpvs_bar->sdpvs_draw_bar_chart_svg('interval','','','n','y',$label_color); 95 95 echo "</div>"; 96 96 } … … 103 103 // dayofmonth bar chart 104 104 echo "<div class='sdpvs_col'>"; 105 echo $sdpvs_pie -> sdpvs_draw_pie_svg('category','','', 'n', 'y');105 echo $sdpvs_pie->sdpvs_draw_pie_svg('category','','', 'n', 'y','','',''); 106 106 echo "</div>"; 107 107 } … … 109 109 // dayofmonth bar chart 110 110 echo "<div class='sdpvs_col'>"; 111 echo $sdpvs_pie -> sdpvs_draw_pie_svg('tag','','', 'n', 'y');111 echo $sdpvs_pie->sdpvs_draw_pie_svg('tag','','', 'n', 'y','','',''); 112 112 echo "</div>"; 113 113 } … … 157 157 158 158 <p> 159 <label for="<?php echo $this ->get_field_id('title'); ?>"><?php esc_html_e('Title', 'post-volume-stats'); ?></label>160 <input class="widefat" id="<?php echo $this -> get_field_id('title'); ?>" name="<?php echo $this ->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />161 </p> 162 <p> 163 <label for="<?php echo esc_attr($this ->get_field_id('textarea')); ?>"><?php esc_html_e('Description', 'post-volume-stats'); ?></label>164 <textarea class="widefat" id="<?php echo esc_attr($this -> get_field_id('textarea')); ?>" name="<?php echo esc_attr($this ->get_field_name('textarea')); ?>"><?php echo esc_html($textarea); ?></textarea>165 </p> 166 <p> 167 <input id="<?php echo esc_attr($this -> get_field_id('label_color')); ?>" name="<?php echo esc_attr($this ->get_field_name('label_color')); ?>" type="checkbox" value="white" <?php checked('white', $label_color); ?> />168 <label for="<?php echo esc_attr($this ->get_field_id('label_color')); ?>"><?php esc_html_e('White Text (for dark backgrounds)', 'post-volume-stats'); ?></label>159 <label for="<?php echo $this->get_field_id('title'); ?>"><?php esc_html_e('Title', 'post-volume-stats'); ?></label> 160 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /> 161 </p> 162 <p> 163 <label for="<?php echo esc_attr($this->get_field_id('textarea')); ?>"><?php esc_html_e('Description', 'post-volume-stats'); ?></label> 164 <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id('textarea')); ?>" name="<?php echo esc_attr($this->get_field_name('textarea')); ?>"><?php echo esc_html($textarea); ?></textarea> 165 </p> 166 <p> 167 <input id="<?php echo esc_attr($this->get_field_id('label_color')); ?>" name="<?php echo esc_attr($this->get_field_name('label_color')); ?>" type="checkbox" value="white" <?php checked('white', $label_color); ?> /> 168 <label for="<?php echo esc_attr($this->get_field_id('label_color')); ?>"><?php esc_html_e('White Text (for dark backgrounds)', 'post-volume-stats'); ?></label> 169 169 </p> 170 170 <p> … … 172 172 </p> 173 173 <p> 174 <input id="<?php echo esc_attr($this -> get_field_id('checkbox1')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox1')); ?>" type="checkbox" value="year" <?php checked('year', $checkbox1); ?> />175 <label for="<?php echo esc_attr($this ->get_field_id('checkbox1')); ?>"><?php esc_html_e('Years', 'post-volume-stats'); ?></label>176 </p> 177 <p> 178 <input id="<?php echo esc_attr($this -> get_field_id('checkbox2')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox2')); ?>" type="checkbox" value="month" <?php checked('month', $checkbox2); ?> />179 <label for="<?php echo esc_attr($this ->get_field_id('checkbox2')); ?>"><?php esc_html_e('Months', 'post-volume-stats'); ?></label>180 </p> 181 <p> 182 <input id="<?php echo esc_attr($this -> get_field_id('checkbox3')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox3')); ?>" type="checkbox" value="dayofmonth" <?php checked('dayofmonth', $checkbox3); ?> />183 <label for="<?php echo esc_attr($this ->get_field_id('checkbox3')); ?>"><?php esc_html_e('Days of the Month', 'post-volume-stats'); ?></label>184 </p> 185 <p> 186 <input id="<?php echo esc_attr($this -> get_field_id('checkbox4')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox4')); ?>" type="checkbox" value="dayofweek" <?php checked('dayofweek', $checkbox4); ?> />187 <label for="<?php echo esc_attr($this ->get_field_id('checkbox4')); ?>"><?php esc_html_e('Days of the Week', 'post-volume-stats'); ?></label>188 </p> 189 <p> 190 <input id="<?php echo esc_attr($this -> get_field_id('checkbox5')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox5')); ?>" type="checkbox" value="hour" <?php checked('hour', $checkbox5); ?> />191 <label for="<?php echo esc_attr($this ->get_field_id('checkbox5')); ?>"><?php esc_html_e('Hour', 'post-volume-stats'); ?></label>192 </p> 193 <p> 194 <input id="<?php echo esc_attr($this -> get_field_id('checkbox8')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox8')); ?>" type="checkbox" value="words" <?php checked('words', $checkbox8); ?> />195 <label for="<?php echo esc_attr($this ->get_field_id('checkbox8')); ?>"><?php esc_html_e('Words per Post', 'post-volume-stats'); ?></label>196 </p> 197 <p> 198 <input id="<?php echo esc_attr($this -> get_field_id('checkbox9')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox9')); ?>" type="checkbox" value="interval" <?php checked('interval', $checkbox9); ?> />199 <label for="<?php echo esc_attr($this ->get_field_id('checkbox9')); ?>"><?php esc_html_e('Interval', 'post-volume-stats'); ?></label>200 </p> 201 <p> 202 <input id="<?php echo esc_attr($this -> get_field_id('checkbox6')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox6')); ?>" type="checkbox" value="category" <?php checked('category', $checkbox6); ?> />203 <label for="<?php echo esc_attr($this ->get_field_id('checkbox6')); ?>"><?php esc_html_e('Categories', 'post-volume-stats'); ?></label>204 </p> 205 <p> 206 <input id="<?php echo esc_attr($this -> get_field_id('checkbox7')); ?>" name="<?php echo esc_attr($this ->get_field_name('checkbox7')); ?>" type="checkbox" value="tag" <?php checked('tag', $checkbox7); ?> />207 <label for="<?php echo esc_attr($this ->get_field_id('checkbox7')); ?>"><?php esc_html_e('Tags', 'post-volume-stats'); ?></label>174 <input id="<?php echo esc_attr($this->get_field_id('checkbox1')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox1')); ?>" type="checkbox" value="year" <?php checked('year', $checkbox1); ?> /> 175 <label for="<?php echo esc_attr($this->get_field_id('checkbox1')); ?>"><?php esc_html_e('Years', 'post-volume-stats'); ?></label> 176 </p> 177 <p> 178 <input id="<?php echo esc_attr($this->get_field_id('checkbox2')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox2')); ?>" type="checkbox" value="month" <?php checked('month', $checkbox2); ?> /> 179 <label for="<?php echo esc_attr($this->get_field_id('checkbox2')); ?>"><?php esc_html_e('Months', 'post-volume-stats'); ?></label> 180 </p> 181 <p> 182 <input id="<?php echo esc_attr($this->get_field_id('checkbox3')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox3')); ?>" type="checkbox" value="dayofmonth" <?php checked('dayofmonth', $checkbox3); ?> /> 183 <label for="<?php echo esc_attr($this->get_field_id('checkbox3')); ?>"><?php esc_html_e('Days of the Month', 'post-volume-stats'); ?></label> 184 </p> 185 <p> 186 <input id="<?php echo esc_attr($this->get_field_id('checkbox4')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox4')); ?>" type="checkbox" value="dayofweek" <?php checked('dayofweek', $checkbox4); ?> /> 187 <label for="<?php echo esc_attr($this->get_field_id('checkbox4')); ?>"><?php esc_html_e('Days of the Week', 'post-volume-stats'); ?></label> 188 </p> 189 <p> 190 <input id="<?php echo esc_attr($this->get_field_id('checkbox5')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox5')); ?>" type="checkbox" value="hour" <?php checked('hour', $checkbox5); ?> /> 191 <label for="<?php echo esc_attr($this->get_field_id('checkbox5')); ?>"><?php esc_html_e('Hour', 'post-volume-stats'); ?></label> 192 </p> 193 <p> 194 <input id="<?php echo esc_attr($this->get_field_id('checkbox8')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox8')); ?>" type="checkbox" value="words" <?php checked('words', $checkbox8); ?> /> 195 <label for="<?php echo esc_attr($this->get_field_id('checkbox8')); ?>"><?php esc_html_e('Words per Post', 'post-volume-stats'); ?></label> 196 </p> 197 <p> 198 <input id="<?php echo esc_attr($this->get_field_id('checkbox9')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox9')); ?>" type="checkbox" value="interval" <?php checked('interval', $checkbox9); ?> /> 199 <label for="<?php echo esc_attr($this->get_field_id('checkbox9')); ?>"><?php esc_html_e('Interval', 'post-volume-stats'); ?></label> 200 </p> 201 <p> 202 <input id="<?php echo esc_attr($this->get_field_id('checkbox6')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox6')); ?>" type="checkbox" value="category" <?php checked('category', $checkbox6); ?> /> 203 <label for="<?php echo esc_attr($this->get_field_id('checkbox6')); ?>"><?php esc_html_e('Categories', 'post-volume-stats'); ?></label> 204 </p> 205 <p> 206 <input id="<?php echo esc_attr($this->get_field_id('checkbox7')); ?>" name="<?php echo esc_attr($this->get_field_name('checkbox7')); ?>" type="checkbox" value="tag" <?php checked('tag', $checkbox7); ?> /> 207 <label for="<?php echo esc_attr($this->get_field_id('checkbox7')); ?>"><?php esc_html_e('Tags', 'post-volume-stats'); ?></label> 208 208 </p> 209 209 <?php … … 238 238 // register Foo_Widget widget 239 239 function sdpvs_widget_register() { 240 register_widget( 'SDPVS_Widget' );240 register_widget( 'SDPVS_Widget' ); 241 241 } 242 242 add_action( 'widgets_init', 'sdpvs_widget_register' );
Note: See TracChangeset
for help on using the changeset viewer.