Plugin Directory

Changeset 2670108


Ignore:
Timestamp:
01/31/2022 07:15:25 PM (4 years ago)
Author:
shortdark
Message:

3.3.08

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

Legend:

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

    r2669458 r2670108  
    22/**
    33 * @package post-volume-stats
    4  * @version 3.3.07
     4 * @version 3.3.08
    55 */
    66/*
     
    1010 * Author: Neil Ludlow
    1111 * Text Domain: post-volume-stats
    12  * Version: 3.3.07
     12 * Version: 3.3.08
    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.07');
     41define('SDPVS__VERSION_NUMBER', '3.3.08');
    4242
    4343/******************
  • post-volume-stats/trunk/readme.txt

    r2669458 r2670108  
    4949== Changelog ==
    5050
     51= 3.3.08 =
     52
     53* FIX: Backward compatability for new way of listing users in WP 5.9.
     54
    5155= 3.3.07 =
    5256
  • post-volume-stats/trunk/sdpvs_arrays.php

    r2669458 r2670108  
    111111        global $wpdb;
    112112
    113         //$tax_results="";
    114113        $this->tax_type_array = array();
    115114        $searchyear = absint($searchyear);
     
    194193        global $wpdb;
    195194
    196         //$tax_results="";
    197195        $this->list_array = array();
    198196        $searchyear = absint($searchyear);
     
    352350            $wpdb->flush();
    353351        }
    354         //var_dump("SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_type = 'post' AND post_date LIKE '{$searchyear}%' {$extra} ");
    355         //exit();
    356352    }
    357353
     
    518514        $this->list_array = array();
    519515
    520         $blogusers = get_users( array( 'capability'  => 'edit_posts' ) );
     516        $args = array(
     517            'orderby'    => 'post_count',
     518            'order'      => 'DESC',
     519            'capability' => array( 'edit_posts' ),
     520        );
     521
     522        // Capability queries were only introduced in WP 5.9.
     523        if ( version_compare( $GLOBALS['wp_version'], '5.9-alpha', '<' ) ) {
     524            $args['who'] = 'authors';
     525            unset( $args['capability'] );
     526        }
     527
     528        $blogusers = get_users( $args );
    521529
    522530        $extra = $this->sdpvs_add_date_sql($searchyear, $start_date, $end_date);
  • post-volume-stats/trunk/sdpvs_lists.php

    r2669458 r2670108  
    1313    }
    1414
    15     /*
     15    /**
    1616     * NUMBER OF POSTS PER AUTHOR
    1717     */
     
    4747    }
    4848
    49     /*
     49    /**
    5050     * NUMBER OF POSTS PER YEAR TEXT
    5151     */
     
    6767    }
    6868
    69     /*
     69    /**
    7070     * GET THE COLOR LIST FOR THE LINE GRAPHS
    7171     */
     
    8585    }
    8686
    87     /*
     87    /**
    8888     * NUMBER OF POSTS PER CATEGORY / TAG TEXT
    8989     */
     
    145145
    146146
    147         if ("subpage" === $list_type) {
    148             // $posts_per_cat_tag = '<h3>' . esc_html__('1. Select', 'post-volume-stats') . '</h3>';
    149         } elseif ("public" === $list_type) {
    150             // $posts_per_cat_tag = '<h3>' . esc_html__('2. Preview', 'post-volume-stats') . '</h3><p>' . esc_html__('Copy and paste the list into HTML.') . '</p>';
    151         } elseif ("buttons" === $list_type) {
    152             // $posts_per_cat_tag = '<h3>' . esc_html__('3. Export', 'post-volume-stats') . '</h3><p>' . esc_html__('Export the list and line graph into a new post by exporting.') . '</p>';
     147       if ("buttons" === $list_type) {
    153148            $posts_per_cat_tag .= "<form action='" . esc_url(admin_url('admin-post.php')) . "' method='POST'>";
    154149            $posts_per_cat_tag .= "<input type=\"hidden\" name=\"action\" value=\"export_lists\">";
     
    174169            $posts_per_cat_tag .= "<div style='display: block; padding: 5px;'><input type='submit' name='graph' class='button-primary' value='" . esc_html__('Export Graph') . "'></div>";
    175170            $posts_per_cat_tag .= "<div style='display: block; padding: 5px;'><input type='submit' name='list' class='button-primary' value='" . esc_html__('Export List') . "'></div>";
    176 //          $posts_per_cat_tag .= "<div style='display: block; padding: 5px;'><input type='submit' name='csv' class='button-primary' value='" . esc_html__('Export ALL Years to CSV') . "'></div>";
    177171            $posts_per_cat_tag .= "</form>";
    178172        }
     
    290284
    291285
    292     /*
     286    /**
    293287     * NUMBER OF DAYS BETWEEN POSTS
    294288     */
     
    332326
    333327
    334     /*
     328    /**
    335329     * NUMBER OF POSTS PER DAY-OF-WEEK TEXT
    336330     */
     
    370364    }
    371365
    372     /*
     366    /**
    373367     * NUMBER OF POSTS PER HOUR TEXT
    374368     */
     
    405399    }
    406400
    407     /*
     401    /**
    408402     * NUMBER OF POSTS PER MONTH TEXT
    409403     */
     
    441435    }
    442436
    443     /*
     437    /**
    444438     * NUMBER OF POSTS PER DAY OF MONTH TEXT
    445439     */
     
    479473
    480474
    481     /*
     475    /**
    482476     * NUMBER OF WORDS PER POST
    483477     */
     
    519513
    520514
    521     /*
     515    /**
    522516     * NUMBER OF IMAGES PER POST
    523517     */
     
    729723    public function sdpvs_create_csv_output($type = "", $searchauthor=0, $search_text = "") {
    730724        $searchauthor = absint($searchauthor);
    731         //$years_total = 0;
    732         //$number_of_years = 0;
    733         //$user = "";
    734725        $userstring = "";
    735726        $textstring = '';
  • post-volume-stats/trunk/sdpvs_main.php

    r2669458 r2670108  
    1010
    1111        // create an instance of the required classes
    12         //$sdpvs_info = new sdpvsInfo();
    1312        $sdpvs_bar = new sdpvsBarChart();
    1413        $sdpvs_pie = new sdpvsPieChart();
     
    145144        }
    146145
    147 
    148 
    149146        // days between post bar chart
    150147        echo "<div class='sdpvs_col'>";
  • post-volume-stats/trunk/sdpvs_pie.php

    r2669458 r2670108  
    1010    private $newx;
    1111    private $newy;
     12    /**
     13     * @var int
     14     */
     15    private $number_of_taxonomies;
     16    /**
     17     * @var int
     18     */
     19    private $total_taxonomy_posts;
    1220
    1321    /**
     
    4957        $testangle_orig = 0;
    5058        $radius = 100;
    51         //$prev_angle = 0;
    52         //$remaining = 0;
    5359        $this->newx = 0;
    5460        $this->newy = 0;
     
    6571            $this->sdpvs_add_to_taxonomy_array($type,$year,$author, $start_date, $end_date, $search_text);
    6672            $pie_array = $this->tax_type_array;
    67             //$total_volume = $this->total_taxonomy_posts;
    68             //$number_of_containers = $this->number_of_taxonomies;
    6973            $pie_svg = '<h2>' . esc_html__("Categories", 'post-volume-stats') . '</h2>';
    7074            $link_part = "category_name";
     
    7276            $wp_type_name = "post_tag";
    7377            $this->sdpvs_add_to_taxonomy_array($wp_type_name,$year,$author, $start_date, $end_date, $search_text);
    74             //$total_volume = $this->total_taxonomy_posts;
    7578            $pie_array = $this->tax_type_array;
    76             //$number_of_containers = $this->number_of_taxonomies;
    7779            $pie_svg = '<h2>' . esc_html__("Tags", 'post-volume-stats') . '</h2>';
    7880            $link_part = $type;
    7981        }else{
    8082            $this->sdpvs_add_to_taxonomy_array($type,$year,$author, $start_date, $end_date, $search_text);
    81             //$total_volume = $this->total_taxonomy_posts;
    8283            $pie_array = $this->tax_type_array;
    83             //$number_of_containers = $this->number_of_taxonomies;
    8484            $tax_labels = get_taxonomy($type);
    8585            $pie_svg = '<h2>';
     
    120120                $hue = 240 - absint($pie_array[$c]['angle']*240 / $largest_angle);
    121121                $color = "hsl($hue, 70%, 65%)";
    122 
    123                 //$display_angle_as = sprintf("%.1f", $pie_array[$c]['angle']);
    124 
     122               
    125123                if("y"==$public){
    126124                    $item_id = $pie_array[$c]['id'];
  • post-volume-stats/trunk/sdpvs_settings.php

    r2669458 r2670108  
    109109        $author = absint($authoroptions['author_number']);
    110110    }
    111 
    112111
    113112    // Create an instance of the required class
  • post-volume-stats/trunk/sdpvs_subs.php

    r2669458 r2670108  
    66
    77    public function sdpvs_combined_page_content($type = "") {
    8 
    98        // create an instance of the required classes
    109        $sdpvs_bar = new sdpvsBarChart();
    11         //$sdpvs_pie = new sdpvsPieChart();
    1210        $sdpvs_lists = new sdpvsTextLists();
    1311
     
    2624            $authoroff = htmlspecialchars( $genoptions['authoroff'], ENT_QUOTES);
    2725        }
    28 
    29 
    30         $selected = "";
    3126
    3227        if ("category" === $type) {
     
    8681        $searchyear = 0;
    8782        $searchauthor = 0;
    88         $rainbow = 'on';
     83
    8984
    9085        $year = get_option('sdpvs_year_option');
     
    9792            $searchauthor = absint($authoroptions['author_number']);
    9893        }
    99 
    100         $genoptions = get_option('sdpvs_general_settings');
    101         if (false !== $genoptions) {
    102             $rainbow = htmlspecialchars ( $genoptions['rainbow'], ENT_QUOTES);
    103         }
    104 
    10594
    10695        $color = $sdpvs_lists->sdpvs_color_list();
Note: See TracChangeset for help on using the changeset viewer.