Commit a76a6633 authored by Canek Peláez's avatar Canek Peláez
Browse files

New name.

parent 469d803a
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -7,27 +7,27 @@ posts and pages, and to show reports on that counting.
Counting words
--------------

![word-counting](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/3d66d398842ccf58ca565136ca29927c/word-counting.png)
![word-counting](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/3d66d398842ccf58ca565136ca29927c/word-counting.png)

Statistics
----------

![statistics](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/6c2ddb6780ca0c38cff2ec95e362b2c0/statistics.png)
![statistics](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/6c2ddb6780ca0c38cff2ec95e362b2c0/statistics.png)

Tables
------

![tables](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/4b1675be1712ff16072b75d4b99b28cc/tables.png)
![tables](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/4b1675be1712ff16072b75d4b99b28cc/tables.png)

Bar charts
----------

![bar-charts](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/62a666528dcedc9fcdb12243985760c0/bar-charts.png)
![bar-charts](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/62a666528dcedc9fcdb12243985760c0/bar-charts.png)

Pie charts
----------

![pie-charts](https://aztlan.fciencias.unam.mx/gitlab/canek/word-count/-/wikis/uploads/f8aa3f9afa8e1f0045d6a443a961fc3b/pie-charts.png)
![pie-charts](https://aztlan.fciencias.unam.mx/gitlab/canek/free-word-count/-/wikis/uploads/f8aa3f9afa8e1f0045d6a443a961fc3b/pie-charts.png)

The charts in the reports are created using the
[apexcharts](https://apexcharts.com/) library, available under the MIT license.
@@ -36,11 +36,11 @@ The charts in the reports are created using the
Installation
------------

Put the `word-count` directory in `${WPDIR}/wp-content/plugins` and activate it
in the plugins section of the admin page. The first time you visit the "Word
count" section, the plugin will start to automatically count the words of all
the published posts and pages. How long will it take depends on the server
machine and the number of posts and pages.
Put the `free-word-count` directory in `${WPDIR}/wp-content/plugins` and
activate it in the plugins section of the admin page. The first time you visit
the "Word count" section, the plugin will start to automatically count the
words of all the published posts and pages. How long will it take depends on
the server machine and the number of posts and pages.

After that, the word count will be automatically updated when you publish posts
and pages; but if you feel is necessary you can trigger the count manually
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ class WordCounter {
        this.intervalId = -1;
        this.progressValue = 0;
        this.baseUrl = siteUrl +
            '/wp-content/plugins/word-count/word-count-progress.php?' +
            '/wp-content/plugins/free-word-count/free-word-count-progress.php?' +
            'key=' + key + '&total=' + total;
        this.relocateUrl = siteUrl + '/wp-admin/admin.php?page=free-word-count';
    }
+1 −1
Original line number Diff line number Diff line
<?php
$base_url = get_site_url() . '/wp-content/plugins/word-count';
$base_url = get_site_url() . '/wp-content/plugins/free-word-count';

$sql = $wpdb->prepare("SELECT SUM(CAST({$wpdb->postmeta}.meta_value AS UNSIGNED)) AS total
                       FROM {$wpdb->posts}, {$wpdb->postmeta}
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ if ($wc_filter == '') {

$results = $wpdb->get_results($sql);
$n = $wpdb->num_rows;
$base_url = get_site_url() . '/wp-content/plugins/word-count';
$base_url = get_site_url() . '/wp-content/plugins/free-word-count';
?>
<script src="<?php echo $base_url; ?>/apexcharts/apexcharts.js"></script>
<div class="wc_section">
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ $wc_page = !empty($_GET["wc-$post_type-page"]) ?
$wc_filter = !empty($_GET["wc-$post_type-filter"]) ?
    $_GET["wc-$post_type-filter"] : '';

$base_url = get_site_url() . '/wp-content/plugins/word-count';
$base_url = get_site_url() . '/wp-content/plugins/free-word-count';

$sql = '';
if ($wc_filter == '') {