Skip to content
GitLab
Explore
Sign in
Commits on Source (3)
New name.
· 469d803a
Canek Peláez Valdés
authored
Jun 07, 2022
469d803a
New name.
· a76a6633
Canek Peláez Valdés
authored
Jun 07, 2022
a76a6633
Update translation.
· 4924023d
Canek Peláez Valdés
authored
Jun 07, 2022
4924023d
Show whitespace changes
Inline
Side-by-side
README.md
View file @
4924023d
...
...
@@ -7,27 +7,27 @@ posts and pages, and to show reports on that counting.
Counting words
--------------


Statistics
----------


Tables
------


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


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


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
...
...
languages/es_MX.po
View file @
4924023d
...
...
@@ -185,14 +185,14 @@ msgstr "Palabras en entradas:"
msgid "Total words:"
msgstr "Total de palabras:"
#: datetime-chart.php:26 top-20-tables.php:81
word-coun
t.php:
21
#:
datetime-chart.php:53
datetime-chart.php:52 datetime-chart.php:55
#:
free-word-count.php:21
top-20-tables.php:119
#: datetime-chart.php:26 top-20-tables.php:81
datetime-char
t.php:
53
#: datetime-chart.php:52 datetime-chart.php:55
free-word-count.php:21
#: top-20-tables.php:119
msgid "Word count"
msgstr "Número de palabras"
#:
word-count.php:21
tab-barcharts.php:8 tab-piecharts.php:8 tab-stats.php:10
#:
tab-tables.php:8
word-count.php:20 tab-stats.php:15 free-word-count.php:20
#: tab-barcharts.php:8 tab-piecharts.php:8 tab-stats.php:10
tab-tables.php:8
#: word-count.php:20 tab-stats.php:15 free-word-count.php:20
#: tab-barcharts.php:5 tab-piecharts.php:5 tab-stats.php:19 tab-tables.php:5
msgid "Word count and statistics for posts and pages"
msgstr "Número de palabras y estadísticas para entradas y páginas"
...
...
page.php
View file @
4924023d
...
...
@@ -5,7 +5,7 @@
define
(
'WC_ROWS_PER_PAGE'
,
20
);
global
$wpdb
;
$taburl
=
get_site_url
()
.
'/wp-admin/admin.php?page=word-count&wc-tab='
;
$taburl
=
get_site_url
()
.
'/wp-admin/admin.php?page=
free-
word-count&wc-tab='
;
function
get_wc_tab
()
{
$wc_tab
=
!
empty
(
$_GET
[
"wc-tab"
])
?
$_GET
[
"wc-tab"
]
:
'tab-stats'
;
...
...
@@ -18,7 +18,7 @@ function get_wc_tab() {
function
echoPage
(
$type
,
$page
,
$current
,
$sep
=
' | '
,
$filter
=
''
)
{
$wc_tab
=
get_wc_tab
();
$url
=
get_site_url
()
.
'/wp-admin/admin.php?page=word-count'
$url
=
get_site_url
()
.
'/wp-admin/admin.php?page=
free-
word-count'
.
"&wc-tab=
$wc_tab
&wc-
$type
-page=
$page
"
;
if
(
$filter
!=
''
)
{
$url
=
$url
.
"&wc-
$type
-filter=
$filter
"
;
...
...
@@ -105,9 +105,9 @@ 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=word-count
'
;
this
.
relocateUrl
=
siteUrl
+
'
/wp-admin/admin.php?page=
free-
word-count
'
;
}
launchInterval
()
{
...
...
tab-stats.php
View file @
4924023d
<?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
}
...
...
top-20-barcharts.php
View file @
4924023d
...
...
@@ -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"
>
...
...
top-20-piecharts.php
View file @
4924023d
...
...
@@ -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
==
''
)
{
...
...