Plugin Directory

Changeset 2617350


Ignore:
Timestamp:
10/20/2021 04:58:09 PM (4 years ago)
Author:
shortdark
Message:

Select/deselect fix and author/year bar charts fixes.

Location:
post-volume-stats/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • post-volume-stats/trunk/post-volume-stats.php

    r2616158 r2617350  
    22/**
    33 * @package post-volume-stats
    4  * @version 3.3.04
     4 * @version 3.3.05
    55 */
    66/*
     
    1010 * Author: Neil Ludlow
    1111 * Text Domain: post-volume-stats
    12  * Version: 3.3.04
     12 * Version: 3.3.05
    1313 * Author URI: http://www.shortdark.net/
    1414 */
     
    3939define('SDPVS__PLUGIN_SETTINGS', 'post-volume-stats-settings');
    4040define('SDPVS__FILTER_RESULTS', 'post-volume-stats-daterange');
    41 define('SDPVS__VERSION_NUMBER', '3.3.04');
     41define('SDPVS__VERSION_NUMBER', '3.3.05');
    4242
    4343/******************
     
    4848
    4949require_once (SDPVS__PLUGIN_DIR . 'sdpvs_arrays.php');
    50 
    5150require_once (SDPVS__PLUGIN_DIR . 'sdpvs_info.php');
    52 
    5351require_once (SDPVS__PLUGIN_DIR . 'sdpvs_bar.php');
    54 
    5552require_once (SDPVS__PLUGIN_DIR . 'sdpvs_pie.php');
    56 
    5753require_once (SDPVS__PLUGIN_DIR . 'sdpvs_lists.php');
    58 
    5954require_once (SDPVS__PLUGIN_DIR . 'sdpvs_main.php');
    60 
    6155require_once (SDPVS__PLUGIN_DIR . 'sdpvs_subs.php');
    62 
    6356require_once (SDPVS__PLUGIN_DIR . 'sdpvs_widget.php');
    64 
    6557require_once (SDPVS__PLUGIN_DIR . 'sdpvs_settings.php');
    6658
     
    238230        // Content goes here
    239231        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__('
    242234You 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.
     235Selecting 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.
     236Only if the "Year" is blank will the date range be used.
    245237You must enter both a start date and an end date.
    246238If 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>";
     239There 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__('
     242Filtering by "Post Content" allows you to only display posts which contain a certain word in the text.
     243This should work for the main Post Volume Stats bar charts, pie charts, and "Show Data" lists.
     244The data may look incorrect for tags and categories because if a post has multiple tags and categories the post will
     245appear more than once in the pie charts.', 'post-volume-stats') . '</p>';
    253246
    254247        echo "<form action='" . esc_url(admin_url('options.php')) . "' method='POST'>";
  • post-volume-stats/trunk/readme.txt

    r2616158 r2617350  
    4949== Changelog ==
    5050
     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
    5159= 3.3.04 =
    5260
    53 * Updated: Fixes for PHP 8.
     61* UPDATED: More fixing for PHP 8.
    5462
    5563= 3.3.03 =
  • post-volume-stats/trunk/sdpvs_bar.php

    r2616158 r2617350  
    152152        $graphleft = 25;
    153153
    154     if ($bars_total <= 0) {
    155         $bars_total = 1;
    156     }
     154        if ($bars_total <= 0) {
     155            $bars_total = 1;
     156        }
    157157        $bar_width = $graphwidth / $bars_total;
    158158        $svgwidth = $graphwidth + $graphleft;
     
    205205                    $x_start = $bar_width + $graphleft + ($i * $bar_width);
    206206                }
    207                 if ($chart_array[$i]['name'] == $searchyear and "year" == $which) {
     207                if ($chart_array[$i]['name'] == $searchyear && "year" == $which) {
    208208                    $color = $highlight_color;
    209209                    $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) {
    211211                    $color = $highlight_color;
    212212                    $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) {
    214214                    $color = $weekend_color;
    215215                    $set_explicit_color = "background-color: $color;";
     
    226226                        $year_form_value = $chart_array[$i]['name'];
    227227                    }
     228
    228229                    $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
    234250                    $form_y_offset = $y_start - $bar_height;
    235251                    $form_x_offset = $x_start - $bar_width;
     
    258274                    $legend_y = $y_start + 17;
    259275                    if (strlen($legend) * 7 >= $bar_width) {
    260                         $shorten_to = absint($bar_width / 7);
     276                        $shorten_to = absint($bar_width / 7) - 1;
    261277                        $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                    }
    265282                    $form_y_offset = $y_start - $bar_height;
    266283                    $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
    267292
    268293                    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
    269304                        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>";
    270305                        echo "<foreignObject x=\"$form_x_offset\" y=\"$form_y_offset\" width=\"$bar_width\" height=\"$bar_height\">";
     
    272307                        settings_fields('sdpvs_author_option');
    273308                        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\">
    275310                        </form>
    276311                        </foreignObject>";
    277312                    } 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>";
    278314                        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>";
    279315                    }
     
    285321            }else{
    286322                // Label the year even if there are no posts
    287                 if ("year" == $which) {
     323                if ("year" == $which && $bars_total > $i) {
    288324                    $x_start = $svgwidth - ($i * $bar_width);
    289325                    $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>";
    295335                }
    296336            }
  • post-volume-stats/trunk/sdpvs_css.css

    r1575553 r2617350  
    3131    cursor: pointer;
    3232    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;
    3342}
    3443
  • post-volume-stats/trunk/sdpvs_lists.php

    r2616158 r2617350  
    3131       
    3232        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>';
    3439        $i=0;
    3540        while ( array_key_exists($i, $this->list_array) ) {
     
    671676
    672677
    673          $this->output_compare_list .= '<h2>';
     678         $this->output_compare_list = '<h2>';
    674679
    675680        if ("hour" == $type) {
  • post-volume-stats/trunk/sdpvs_loader.js

    r2616158 r2617350  
    1515   
    1616    $('#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);
    2122    });
    2223   
    2324    $('#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);
    2830    });
    2931
  • post-volume-stats/trunk/sdpvs_settings.php

    r2616158 r2617350  
    130130
    131131    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 charts on 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)";
    133133    echo "</label><br>";
    134134    echo "</div>";
  • post-volume-stats/trunk/sdpvs_subs.php

    r2616158 r2617350  
    99        // create an instance of the required classes
    1010        $sdpvs_bar = new sdpvsBarChart();
    11         $sdpvs_pie = new sdpvsPieChart();
     11        //$sdpvs_pie = new sdpvsPieChart();
    1212        $sdpvs_lists = new sdpvsTextLists();
    1313
  • post-volume-stats/trunk/sdpvs_widget.php

    r2616158 r2617350  
    5656                // year bar chart
    5757                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);
    5959                echo "</div>";
    6060            }
     
    6262                // month bar chart
    6363                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);
    6565                echo "</div>";
    6666            }
     
    6868                // dayofmonth bar chart
    6969                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);
    7171                echo "</div>";
    7272            }
     
    7474                // dayofmonth bar chart
    7575                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);
    7777                echo "</div>";
    7878            }
     
    8080                // dayofmonth bar chart
    8181                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);
    8383                echo "</div>";
    8484            }
     
    8686                // dayofmonth bar chart
    8787                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);
    8989                echo "</div>";
    9090            }
     
    9292                // dayofmonth bar chart
    9393                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);
    9595                echo "</div>";
    9696            }
     
    103103                // dayofmonth bar chart
    104104                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','','','');
    106106                echo "</div>";
    107107            }
     
    109109                // dayofmonth bar chart
    110110                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','','','');
    112112                echo "</div>";
    113113            }
     
    157157
    158158        <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>
    169169        </p>
    170170        <p>
     
    172172        </p>
    173173        <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>
    208208        </p>
    209209        <?php
     
    238238        // register Foo_Widget widget
    239239        function sdpvs_widget_register() {
    240         register_widget( 'SDPVS_Widget' );
     240            register_widget( 'SDPVS_Widget' );
    241241        }
    242242        add_action( 'widgets_init', 'sdpvs_widget_register' );
Note: See TracChangeset for help on using the changeset viewer.