Version Description
- Fix : remove WP_Review
Download this release
Release Info
Developer | NicolasKulka |
Plugin | WPS Hide Login |
Version | 1.8.3 |
Comparing to | |
See all releases |
Code changes from version 1.8.2 to 1.8.3
- composer.json +1 -12
- composer.lock +2 -85
- readme.txt +4 -1
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +2 -20
- vendor/composer/autoload_files.php +0 -12
- vendor/composer/autoload_real.php +4 -22
- vendor/composer/autoload_static.php +2 -8
- vendor/composer/installed.json +1 -90
- vendor/composer/installed.php +2 -20
- vendor/nicolaskulka/wp-dismissible-notices-handler/assets/js/main.js +0 -15
- vendor/nicolaskulka/wp-dismissible-notices-handler/composer.json +0 -18
- vendor/nicolaskulka/wp-dismissible-notices-handler/composer.lock +0 -20
- vendor/nicolaskulka/wp-dismissible-notices-handler/handler.php +0 -603
- vendor/nicolaskulka/wp-dismissible-notices-handler/includes/helper-functions.php +0 -111
- vendor/nicolaskulka/wp-review-me/.gitignore +0 -99
- vendor/nicolaskulka/wp-review-me/README.md +0 -41
- vendor/nicolaskulka/wp-review-me/composer.json +0 -27
- vendor/nicolaskulka/wp-review-me/composer.lock +0 -61
- vendor/nicolaskulka/wp-review-me/review.php +0 -426
- wps-hide-login.php +2 -17
composer.json
CHANGED
@@ -20,18 +20,7 @@
|
|
20 |
"type":"wordpress-plugin",
|
21 |
"minimum-stability":"stable",
|
22 |
"license":"GPL-3.0+",
|
23 |
-
"repositories": [
|
24 |
-
{
|
25 |
-
"type": "vcs",
|
26 |
-
"url": "https://github.com/NicolasKulka/WP-Review-Me"
|
27 |
-
},
|
28 |
-
{
|
29 |
-
"type": "vcs",
|
30 |
-
"url": "https://github.com/NicolasKulka/WP-Dismissible-Notices-Handler"
|
31 |
-
}
|
32 |
-
],
|
33 |
"require":{
|
34 |
-
"php":">=5.6.0"
|
35 |
-
"nicolaskulka/wp-review-me":"2.6"
|
36 |
}
|
37 |
}
|
20 |
"type":"wordpress-plugin",
|
21 |
"minimum-stability":"stable",
|
22 |
"license":"GPL-3.0+",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
"require":{
|
24 |
+
"php":">=5.6.0"
|
|
|
25 |
}
|
26 |
}
|
composer.lock
CHANGED
@@ -4,91 +4,8 @@
|
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
-
"content-hash": "
|
8 |
-
"packages": [
|
9 |
-
{
|
10 |
-
"name": "nicolaskulka/wp-dismissible-notices-handler",
|
11 |
-
"version": "2.2",
|
12 |
-
"source": {
|
13 |
-
"type": "git",
|
14 |
-
"url": "https://github.com/NicolasKulka/WP-Dismissible-Notices-Handler.git",
|
15 |
-
"reference": "7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a"
|
16 |
-
},
|
17 |
-
"dist": {
|
18 |
-
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/NicolasKulka/WP-Dismissible-Notices-Handler/zipball/7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a",
|
20 |
-
"reference": "7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a",
|
21 |
-
"shasum": ""
|
22 |
-
},
|
23 |
-
"require": {
|
24 |
-
"php": ">=5.5.0"
|
25 |
-
},
|
26 |
-
"type": "library",
|
27 |
-
"autoload": {
|
28 |
-
"files": [
|
29 |
-
"handler.php",
|
30 |
-
"includes/helper-functions.php"
|
31 |
-
]
|
32 |
-
},
|
33 |
-
"license": [
|
34 |
-
"GNU GPL"
|
35 |
-
],
|
36 |
-
"authors": [
|
37 |
-
{
|
38 |
-
"name": "Nicolas KULKA",
|
39 |
-
"role": "Lead Developer"
|
40 |
-
}
|
41 |
-
],
|
42 |
-
"description": "A simple library to handle Ajax-dismissible admin notices for WordPress",
|
43 |
-
"homepage": "https://github.com/nicolaskulka/WP-Dismissible-Notices-Handler",
|
44 |
-
"support": {
|
45 |
-
"source": "https://github.com/NicolasKulka/WP-Dismissible-Notices-Handler/tree/2.2"
|
46 |
-
},
|
47 |
-
"time": "2021-02-15T08:45:53+00:00"
|
48 |
-
},
|
49 |
-
{
|
50 |
-
"name": "nicolaskulka/wp-review-me",
|
51 |
-
"version": "2.6",
|
52 |
-
"source": {
|
53 |
-
"type": "git",
|
54 |
-
"url": "https://github.com/NicolasKulka/WP-Review-Me.git",
|
55 |
-
"reference": "a9737a9a4e54c90715c0ca151042e3f4404fafde"
|
56 |
-
},
|
57 |
-
"dist": {
|
58 |
-
"type": "zip",
|
59 |
-
"url": "https://api.github.com/repos/NicolasKulka/WP-Review-Me/zipball/a9737a9a4e54c90715c0ca151042e3f4404fafde",
|
60 |
-
"reference": "a9737a9a4e54c90715c0ca151042e3f4404fafde",
|
61 |
-
"shasum": ""
|
62 |
-
},
|
63 |
-
"require": {
|
64 |
-
"nicolaskulka/wp-dismissible-notices-handler": "2.*",
|
65 |
-
"php": ">=5.5.0"
|
66 |
-
},
|
67 |
-
"type": "library",
|
68 |
-
"autoload": {
|
69 |
-
"files": [
|
70 |
-
"review.php"
|
71 |
-
]
|
72 |
-
},
|
73 |
-
"license": [
|
74 |
-
"GNU GPL"
|
75 |
-
],
|
76 |
-
"authors": [
|
77 |
-
{
|
78 |
-
"name": "Julien Liabeuf",
|
79 |
-
"email": "julien@liabeuf.fr",
|
80 |
-
"homepage": "https://julienliabeuf.com",
|
81 |
-
"role": "Lead Developer"
|
82 |
-
}
|
83 |
-
],
|
84 |
-
"description": "A lightweight library to help you get more reviews for your WordPress theme/plugin",
|
85 |
-
"homepage": "https://github.com/julien731/WP-Review-Me",
|
86 |
-
"support": {
|
87 |
-
"source": "https://github.com/NicolasKulka/WP-Review-Me/tree/2.6"
|
88 |
-
},
|
89 |
-
"time": "2021-02-15T11:24:26+00:00"
|
90 |
-
}
|
91 |
-
],
|
92 |
"packages-dev": [],
|
93 |
"aliases": [],
|
94 |
"minimum-stability": "stable",
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
+
"content-hash": "e024bb1a877d0251697a6d6a4a9889bf",
|
8 |
+
"packages": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
"packages-dev": [],
|
10 |
"aliases": [],
|
11 |
"minimum-stability": "stable",
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: rename, login, wp-login, wp-login.php, custom login url, jetpack, wpserveu
|
|
6 |
Requires at least: 4.1
|
7 |
Tested up to: 5.6
|
8 |
Requires PHP: 7.0
|
9 |
-
Stable tag: 1.8.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -148,6 +148,9 @@ La première étape consiste à vérifier votre fichier .htaccess et à le compa
|
|
148 |
|
149 |
== Changelog ==
|
150 |
|
|
|
|
|
|
|
151 |
= 1.8.2 =
|
152 |
* Fix notice "Notice: Trying to get property 'href' of non-object"
|
153 |
|
6 |
Requires at least: 4.1
|
7 |
Tested up to: 5.6
|
8 |
Requires PHP: 7.0
|
9 |
+
Stable tag: 1.8.3
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
148 |
|
149 |
== Changelog ==
|
150 |
|
151 |
+
= 1.8.3 =
|
152 |
+
* Fix : remove WP_Review
|
153 |
+
|
154 |
= 1.8.2 =
|
155 |
* Fix notice "Notice: Trying to get property 'href' of non-object"
|
156 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit61bdb0bca1f1b58fe7a242db89796976::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -29,29 +29,11 @@ private static $installed = array (
|
|
29 |
'aliases' =>
|
30 |
array (
|
31 |
),
|
32 |
-
'reference' => '
|
33 |
'name' => 'wpserveur/wps-hide-login',
|
34 |
),
|
35 |
'versions' =>
|
36 |
array (
|
37 |
-
'nicolaskulka/wp-dismissible-notices-handler' =>
|
38 |
-
array (
|
39 |
-
'pretty_version' => '2.2',
|
40 |
-
'version' => '2.2.0.0',
|
41 |
-
'aliases' =>
|
42 |
-
array (
|
43 |
-
),
|
44 |
-
'reference' => '7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a',
|
45 |
-
),
|
46 |
-
'nicolaskulka/wp-review-me' =>
|
47 |
-
array (
|
48 |
-
'pretty_version' => '2.6',
|
49 |
-
'version' => '2.6.0.0',
|
50 |
-
'aliases' =>
|
51 |
-
array (
|
52 |
-
),
|
53 |
-
'reference' => 'a9737a9a4e54c90715c0ca151042e3f4404fafde',
|
54 |
-
),
|
55 |
'wpserveur/wps-hide-login' =>
|
56 |
array (
|
57 |
'pretty_version' => 'dev-master',
|
@@ -59,7 +41,7 @@ private static $installed = array (
|
|
59 |
'aliases' =>
|
60 |
array (
|
61 |
),
|
62 |
-
'reference' => '
|
63 |
),
|
64 |
),
|
65 |
);
|
29 |
'aliases' =>
|
30 |
array (
|
31 |
),
|
32 |
+
'reference' => 'b5e6b4b4eb62e09232ee56e208eba9ae337d3ee8',
|
33 |
'name' => 'wpserveur/wps-hide-login',
|
34 |
),
|
35 |
'versions' =>
|
36 |
array (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
'wpserveur/wps-hide-login' =>
|
38 |
array (
|
39 |
'pretty_version' => 'dev-master',
|
41 |
'aliases' =>
|
42 |
array (
|
43 |
),
|
44 |
+
'reference' => 'b5e6b4b4eb62e09232ee56e208eba9ae337d3ee8',
|
45 |
),
|
46 |
),
|
47 |
);
|
vendor/composer/autoload_files.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// autoload_files.php @generated by Composer
|
4 |
-
|
5 |
-
$vendorDir = dirname(dirname(__FILE__));
|
6 |
-
$baseDir = dirname($vendorDir);
|
7 |
-
|
8 |
-
return array(
|
9 |
-
'75114bb77681cceeacec8e9fdc25fe5f' => $vendorDir . '/nicolaskulka/wp-dismissible-notices-handler/handler.php',
|
10 |
-
'02e78d03a068280c2da71f3d013fe5e3' => $vendorDir . '/nicolaskulka/wp-dismissible-notices-handler/includes/helper-functions.php',
|
11 |
-
'642f204a71b38c9724089b10b2126d4f' => $vendorDir . '/nicolaskulka/wp-review-me/review.php',
|
12 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit393b2abbc4f40fa5ed9a0e7160b5b801
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
@@ -52,24 +52,6 @@ class ComposerAutoloaderInit393b2abbc4f40fa5ed9a0e7160b5b801
|
|
52 |
|
53 |
$loader->register(true);
|
54 |
|
55 |
-
if ($useStaticLoader) {
|
56 |
-
$includeFiles = Composer\Autoload\ComposerStaticInit393b2abbc4f40fa5ed9a0e7160b5b801::$files;
|
57 |
-
} else {
|
58 |
-
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
-
}
|
60 |
-
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
composerRequire393b2abbc4f40fa5ed9a0e7160b5b801($fileIdentifier, $file);
|
62 |
-
}
|
63 |
-
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
-
|
68 |
-
function composerRequire393b2abbc4f40fa5ed9a0e7160b5b801($fileIdentifier, $file)
|
69 |
-
{
|
70 |
-
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
-
require $file;
|
72 |
-
|
73 |
-
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
74 |
-
}
|
75 |
-
}
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit61bdb0bca1f1b58fe7a242db89796976
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit61bdb0bca1f1b58fe7a242db89796976', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit61bdb0bca1f1b58fe7a242db89796976', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit61bdb0bca1f1b58fe7a242db89796976::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
52 |
|
53 |
$loader->register(true);
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
return $loader;
|
56 |
}
|
57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,14 +4,8 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
-
public static $files = array (
|
10 |
-
'75114bb77681cceeacec8e9fdc25fe5f' => __DIR__ . '/..' . '/nicolaskulka/wp-dismissible-notices-handler/handler.php',
|
11 |
-
'02e78d03a068280c2da71f3d013fe5e3' => __DIR__ . '/..' . '/nicolaskulka/wp-dismissible-notices-handler/includes/helper-functions.php',
|
12 |
-
'642f204a71b38c9724089b10b2126d4f' => __DIR__ . '/..' . '/nicolaskulka/wp-review-me/review.php',
|
13 |
-
);
|
14 |
-
|
15 |
public static $classMap = array (
|
16 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
17 |
);
|
@@ -19,7 +13,7 @@ class ComposerStaticInit393b2abbc4f40fa5ed9a0e7160b5b801
|
|
19 |
public static function getInitializer(ClassLoader $loader)
|
20 |
{
|
21 |
return \Closure::bind(function () use ($loader) {
|
22 |
-
$loader->classMap =
|
23 |
|
24 |
}, null, ClassLoader::class);
|
25 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit61bdb0bca1f1b58fe7a242db89796976
|
8 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
public static $classMap = array (
|
10 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
11 |
);
|
13 |
public static function getInitializer(ClassLoader $loader)
|
14 |
{
|
15 |
return \Closure::bind(function () use ($loader) {
|
16 |
+
$loader->classMap = ComposerStaticInit61bdb0bca1f1b58fe7a242db89796976::$classMap;
|
17 |
|
18 |
}, null, ClassLoader::class);
|
19 |
}
|
vendor/composer/installed.json
CHANGED
@@ -1,94 +1,5 @@
|
|
1 |
{
|
2 |
-
"packages": [
|
3 |
-
{
|
4 |
-
"name": "nicolaskulka/wp-dismissible-notices-handler",
|
5 |
-
"version": "2.2",
|
6 |
-
"version_normalized": "2.2.0.0",
|
7 |
-
"source": {
|
8 |
-
"type": "git",
|
9 |
-
"url": "https://github.com/NicolasKulka/WP-Dismissible-Notices-Handler.git",
|
10 |
-
"reference": "7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a"
|
11 |
-
},
|
12 |
-
"dist": {
|
13 |
-
"type": "zip",
|
14 |
-
"url": "https://api.github.com/repos/NicolasKulka/WP-Dismissible-Notices-Handler/zipball/7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a",
|
15 |
-
"reference": "7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a",
|
16 |
-
"shasum": ""
|
17 |
-
},
|
18 |
-
"require": {
|
19 |
-
"php": ">=5.5.0"
|
20 |
-
},
|
21 |
-
"time": "2021-02-15T08:45:53+00:00",
|
22 |
-
"type": "library",
|
23 |
-
"installation-source": "dist",
|
24 |
-
"autoload": {
|
25 |
-
"files": [
|
26 |
-
"handler.php",
|
27 |
-
"includes/helper-functions.php"
|
28 |
-
]
|
29 |
-
},
|
30 |
-
"license": [
|
31 |
-
"GNU GPL"
|
32 |
-
],
|
33 |
-
"authors": [
|
34 |
-
{
|
35 |
-
"name": "Nicolas KULKA",
|
36 |
-
"role": "Lead Developer"
|
37 |
-
}
|
38 |
-
],
|
39 |
-
"description": "A simple library to handle Ajax-dismissible admin notices for WordPress",
|
40 |
-
"homepage": "https://github.com/nicolaskulka/WP-Dismissible-Notices-Handler",
|
41 |
-
"support": {
|
42 |
-
"source": "https://github.com/NicolasKulka/WP-Dismissible-Notices-Handler/tree/2.2"
|
43 |
-
},
|
44 |
-
"install-path": "../nicolaskulka/wp-dismissible-notices-handler"
|
45 |
-
},
|
46 |
-
{
|
47 |
-
"name": "nicolaskulka/wp-review-me",
|
48 |
-
"version": "2.6",
|
49 |
-
"version_normalized": "2.6.0.0",
|
50 |
-
"source": {
|
51 |
-
"type": "git",
|
52 |
-
"url": "https://github.com/NicolasKulka/WP-Review-Me.git",
|
53 |
-
"reference": "a9737a9a4e54c90715c0ca151042e3f4404fafde"
|
54 |
-
},
|
55 |
-
"dist": {
|
56 |
-
"type": "zip",
|
57 |
-
"url": "https://api.github.com/repos/NicolasKulka/WP-Review-Me/zipball/a9737a9a4e54c90715c0ca151042e3f4404fafde",
|
58 |
-
"reference": "a9737a9a4e54c90715c0ca151042e3f4404fafde",
|
59 |
-
"shasum": ""
|
60 |
-
},
|
61 |
-
"require": {
|
62 |
-
"nicolaskulka/wp-dismissible-notices-handler": "2.*",
|
63 |
-
"php": ">=5.5.0"
|
64 |
-
},
|
65 |
-
"time": "2021-02-15T11:24:26+00:00",
|
66 |
-
"type": "library",
|
67 |
-
"installation-source": "dist",
|
68 |
-
"autoload": {
|
69 |
-
"files": [
|
70 |
-
"review.php"
|
71 |
-
]
|
72 |
-
},
|
73 |
-
"license": [
|
74 |
-
"GNU GPL"
|
75 |
-
],
|
76 |
-
"authors": [
|
77 |
-
{
|
78 |
-
"name": "Julien Liabeuf",
|
79 |
-
"email": "julien@liabeuf.fr",
|
80 |
-
"homepage": "https://julienliabeuf.com",
|
81 |
-
"role": "Lead Developer"
|
82 |
-
}
|
83 |
-
],
|
84 |
-
"description": "A lightweight library to help you get more reviews for your WordPress theme/plugin",
|
85 |
-
"homepage": "https://github.com/julien731/WP-Review-Me",
|
86 |
-
"support": {
|
87 |
-
"source": "https://github.com/NicolasKulka/WP-Review-Me/tree/2.6"
|
88 |
-
},
|
89 |
-
"install-path": "../nicolaskulka/wp-review-me"
|
90 |
-
}
|
91 |
-
],
|
92 |
"dev": true,
|
93 |
"dev-package-names": []
|
94 |
}
|
1 |
{
|
2 |
+
"packages": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"dev": true,
|
4 |
"dev-package-names": []
|
5 |
}
|
vendor/composer/installed.php
CHANGED
@@ -6,29 +6,11 @@
|
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
-
'reference' => '
|
10 |
'name' => 'wpserveur/wps-hide-login',
|
11 |
),
|
12 |
'versions' =>
|
13 |
array (
|
14 |
-
'nicolaskulka/wp-dismissible-notices-handler' =>
|
15 |
-
array (
|
16 |
-
'pretty_version' => '2.2',
|
17 |
-
'version' => '2.2.0.0',
|
18 |
-
'aliases' =>
|
19 |
-
array (
|
20 |
-
),
|
21 |
-
'reference' => '7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a',
|
22 |
-
),
|
23 |
-
'nicolaskulka/wp-review-me' =>
|
24 |
-
array (
|
25 |
-
'pretty_version' => '2.6',
|
26 |
-
'version' => '2.6.0.0',
|
27 |
-
'aliases' =>
|
28 |
-
array (
|
29 |
-
),
|
30 |
-
'reference' => 'a9737a9a4e54c90715c0ca151042e3f4404fafde',
|
31 |
-
),
|
32 |
'wpserveur/wps-hide-login' =>
|
33 |
array (
|
34 |
'pretty_version' => 'dev-master',
|
@@ -36,7 +18,7 @@
|
|
36 |
'aliases' =>
|
37 |
array (
|
38 |
),
|
39 |
-
'reference' => '
|
40 |
),
|
41 |
),
|
42 |
);
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
+
'reference' => 'b5e6b4b4eb62e09232ee56e208eba9ae337d3ee8',
|
10 |
'name' => 'wpserveur/wps-hide-login',
|
11 |
),
|
12 |
'versions' =>
|
13 |
array (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
'wpserveur/wps-hide-login' =>
|
15 |
array (
|
16 |
'pretty_version' => 'dev-master',
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|
21 |
+
'reference' => 'b5e6b4b4eb62e09232ee56e208eba9ae337d3ee8',
|
22 |
),
|
23 |
),
|
24 |
);
|
vendor/nicolaskulka/wp-dismissible-notices-handler/assets/js/main.js
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
-
$( '.notice.is-dismissible' ).on('click', '.notice-dismiss', function ( event ) {
|
3 |
-
event.preventDefault();
|
4 |
-
var $this = $(this);
|
5 |
-
if( 'undefined' == $this.parent().attr('id') ){
|
6 |
-
return;
|
7 |
-
}
|
8 |
-
$.post( ajaxurl, {
|
9 |
-
action: 'dnh_dismiss_notice',
|
10 |
-
url: ajaxurl,
|
11 |
-
id: $this.parent().attr('id')
|
12 |
-
});
|
13 |
-
|
14 |
-
});
|
15 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-dismissible-notices-handler/composer.json
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "nicolaskulka/wp-dismissible-notices-handler",
|
3 |
-
"description": "A simple library to handle Ajax-dismissible admin notices for WordPress",
|
4 |
-
"homepage": "https://github.com/nicolaskulka/WP-Dismissible-Notices-Handler",
|
5 |
-
"license": "GNU GPL",
|
6 |
-
"authors": [
|
7 |
-
{
|
8 |
-
"name": "Nicolas KULKA",
|
9 |
-
"role": "Lead Developer"
|
10 |
-
}
|
11 |
-
],
|
12 |
-
"require": {
|
13 |
-
"php": ">=5.5.0"
|
14 |
-
},
|
15 |
-
"autoload": {
|
16 |
-
"files": ["handler.php", "includes/helper-functions.php"]
|
17 |
-
}
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-dismissible-notices-handler/composer.lock
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_readme": [
|
3 |
-
"This file locks the dependencies of your project to a known state",
|
4 |
-
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
-
"This file is @generated automatically"
|
6 |
-
],
|
7 |
-
"content-hash": "0d715d215f12a7f1d9e4cfe0829fe95e",
|
8 |
-
"packages": [],
|
9 |
-
"packages-dev": [],
|
10 |
-
"aliases": [],
|
11 |
-
"minimum-stability": "stable",
|
12 |
-
"stability-flags": [],
|
13 |
-
"prefer-stable": false,
|
14 |
-
"prefer-lowest": false,
|
15 |
-
"platform": {
|
16 |
-
"php": ">=5.5.0"
|
17 |
-
},
|
18 |
-
"platform-dev": [],
|
19 |
-
"plugin-api-version": "2.0.0"
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-dismissible-notices-handler/handler.php
DELETED
@@ -1,603 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Dismissible Notices Handler.
|
4 |
-
*
|
5 |
-
* This library is designed to handle dismissible admin notices.
|
6 |
-
*
|
7 |
-
* LICENSE: This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
8 |
-
* General Public License as published by the Free Software Foundation; either version 3 of the License, or (at
|
9 |
-
* your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
10 |
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11 |
-
* General Public License for more details. You should have received a copy of the GNU General Public License along
|
12 |
-
* with this program. If not, see <http://opensource.org/licenses/gpl-license.php>
|
13 |
-
*
|
14 |
-
* @package Dismissible Notices Handler
|
15 |
-
* @author Julien Liabeuf <julien@liabeuf.fr>
|
16 |
-
* @version 1.2.0
|
17 |
-
* @license GPL-2.0+
|
18 |
-
* @link https://julienliabeuf.com
|
19 |
-
* @copyright 2018 Julien Liabeuf
|
20 |
-
*/
|
21 |
-
|
22 |
-
if ( ! class_exists( 'Dismissible_Notices_Handler' ) ) {
|
23 |
-
|
24 |
-
final class Dismissible_Notices_Handler {
|
25 |
-
|
26 |
-
/**
|
27 |
-
* @var Dismissible_Notices_Handler Holds the unique instance of the handler
|
28 |
-
* @since 1.0
|
29 |
-
*/
|
30 |
-
private static $instance;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Library version
|
34 |
-
*
|
35 |
-
* @since 1.0
|
36 |
-
* @var string
|
37 |
-
*/
|
38 |
-
public $version = '1.2.1';
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Required version of PHP.
|
42 |
-
*
|
43 |
-
* @since 1.0
|
44 |
-
* @var string
|
45 |
-
*/
|
46 |
-
public $php_version_required = '5.5';
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Minimum version of WordPress required to use the library
|
50 |
-
*
|
51 |
-
* @since 1.0
|
52 |
-
* @var string
|
53 |
-
*/
|
54 |
-
public $wordpress_version_required = '4.7';
|
55 |
-
|
56 |
-
/**
|
57 |
-
* @var array Holds all our registered notices
|
58 |
-
* @since 1.0
|
59 |
-
*/
|
60 |
-
private $notices;
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Instantiate and return the unique Dismissible_Notices_Handler object
|
64 |
-
*
|
65 |
-
* @since 1.0
|
66 |
-
* @return object Dismissible_Notices_Handler Unique instance of the handler
|
67 |
-
*/
|
68 |
-
public static function instance() {
|
69 |
-
|
70 |
-
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Dismissible_Notices_Handler ) ) {
|
71 |
-
self::$instance = new Dismissible_Notices_Handler;
|
72 |
-
self::$instance->init();
|
73 |
-
}
|
74 |
-
|
75 |
-
return self::$instance;
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Initialize the library
|
81 |
-
*
|
82 |
-
* @since 1.0
|
83 |
-
* @return void
|
84 |
-
*/
|
85 |
-
private function init() {
|
86 |
-
|
87 |
-
// Make sure WordPress is compatible
|
88 |
-
if ( ! self::$instance->is_wp_compatible() ) {
|
89 |
-
/*self::$instance->spit_error(
|
90 |
-
sprintf(
|
91 |
-
esc_html__( 'The library can not be used because your version of WordPress is too old. You need version %s at least.', 'wp-dismissible-notices-handler' ),
|
92 |
-
self::$instance->wordpress_version_required
|
93 |
-
)
|
94 |
-
);*/
|
95 |
-
|
96 |
-
return;
|
97 |
-
}
|
98 |
-
|
99 |
-
// Make sure PHP is compatible
|
100 |
-
if ( ! self::$instance->is_php_compatible() ) {
|
101 |
-
self::$instance->spit_error(
|
102 |
-
sprintf(
|
103 |
-
/* translators: %s: required php version */
|
104 |
-
esc_html__( 'The library can not be used because your version of PHP is too old. You need version %s at least.', 'wp-dismissible-notices-handler' ),
|
105 |
-
self::$instance->php_version_required
|
106 |
-
)
|
107 |
-
);
|
108 |
-
|
109 |
-
return;
|
110 |
-
}
|
111 |
-
|
112 |
-
add_action( 'admin_notices', array( self::$instance, 'display' ) );
|
113 |
-
add_action( 'admin_print_scripts', array( self::$instance, 'load_script' ) );
|
114 |
-
add_action( 'wp_ajax_dnh_dismiss_notice', array( self::$instance, 'dismiss_notice_ajax' ) );
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Check if the current WordPress version fits the requirements
|
120 |
-
*
|
121 |
-
* @since 1.0
|
122 |
-
* @return boolean
|
123 |
-
*/
|
124 |
-
private function is_wp_compatible() {
|
125 |
-
|
126 |
-
if ( version_compare( get_bloginfo( 'version' ), self::$instance->wordpress_version_required, '<' ) ) {
|
127 |
-
return false;
|
128 |
-
}
|
129 |
-
|
130 |
-
return true;
|
131 |
-
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Check if the version of PHP is compatible with this library
|
136 |
-
*
|
137 |
-
* @since 1.0
|
138 |
-
* @return boolean
|
139 |
-
*/
|
140 |
-
private function is_php_compatible() {
|
141 |
-
|
142 |
-
if ( version_compare( phpversion(), self::$instance->php_version_required, '<' ) ) {
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
|
146 |
-
return true;
|
147 |
-
|
148 |
-
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Load the script
|
152 |
-
*
|
153 |
-
* @since 1.0
|
154 |
-
* @return void
|
155 |
-
*/
|
156 |
-
public function load_script() {
|
157 |
-
wp_register_script( 'dnh', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'assets/js/main.js', array( 'jquery' ), self::$instance->version, true );
|
158 |
-
wp_enqueue_script( 'dnh' );
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Display all the registered notices
|
163 |
-
*
|
164 |
-
* @since 1.0
|
165 |
-
* @return void
|
166 |
-
*/
|
167 |
-
public function display() {
|
168 |
-
|
169 |
-
if ( is_null( self::$instance->notices ) || empty( self::$instance->notices ) ) {
|
170 |
-
return;
|
171 |
-
}
|
172 |
-
|
173 |
-
foreach ( self::$instance->notices as $id => $notice ) {
|
174 |
-
|
175 |
-
$id = self::$instance->get_id( $id );
|
176 |
-
|
177 |
-
// Check if the notice was dismissed
|
178 |
-
if ( self::$instance->is_dismissed( $id ) ) {
|
179 |
-
continue;
|
180 |
-
}
|
181 |
-
|
182 |
-
// Check if the current user has required capability
|
183 |
-
if ( ! empty( $notice['cap'] ) && ! current_user_can( $notice['cap'] ) ) {
|
184 |
-
continue;
|
185 |
-
}
|
186 |
-
|
187 |
-
$class = array(
|
188 |
-
'notice',
|
189 |
-
$notice['type'],
|
190 |
-
'is-dismissible',
|
191 |
-
$notice['class'],
|
192 |
-
);
|
193 |
-
|
194 |
-
printf( '<div id="%3$s" class="%1$s"><p>%2$s</p></div>', trim( implode( ' ', $class ) ), $notice['content'], "dnh-$id" );
|
195 |
-
|
196 |
-
}
|
197 |
-
|
198 |
-
}
|
199 |
-
|
200 |
-
/**
|
201 |
-
* Spits an error message at the top of the admin screen
|
202 |
-
*
|
203 |
-
* @since 1.0
|
204 |
-
*
|
205 |
-
* @param string $error Error message to spit
|
206 |
-
*
|
207 |
-
* @return void
|
208 |
-
*/
|
209 |
-
protected function spit_error( $error ) {
|
210 |
-
printf(
|
211 |
-
'<div style="margin: 20px; text-align: center;"><strong>%1$s</strong> %2$s</pre></div>',
|
212 |
-
esc_html__( 'Dismissible Notices Handler Error:', 'wp-dismissible-notices-handler' ),
|
213 |
-
wp_kses_post( $error )
|
214 |
-
);
|
215 |
-
}
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Sanitize a notice ID and return it
|
219 |
-
*
|
220 |
-
* @since 1.0
|
221 |
-
*
|
222 |
-
* @param string $id
|
223 |
-
*
|
224 |
-
* @return string
|
225 |
-
*/
|
226 |
-
public function get_id( $id ) {
|
227 |
-
return sanitize_key( $id );
|
228 |
-
}
|
229 |
-
|
230 |
-
/**
|
231 |
-
* Get available notice types
|
232 |
-
*
|
233 |
-
* @since 1.0
|
234 |
-
* @return array
|
235 |
-
*/
|
236 |
-
public function get_types() {
|
237 |
-
|
238 |
-
$types = array(
|
239 |
-
'error',
|
240 |
-
'updated',
|
241 |
-
// New types of notification style.
|
242 |
-
'notice-error',
|
243 |
-
'notice-warning',
|
244 |
-
'notice-success',
|
245 |
-
'notice-info',
|
246 |
-
);
|
247 |
-
|
248 |
-
return apply_filters( 'dnh_notice_types', $types );
|
249 |
-
|
250 |
-
}
|
251 |
-
|
252 |
-
/**
|
253 |
-
* Get the default arguments for a notice
|
254 |
-
*
|
255 |
-
* @since 1.0
|
256 |
-
* @return array
|
257 |
-
*/
|
258 |
-
private function default_args() {
|
259 |
-
|
260 |
-
$args = array(
|
261 |
-
'screen' => '', // Coming soon
|
262 |
-
'scope' => 'user', // Scope of the dismissal. Either user or global
|
263 |
-
'cap' => '', // Required user capability
|
264 |
-
'class' => '', // Additional class to add to the notice
|
265 |
-
);
|
266 |
-
|
267 |
-
return apply_filters( 'dnh_default_args', $args );
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Register a new notice
|
273 |
-
*
|
274 |
-
* @since 1.0
|
275 |
-
*
|
276 |
-
* @param string $id Notice ID, used to identify it
|
277 |
-
* @param string $type Type of notice to display
|
278 |
-
* @param string $content Notice content
|
279 |
-
* @param array $args Additional parameters
|
280 |
-
*
|
281 |
-
* @return bool
|
282 |
-
*/
|
283 |
-
public function register_notice( $id, $type, $content, $args = array() ) {
|
284 |
-
|
285 |
-
if ( is_null( self::$instance->notices ) ) {
|
286 |
-
self::$instance->notices = array();
|
287 |
-
}
|
288 |
-
|
289 |
-
$id = self::$instance->get_id( $id );
|
290 |
-
$type = in_array( $t = sanitize_text_field( $type ), self::$instance->get_types() ) ? $t : 'updated';
|
291 |
-
$content = wp_kses_post( $content );
|
292 |
-
$args = wp_parse_args( $args, self::$instance->default_args() );
|
293 |
-
|
294 |
-
if ( array_key_exists( $id, self::$instance->notices ) ) {
|
295 |
-
|
296 |
-
self::$instance->spit_error(
|
297 |
-
sprintf(
|
298 |
-
/* translators: %s: required php version */
|
299 |
-
esc_html__( 'A notice with the ID %s has already been registered.', 'wp-dismissible-notices-handler' ),
|
300 |
-
"<code>$id</code>"
|
301 |
-
)
|
302 |
-
);
|
303 |
-
|
304 |
-
return false;
|
305 |
-
}
|
306 |
-
|
307 |
-
$notice = array(
|
308 |
-
'type' => $type,
|
309 |
-
'content' => $content,
|
310 |
-
);
|
311 |
-
|
312 |
-
$notice = array_merge( $notice, $args );
|
313 |
-
|
314 |
-
self::$instance->notices[ $id ] = $notice;
|
315 |
-
|
316 |
-
return true;
|
317 |
-
|
318 |
-
}
|
319 |
-
|
320 |
-
/**
|
321 |
-
* Notice dismissal triggered by Ajax
|
322 |
-
*
|
323 |
-
* @since 1.0
|
324 |
-
* @return void
|
325 |
-
*/
|
326 |
-
public function dismiss_notice_ajax() {
|
327 |
-
|
328 |
-
if ( ! isset( $_POST['id'] ) ) {
|
329 |
-
echo 0;
|
330 |
-
exit;
|
331 |
-
}
|
332 |
-
|
333 |
-
if ( empty( $_POST['id'] ) || false === strpos( $_POST['id'], 'dnh-' ) ) {
|
334 |
-
echo 0;
|
335 |
-
exit;
|
336 |
-
}
|
337 |
-
|
338 |
-
$id = self::$instance->get_id( str_replace( 'dnh-', '', $_POST['id'] ) );
|
339 |
-
|
340 |
-
echo self::$instance->dismiss_notice( $id );
|
341 |
-
exit;
|
342 |
-
|
343 |
-
}
|
344 |
-
|
345 |
-
/**
|
346 |
-
* Dismiss a notice
|
347 |
-
*
|
348 |
-
* @since 1.0
|
349 |
-
*
|
350 |
-
* @param string $id ID of the notice to dismiss
|
351 |
-
*
|
352 |
-
* @return bool
|
353 |
-
*/
|
354 |
-
public function dismiss_notice( $id ) {
|
355 |
-
|
356 |
-
$notice = self::$instance->get_notice( self::$instance->get_id( $id ) );
|
357 |
-
|
358 |
-
if ( false === $notice ) {
|
359 |
-
return false;
|
360 |
-
}
|
361 |
-
|
362 |
-
if ( self::$instance->is_dismissed( $id ) ) {
|
363 |
-
return false;
|
364 |
-
}
|
365 |
-
|
366 |
-
return 'user' === $notice['scope'] ? self::$instance->dismiss_user( $id ) : self::$instance->dismiss_global( $id );
|
367 |
-
|
368 |
-
}
|
369 |
-
|
370 |
-
/**
|
371 |
-
* Dismiss notice for the current user
|
372 |
-
*
|
373 |
-
* @since 1.0
|
374 |
-
*
|
375 |
-
* @param string $id Notice ID
|
376 |
-
*
|
377 |
-
* @return int|bool
|
378 |
-
*/
|
379 |
-
private function dismiss_user( $id ) {
|
380 |
-
|
381 |
-
$dismissed = self::$instance->dismissed_user();
|
382 |
-
|
383 |
-
if ( in_array( $id, $dismissed ) ) {
|
384 |
-
return false;
|
385 |
-
}
|
386 |
-
|
387 |
-
array_push( $dismissed, $id );
|
388 |
-
|
389 |
-
return update_user_meta( get_current_user_id(), 'dnh_dismissed_notices', $dismissed );
|
390 |
-
|
391 |
-
}
|
392 |
-
|
393 |
-
/**
|
394 |
-
* Dismiss notice globally on the site
|
395 |
-
*
|
396 |
-
* @since 1.0
|
397 |
-
*
|
398 |
-
* @param string $id Notice ID
|
399 |
-
*
|
400 |
-
* @return bool
|
401 |
-
*/
|
402 |
-
private function dismiss_global( $id ) {
|
403 |
-
|
404 |
-
$dismissed = self::$instance->dismissed_global();
|
405 |
-
|
406 |
-
if ( in_array( $id, $dismissed ) ) {
|
407 |
-
return false;
|
408 |
-
}
|
409 |
-
|
410 |
-
array_push( $dismissed, $id );
|
411 |
-
|
412 |
-
return update_option( 'dnh_dismissed_notices', $dismissed );
|
413 |
-
|
414 |
-
}
|
415 |
-
|
416 |
-
/**
|
417 |
-
* Restore a dismissed notice
|
418 |
-
*
|
419 |
-
* @since 1.0
|
420 |
-
*
|
421 |
-
* @param string $id ID of the notice to restore
|
422 |
-
*
|
423 |
-
* @return bool
|
424 |
-
*/
|
425 |
-
public function restore_notice( $id ) {
|
426 |
-
|
427 |
-
$id = self::$instance->get_id( $id );
|
428 |
-
$notice = self::$instance->get_notice( $id );
|
429 |
-
|
430 |
-
if ( false === $notice ) {
|
431 |
-
return false;
|
432 |
-
}
|
433 |
-
|
434 |
-
return 'user' === $notice['scope'] ? self::$instance->restore_user( $id ) : self::$instance->restore_global( $id );
|
435 |
-
|
436 |
-
}
|
437 |
-
|
438 |
-
/**
|
439 |
-
* Restore a notice dismissed by the current user
|
440 |
-
*
|
441 |
-
* @since 1.0
|
442 |
-
*
|
443 |
-
* @param string $id ID of the notice to restore
|
444 |
-
*
|
445 |
-
* @return bool
|
446 |
-
*/
|
447 |
-
private function restore_user( $id ) {
|
448 |
-
|
449 |
-
$id = self::$instance->get_id( $id );
|
450 |
-
$notice = self::$instance->get_notice( $id );
|
451 |
-
|
452 |
-
if ( false === $notice ) {
|
453 |
-
return false;
|
454 |
-
}
|
455 |
-
|
456 |
-
$dismissed = self::$instance->dismissed_user();
|
457 |
-
|
458 |
-
if ( ! in_array( $id, $dismissed ) ) {
|
459 |
-
return false;
|
460 |
-
}
|
461 |
-
|
462 |
-
$flip = array_flip( $dismissed );
|
463 |
-
$key = $flip[ $id ];
|
464 |
-
|
465 |
-
unset( $dismissed[ $key ] );
|
466 |
-
|
467 |
-
return update_user_meta( get_current_user_id(), 'dnh_dismissed_notices', $dismissed );
|
468 |
-
|
469 |
-
}
|
470 |
-
|
471 |
-
/**
|
472 |
-
* Restore a notice dismissed globally
|
473 |
-
*
|
474 |
-
* @since 1.0
|
475 |
-
*
|
476 |
-
* @param string $id ID of the notice to restore
|
477 |
-
*
|
478 |
-
* @return bool
|
479 |
-
*/
|
480 |
-
private function restore_global( $id ) {
|
481 |
-
|
482 |
-
$id = self::$instance->get_id( $id );
|
483 |
-
$notice = self::$instance->get_notice( $id );
|
484 |
-
|
485 |
-
if ( false === $notice ) {
|
486 |
-
return false;
|
487 |
-
}
|
488 |
-
|
489 |
-
$dismissed = self::$instance->dismissed_global();
|
490 |
-
|
491 |
-
if ( ! in_array( $id, $dismissed ) ) {
|
492 |
-
return false;
|
493 |
-
}
|
494 |
-
|
495 |
-
$flip = array_flip( $dismissed );
|
496 |
-
$key = $flip[ $id ];
|
497 |
-
|
498 |
-
unset( $dismissed[ $key ] );
|
499 |
-
|
500 |
-
return update_option( 'dnh_dismissed_notices', $dismissed );
|
501 |
-
|
502 |
-
}
|
503 |
-
|
504 |
-
/**
|
505 |
-
* Get all dismissed notices
|
506 |
-
*
|
507 |
-
* This includes notices dismissed globally or per user.
|
508 |
-
*
|
509 |
-
* @since 1.0
|
510 |
-
* @return array
|
511 |
-
*/
|
512 |
-
public function dismissed_notices() {
|
513 |
-
|
514 |
-
$user = self::$instance->dismissed_user();
|
515 |
-
$global = self::$instance->dismissed_global();
|
516 |
-
|
517 |
-
return array_merge( $user, $global );
|
518 |
-
|
519 |
-
}
|
520 |
-
|
521 |
-
/**
|
522 |
-
* Get user dismissed notices
|
523 |
-
*
|
524 |
-
* @since 1.0
|
525 |
-
* @return array
|
526 |
-
*/
|
527 |
-
private function dismissed_user() {
|
528 |
-
|
529 |
-
$dismissed = get_user_meta( get_current_user_id(), 'dnh_dismissed_notices', true );
|
530 |
-
|
531 |
-
if ( '' === $dismissed ) {
|
532 |
-
$dismissed = array();
|
533 |
-
}
|
534 |
-
|
535 |
-
return $dismissed;
|
536 |
-
|
537 |
-
}
|
538 |
-
|
539 |
-
/**
|
540 |
-
* Get globally dismissed notices
|
541 |
-
*
|
542 |
-
* @since 1.0
|
543 |
-
* @return array
|
544 |
-
*/
|
545 |
-
private function dismissed_global() {
|
546 |
-
return get_option( 'dnh_dismissed_notices', array() );
|
547 |
-
}
|
548 |
-
|
549 |
-
/**
|
550 |
-
* Check if a notice has been dismissed
|
551 |
-
*
|
552 |
-
* @since 1.0
|
553 |
-
*
|
554 |
-
* @param string $id Notice ID
|
555 |
-
*
|
556 |
-
* @return bool
|
557 |
-
*/
|
558 |
-
public function is_dismissed( $id ) {
|
559 |
-
|
560 |
-
$dismissed = self::$instance->dismissed_notices();
|
561 |
-
|
562 |
-
if ( ! in_array( self::$instance->get_id( $id ), $dismissed ) ) {
|
563 |
-
return false;
|
564 |
-
}
|
565 |
-
|
566 |
-
return true;
|
567 |
-
|
568 |
-
}
|
569 |
-
|
570 |
-
/**
|
571 |
-
* Get all the registered notices
|
572 |
-
*
|
573 |
-
* @since 1.0
|
574 |
-
* @return array|null
|
575 |
-
*/
|
576 |
-
public function get_notices() {
|
577 |
-
return self::$instance->notices;
|
578 |
-
}
|
579 |
-
|
580 |
-
/**
|
581 |
-
* Return a specific notice
|
582 |
-
*
|
583 |
-
* @since 1.0
|
584 |
-
*
|
585 |
-
* @param string $id Notice ID
|
586 |
-
*
|
587 |
-
* @return array|false
|
588 |
-
*/
|
589 |
-
public function get_notice( $id ) {
|
590 |
-
|
591 |
-
$id = self::$instance->get_id( $id );
|
592 |
-
|
593 |
-
if ( ! is_array( self::$instance->notices ) || ! array_key_exists( $id, self::$instance->notices ) ) {
|
594 |
-
return false;
|
595 |
-
}
|
596 |
-
|
597 |
-
return self::$instance->notices[ $id ];
|
598 |
-
|
599 |
-
}
|
600 |
-
|
601 |
-
}
|
602 |
-
|
603 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-dismissible-notices-handler/includes/helper-functions.php
DELETED
@@ -1,111 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Dismissible Notices Handler.
|
4 |
-
*
|
5 |
-
* LICENSE: This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
6 |
-
* General Public License as published by the Free Software Foundation; either version 3 of the License, or (at
|
7 |
-
* your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
8 |
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
9 |
-
* General Public License for more details. You should have received a copy of the GNU General Public License along
|
10 |
-
* with this program. If not, see <http://opensource.org/licenses/gpl-license.php>
|
11 |
-
*
|
12 |
-
* @package Dismissible Notices Handler/Helper Functions
|
13 |
-
* @author Julien Liabeuf <julien@liabeuf.fr>
|
14 |
-
* @version 1.0
|
15 |
-
* @license GPL-2.0+
|
16 |
-
* @link https://julienliabeuf.com
|
17 |
-
* @copyright 2016 Julien Liabeuf
|
18 |
-
*/
|
19 |
-
|
20 |
-
/**
|
21 |
-
* The main function responsible for returning the unique Dismissible Notices Handler instance
|
22 |
-
*
|
23 |
-
* Use this function like you would a global variable, except without needing
|
24 |
-
* to declare the global.
|
25 |
-
*
|
26 |
-
* @since 1.0
|
27 |
-
* @return object Dismissible_Notices_Handler
|
28 |
-
*/
|
29 |
-
|
30 |
-
if ( function_exists( 'DNH' ) ) {
|
31 |
-
return;
|
32 |
-
}
|
33 |
-
|
34 |
-
function DNH() {
|
35 |
-
return Dismissible_Notices_Handler::instance();
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Register a new notice
|
40 |
-
*
|
41 |
-
* @since 1.0
|
42 |
-
*
|
43 |
-
* @param string $id Notice ID, used to identify it
|
44 |
-
* @param string $type Type of notice to display
|
45 |
-
* @param string $content Notice content
|
46 |
-
* @param array $args Additional parameters
|
47 |
-
*
|
48 |
-
* @return bool
|
49 |
-
*/
|
50 |
-
function dnh_register_notice( $id, $type, $content, $args = array() ) {
|
51 |
-
|
52 |
-
if ( ! function_exists( 'DNH' ) ) {
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Get the library running
|
58 |
-
*/
|
59 |
-
DNH();
|
60 |
-
|
61 |
-
return DNH()->register_notice( $id, $type, $content, $args );
|
62 |
-
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Restore a previously dismissed notice
|
67 |
-
*
|
68 |
-
* @since 1.0
|
69 |
-
*
|
70 |
-
* @param string $id ID of the notice to restore
|
71 |
-
*
|
72 |
-
* @return bool
|
73 |
-
*/
|
74 |
-
function dnh_restore_notice( $id ) {
|
75 |
-
|
76 |
-
if ( ! function_exists( 'DNH' ) ) {
|
77 |
-
return false;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Get the library running
|
82 |
-
*/
|
83 |
-
DNH();
|
84 |
-
|
85 |
-
return DNH()->restore_notice( $id );
|
86 |
-
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Check if a notice has been dismissed
|
91 |
-
*
|
92 |
-
* @since 1.0
|
93 |
-
*
|
94 |
-
* @param string $id ID of the notice to check
|
95 |
-
*
|
96 |
-
* @return bool
|
97 |
-
*/
|
98 |
-
function dnh_is_dismissed( $id ) {
|
99 |
-
|
100 |
-
if ( ! function_exists( 'DNH' ) ) {
|
101 |
-
return false;
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Get the library running
|
106 |
-
*/
|
107 |
-
DNH();
|
108 |
-
|
109 |
-
return DNH()->is_dismissed( $id );
|
110 |
-
|
111 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-review-me/.gitignore
DELETED
@@ -1,99 +0,0 @@
|
|
1 |
-
# Created by .ignore support plugin (hsz.mobi)
|
2 |
-
### JetBrains template
|
3 |
-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
|
4 |
-
|
5 |
-
*.iml
|
6 |
-
|
7 |
-
## Directory-based project format:
|
8 |
-
.idea/
|
9 |
-
# if you remove the above rule, at least ignore the following:
|
10 |
-
|
11 |
-
# User-specific stuff:
|
12 |
-
# .idea/workspace.xml
|
13 |
-
# .idea/tasks.xml
|
14 |
-
# .idea/dictionaries
|
15 |
-
|
16 |
-
# Sensitive or high-churn files:
|
17 |
-
# .idea/dataSources.ids
|
18 |
-
# .idea/dataSources.xml
|
19 |
-
# .idea/sqlDataSources.xml
|
20 |
-
# .idea/dynamic.xml
|
21 |
-
# .idea/uiDesigner.xml
|
22 |
-
|
23 |
-
# Gradle:
|
24 |
-
# .idea/gradle.xml
|
25 |
-
# .idea/libraries
|
26 |
-
|
27 |
-
# Mongo Explorer plugin:
|
28 |
-
# .idea/mongoSettings.xml
|
29 |
-
|
30 |
-
## File-based project format:
|
31 |
-
*.ipr
|
32 |
-
*.iws
|
33 |
-
|
34 |
-
## Plugin-specific files:
|
35 |
-
|
36 |
-
# IntelliJ
|
37 |
-
/out/
|
38 |
-
|
39 |
-
# mpeltonen/sbt-idea plugin
|
40 |
-
.idea_modules/
|
41 |
-
|
42 |
-
# JIRA plugin
|
43 |
-
atlassian-ide-plugin.xml
|
44 |
-
|
45 |
-
# Crashlytics plugin (for Android Studio and IntelliJ)
|
46 |
-
com_crashlytics_export_strings.xml
|
47 |
-
crashlytics.properties
|
48 |
-
crashlytics-build.properties
|
49 |
-
### Linux template
|
50 |
-
*~
|
51 |
-
|
52 |
-
# KDE directory preferences
|
53 |
-
.directory
|
54 |
-
|
55 |
-
# Linux trash folder which might appear on any partition or disk
|
56 |
-
.Trash-*
|
57 |
-
### SublimeText template
|
58 |
-
# cache files for sublime text
|
59 |
-
*.tmlanguage.cache
|
60 |
-
*.tmPreferences.cache
|
61 |
-
*.stTheme.cache
|
62 |
-
|
63 |
-
# workspace files are user-specific
|
64 |
-
*.sublime-workspace
|
65 |
-
|
66 |
-
# project files should be checked into the repository, unless a significant
|
67 |
-
# proportion of contributors will probably not be using SublimeText
|
68 |
-
# *.sublime-project
|
69 |
-
|
70 |
-
# sftp configuration file
|
71 |
-
sftp-config.json
|
72 |
-
### Windows template
|
73 |
-
# Windows image file caches
|
74 |
-
Thumbs.db
|
75 |
-
ehthumbs.db
|
76 |
-
|
77 |
-
# Folder config file
|
78 |
-
Desktop.ini
|
79 |
-
|
80 |
-
# Recycle Bin used on file shares
|
81 |
-
$RECYCLE.BIN/
|
82 |
-
|
83 |
-
# Windows Installer files
|
84 |
-
*.cab
|
85 |
-
*.msi
|
86 |
-
*.msm
|
87 |
-
*.msp
|
88 |
-
|
89 |
-
# Windows shortcuts
|
90 |
-
*.lnk
|
91 |
-
|
92 |
-
### Composer template
|
93 |
-
composer.phar
|
94 |
-
vendor/
|
95 |
-
|
96 |
-
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
|
97 |
-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
|
98 |
-
# composer.lock
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-review-me/README.md
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
# WP Review Me
|
2 |
-
|
3 |
-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/julien731/WP-Review-Me/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/julien731/WP-Review-Me/?branch=develop)
|
4 |
-
|
5 |
-
*In order to comply with the WordPress.org guidelines, the EDD integration has been removed and the WooCommerce integration has been dropped.*
|
6 |
-
|
7 |
-
Are you distributing WordPress themes or plugins on WordPress.org? Then you know how important reviews are.
|
8 |
-
|
9 |
-
The bad thing with reviews is that, while unhappy users love to let the world know, happy users tend to forget reviewing your product.
|
10 |
-
|
11 |
-
How can you get more good reviews? Simply ask your users.
|
12 |
-
|
13 |
-
![WP Review Me](http://i.imgur.com/9oNGvm2.png)
|
14 |
-
|
15 |
-
## How It Works
|
16 |
-
|
17 |
-
Once instantiated, the library will leave an initial timestamp in the user's database.
|
18 |
-
|
19 |
-
When the admin is loaded, the current time is compared to the initial timestamp and, when it is time, an admin notice will kindly ask the user to review your product.
|
20 |
-
|
21 |
-
The admin notices can, of course, be dismissed by the user. It uses the [WP Dismissible Notices Handler library](https://github.com/julien731/WP-Dismissible-Notices-Handler) for handling notices.
|
22 |
-
|
23 |
-
#### Installation
|
24 |
-
|
25 |
-
The simplest way to use WP Review Me is to add it as a Composer dependency:
|
26 |
-
|
27 |
-
```
|
28 |
-
composer require julien731/wp-review-me
|
29 |
-
```
|
30 |
-
|
31 |
-
### Example
|
32 |
-
|
33 |
-
Creating a new review prompt would look like that:
|
34 |
-
|
35 |
-
```
|
36 |
-
new WP_Review_Me( array( 'days_after' => 10, 'type' => 'plugin', 'slug' => 'my-plugin' ) );
|
37 |
-
```
|
38 |
-
|
39 |
-
This is the simplest way of creating a review prompt. If you want to customize it further, a few advanced parameters are available.
|
40 |
-
|
41 |
-
You can see the documentation on the wiki page: https://github.com/julien731/WP-Review-Me/wiki
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-review-me/composer.json
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "nicolaskulka/wp-review-me",
|
3 |
-
"description": "A lightweight library to help you get more reviews for your WordPress theme/plugin",
|
4 |
-
"homepage": "https://github.com/julien731/WP-Review-Me",
|
5 |
-
"license": "GNU GPL",
|
6 |
-
"authors": [
|
7 |
-
{
|
8 |
-
"name": "Julien Liabeuf",
|
9 |
-
"email": "julien@liabeuf.fr",
|
10 |
-
"homepage": "https://julienliabeuf.com",
|
11 |
-
"role": "Lead Developer"
|
12 |
-
}
|
13 |
-
],
|
14 |
-
"repositories": [
|
15 |
-
{
|
16 |
-
"type": "vcs",
|
17 |
-
"url": "https://github.com/NicolasKulka/WP-Dismissible-Notices-Handler"
|
18 |
-
}
|
19 |
-
],
|
20 |
-
"require": {
|
21 |
-
"php": ">=5.5.0",
|
22 |
-
"nicolaskulka/wp-dismissible-notices-handler": "2.*"
|
23 |
-
},
|
24 |
-
"autoload": {
|
25 |
-
"files": ["review.php"]
|
26 |
-
}
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-review-me/composer.lock
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_readme": [
|
3 |
-
"This file locks the dependencies of your project to a known state",
|
4 |
-
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
-
"This file is @generated automatically"
|
6 |
-
],
|
7 |
-
"content-hash": "ac2eee6cd5bf817c5950e2b3f54f2cee",
|
8 |
-
"packages": [
|
9 |
-
{
|
10 |
-
"name": "nicolaskulka/wp-dismissible-notices-handler",
|
11 |
-
"version": "2.2",
|
12 |
-
"source": {
|
13 |
-
"type": "git",
|
14 |
-
"url": "https://github.com/NicolasKulka/WP-Dismissible-Notices-Handler.git",
|
15 |
-
"reference": "7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a"
|
16 |
-
},
|
17 |
-
"dist": {
|
18 |
-
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/NicolasKulka/WP-Dismissible-Notices-Handler/zipball/7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a",
|
20 |
-
"reference": "7257ae7f245aedbd3cba6e0f5a7d8bdd49210f4a",
|
21 |
-
"shasum": ""
|
22 |
-
},
|
23 |
-
"require": {
|
24 |
-
"php": ">=5.5.0"
|
25 |
-
},
|
26 |
-
"type": "library",
|
27 |
-
"autoload": {
|
28 |
-
"files": [
|
29 |
-
"handler.php",
|
30 |
-
"includes/helper-functions.php"
|
31 |
-
]
|
32 |
-
},
|
33 |
-
"license": [
|
34 |
-
"GNU GPL"
|
35 |
-
],
|
36 |
-
"authors": [
|
37 |
-
{
|
38 |
-
"name": "Nicolas KULKA",
|
39 |
-
"role": "Lead Developer"
|
40 |
-
}
|
41 |
-
],
|
42 |
-
"description": "A simple library to handle Ajax-dismissible admin notices for WordPress",
|
43 |
-
"homepage": "https://github.com/nicolaskulka/WP-Dismissible-Notices-Handler",
|
44 |
-
"support": {
|
45 |
-
"source": "https://github.com/NicolasKulka/WP-Dismissible-Notices-Handler/tree/2.2"
|
46 |
-
},
|
47 |
-
"time": "2021-02-15T08:45:53+00:00"
|
48 |
-
}
|
49 |
-
],
|
50 |
-
"packages-dev": [],
|
51 |
-
"aliases": [],
|
52 |
-
"minimum-stability": "stable",
|
53 |
-
"stability-flags": [],
|
54 |
-
"prefer-stable": false,
|
55 |
-
"prefer-lowest": false,
|
56 |
-
"platform": {
|
57 |
-
"php": ">=5.5.0"
|
58 |
-
},
|
59 |
-
"platform-dev": [],
|
60 |
-
"plugin-api-version": "2.0.0"
|
61 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/nicolaskulka/wp-review-me/review.php
DELETED
@@ -1,426 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WP Review Me
|
4 |
-
*
|
5 |
-
* A lightweight library to help you get more reviews for your WordPress theme/plugin.
|
6 |
-
*
|
7 |
-
* LICENSE: This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
8 |
-
* General Public License as published by the Free Software Foundation; either version 3 of the License, or (at
|
9 |
-
* your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
10 |
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11 |
-
* General Public License for more details. You should have received a copy of the GNU General Public License along
|
12 |
-
* with this program. If not, see <http://opensource.org/licenses/gpl-license.php>
|
13 |
-
*
|
14 |
-
* @package WP Review Me
|
15 |
-
* @author Julien Liabeuf <julien@liabeuf.fr>
|
16 |
-
* @version 2.0.1
|
17 |
-
* @license GPL-2.0+
|
18 |
-
* @link https://julienliabeuf.com
|
19 |
-
* @copyright 2016 Julien Liabeuf
|
20 |
-
*/
|
21 |
-
|
22 |
-
// If this file is called directly, abort.
|
23 |
-
if ( ! defined( 'WPINC' ) ) {
|
24 |
-
die;
|
25 |
-
}
|
26 |
-
|
27 |
-
if ( ! class_exists( 'WP_Review_Me' ) ) {
|
28 |
-
|
29 |
-
class WP_Review_Me {
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Library version
|
33 |
-
*
|
34 |
-
* @since 1.0
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
public $version = '2.0.1';
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Required version of PHP.
|
41 |
-
*
|
42 |
-
* @since 1.0
|
43 |
-
* @var string
|
44 |
-
*/
|
45 |
-
public $php_version_required = '5.5';
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Minimum version of WordPress required to use the library
|
49 |
-
*
|
50 |
-
* @since 1.0
|
51 |
-
* @var string
|
52 |
-
*/
|
53 |
-
public $wordpress_version_required = '4.2';
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Holds the unique identifying key for this particular instance
|
57 |
-
*
|
58 |
-
* @since 1.0
|
59 |
-
* @var string
|
60 |
-
*/
|
61 |
-
protected $key;
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Link unique ID
|
65 |
-
*
|
66 |
-
* @since 1.0
|
67 |
-
* @var string
|
68 |
-
*/
|
69 |
-
public $link_id;
|
70 |
-
|
71 |
-
/**
|
72 |
-
* WP_Review_Me constructor.
|
73 |
-
*
|
74 |
-
* @since 1.0
|
75 |
-
*
|
76 |
-
* @param array $args Object settings
|
77 |
-
*/
|
78 |
-
public function __construct( $args ) {
|
79 |
-
|
80 |
-
$args = wp_parse_args( $args, $this->get_defaults() );
|
81 |
-
$this->days = $args['days_after'];
|
82 |
-
$this->type = $args['type'];
|
83 |
-
$this->slug = $args['slug'];
|
84 |
-
$this->rating = $args['rating'];
|
85 |
-
$this->message = $args['message'];
|
86 |
-
$this->link_label = $args['link_label'];
|
87 |
-
$this->cap = $args['cap'];
|
88 |
-
$this->scope = $args['scope'];
|
89 |
-
|
90 |
-
// Set the unique identifying key for this instance
|
91 |
-
$this->key = 'wrm_' . substr( md5( plugin_basename( __FILE__ ) . $args['slug'] ), 0, 20 );
|
92 |
-
$this->link_id = 'wrm-review-link-' . $this->key;
|
93 |
-
|
94 |
-
// Instantiate
|
95 |
-
$this->init();
|
96 |
-
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Get default object settings
|
101 |
-
*
|
102 |
-
* @since 1.0
|
103 |
-
* @return array
|
104 |
-
*/
|
105 |
-
protected function get_defaults() {
|
106 |
-
|
107 |
-
$defaults = array(
|
108 |
-
'days_after' => 10,
|
109 |
-
'type' => '',
|
110 |
-
'slug' => '',
|
111 |
-
'rating' => 5,
|
112 |
-
'message' => sprintf( esc_html__( 'Hey! It's been a little while that you've been using this product. You might not realize it, but user reviews are such a great help to us. We would be so grateful if you could take a minute to leave a review on WordPress.org. Many thanks in advance :)', 'wp-review-me' ) ),
|
113 |
-
'link_label' => esc_html__( 'Click here to leave your review', 'wp-review-me' ),
|
114 |
-
// Parameters used in WP Dismissible Notices Handler
|
115 |
-
'cap' => 'administrator',
|
116 |
-
'scope' => 'global',
|
117 |
-
);
|
118 |
-
|
119 |
-
return $defaults;
|
120 |
-
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Initialize the library
|
125 |
-
*
|
126 |
-
* @since 1.0
|
127 |
-
* @return void
|
128 |
-
*/
|
129 |
-
private function init() {
|
130 |
-
|
131 |
-
// Make sure WordPress is compatible
|
132 |
-
if ( ! $this->is_wp_compatible() ) {
|
133 |
-
/*$this->spit_error(
|
134 |
-
sprintf(
|
135 |
-
esc_html__( 'The library can not be used because your version of WordPress is too old. You need version %s at least.', 'wp-review-me' ),
|
136 |
-
$this->wordpress_version_required
|
137 |
-
)
|
138 |
-
);*/
|
139 |
-
|
140 |
-
return;
|
141 |
-
}
|
142 |
-
|
143 |
-
// Make sure PHP is compatible
|
144 |
-
if ( ! $this->is_php_compatible() ) {
|
145 |
-
/*$this->spit_error(
|
146 |
-
sprintf(
|
147 |
-
esc_html__( 'The library can not be used because your version of PHP is too old. You need version %s at least.', 'wp-review-me' ),
|
148 |
-
$this->php_version_required
|
149 |
-
)
|
150 |
-
);*/
|
151 |
-
|
152 |
-
return;
|
153 |
-
}
|
154 |
-
|
155 |
-
// Make sure the dependencies are loaded
|
156 |
-
if ( ! function_exists( 'dnh_register_notice' ) ) {
|
157 |
-
|
158 |
-
$dnh_file = trailingslashit( plugin_dir_path( __FILE__ ) ) . 'vendor/julien731/wp-dismissible-notices-handler/handler.php';
|
159 |
-
|
160 |
-
if ( file_exists( $dnh_file ) ) {
|
161 |
-
require( $dnh_file );
|
162 |
-
}
|
163 |
-
|
164 |
-
if ( ! function_exists( 'dnh_register_notice' ) ) {
|
165 |
-
$this->spit_error(
|
166 |
-
sprintf(
|
167 |
-
esc_html__( 'Dependencies are missing. Please run a %s.', 'wp-review-me' ),
|
168 |
-
'<code>composer install</code>'
|
169 |
-
)
|
170 |
-
);
|
171 |
-
|
172 |
-
return;
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
add_action( 'admin_footer', array( $this, 'script' ) );
|
177 |
-
add_action( 'wp_ajax_wrm_clicked_review', array( $this, 'dismiss_notice' ) );
|
178 |
-
|
179 |
-
// And let's roll... maybe.
|
180 |
-
$this->maybe_prompt();
|
181 |
-
|
182 |
-
}
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Check if the current WordPress version fits the requirements
|
186 |
-
*
|
187 |
-
* @since 1.0
|
188 |
-
* @return boolean
|
189 |
-
*/
|
190 |
-
private function is_wp_compatible() {
|
191 |
-
|
192 |
-
if ( version_compare( get_bloginfo( 'version' ), $this->wordpress_version_required, '<' ) ) {
|
193 |
-
return false;
|
194 |
-
}
|
195 |
-
|
196 |
-
return true;
|
197 |
-
|
198 |
-
}
|
199 |
-
|
200 |
-
/**
|
201 |
-
* Check if the version of PHP is compatible with this library
|
202 |
-
*
|
203 |
-
* @since 1.0
|
204 |
-
* @return boolean
|
205 |
-
*/
|
206 |
-
private function is_php_compatible() {
|
207 |
-
|
208 |
-
if ( version_compare( phpversion(), $this->php_version_required, '<' ) ) {
|
209 |
-
return false;
|
210 |
-
}
|
211 |
-
|
212 |
-
return true;
|
213 |
-
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Spits an error message at the top of the admin screen
|
218 |
-
*
|
219 |
-
* @since 1.0
|
220 |
-
*
|
221 |
-
* @param string $error Error message to spit
|
222 |
-
*
|
223 |
-
* @return void
|
224 |
-
*/
|
225 |
-
protected function spit_error( $error ) {
|
226 |
-
printf(
|
227 |
-
'<div style="margin: 20px; text-align: center;"><strong>%1$s</strong> %2$s</pre></div>',
|
228 |
-
esc_html__( 'WP Review Me Error:', 'wp-review-me' ),
|
229 |
-
wp_kses_post( $error )
|
230 |
-
);
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* Check if it is time to ask for a review
|
235 |
-
*
|
236 |
-
* @since 1.0
|
237 |
-
* @return bool
|
238 |
-
*/
|
239 |
-
public function is_time() {
|
240 |
-
|
241 |
-
$installed = (int) get_option( $this->key, 0 );
|
242 |
-
|
243 |
-
if ( 0 === $installed ) {
|
244 |
-
$this->setup_date();
|
245 |
-
$installed = time();
|
246 |
-
}
|
247 |
-
|
248 |
-
if ( $installed + ( $this->days * 86400 ) > time() ) {
|
249 |
-
return false;
|
250 |
-
}
|
251 |
-
|
252 |
-
return true;
|
253 |
-
|
254 |
-
}
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Save the current date as the installation date
|
258 |
-
*
|
259 |
-
* @since 1.0
|
260 |
-
* @return void
|
261 |
-
*/
|
262 |
-
protected function setup_date() {
|
263 |
-
update_option( $this->key, time() );
|
264 |
-
}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* Get the review link
|
268 |
-
*
|
269 |
-
* @since 1.0
|
270 |
-
* @return string
|
271 |
-
*/
|
272 |
-
protected function get_review_link() {
|
273 |
-
|
274 |
-
$link = 'https://wordpress.org/support/';
|
275 |
-
|
276 |
-
switch ( $this->type ) {
|
277 |
-
|
278 |
-
case 'theme':
|
279 |
-
$link .= 'theme/';
|
280 |
-
break;
|
281 |
-
|
282 |
-
case 'plugin':
|
283 |
-
$link .= 'plugin/';
|
284 |
-
break;
|
285 |
-
|
286 |
-
}
|
287 |
-
|
288 |
-
$link .= $this->slug . '/reviews';
|
289 |
-
$link = add_query_arg( 'rate', $this->rating, $link );
|
290 |
-
$link = esc_url( $link . '#new-post' );
|
291 |
-
|
292 |
-
return $link;
|
293 |
-
|
294 |
-
}
|
295 |
-
|
296 |
-
/**
|
297 |
-
* Get the complete link tag
|
298 |
-
*
|
299 |
-
* @since 1.0
|
300 |
-
* @return string
|
301 |
-
*/
|
302 |
-
protected function get_review_link_tag() {
|
303 |
-
|
304 |
-
$link = $this->get_review_link();
|
305 |
-
|
306 |
-
return "<a href='$link' target='_blank' id='$this->link_id'>$this->link_label</a>";
|
307 |
-
|
308 |
-
}
|
309 |
-
|
310 |
-
/**
|
311 |
-
* Trigger the notice if it is time to ask for a review
|
312 |
-
*
|
313 |
-
* @since 1.0
|
314 |
-
* @return void
|
315 |
-
*/
|
316 |
-
protected function maybe_prompt() {
|
317 |
-
|
318 |
-
if ( ! $this->is_time() ) {
|
319 |
-
return;
|
320 |
-
}
|
321 |
-
|
322 |
-
dnh_register_notice( $this->key, 'updated', $this->get_message(), array(
|
323 |
-
'scope' => $this->scope,
|
324 |
-
'cap' => $this->cap
|
325 |
-
) );
|
326 |
-
|
327 |
-
}
|
328 |
-
|
329 |
-
/**
|
330 |
-
* Echo the JS script in the admin footer
|
331 |
-
*
|
332 |
-
* @since 1.0
|
333 |
-
* @return void
|
334 |
-
*/
|
335 |
-
public function script() { ?>
|
336 |
-
|
337 |
-
<script>
|
338 |
-
jQuery(document).ready(function($) {
|
339 |
-
$('#<?php echo $this->link_id; ?>').on('click', wrmDismiss);
|
340 |
-
function wrmDismiss() {
|
341 |
-
|
342 |
-
var data = {
|
343 |
-
action: 'wrm_clicked_review',
|
344 |
-
id: '<?php echo $this->link_id; ?>'
|
345 |
-
};
|
346 |
-
|
347 |
-
jQuery.ajax({
|
348 |
-
type:'POST',
|
349 |
-
url: ajaxurl,
|
350 |
-
data: data,
|
351 |
-
success:function( data ){
|
352 |
-
console.log(data);
|
353 |
-
}
|
354 |
-
});
|
355 |
-
|
356 |
-
}
|
357 |
-
});
|
358 |
-
</script>
|
359 |
-
|
360 |
-
<?php }
|
361 |
-
|
362 |
-
/**
|
363 |
-
* Dismiss the notice when the review link is clicked
|
364 |
-
*
|
365 |
-
* @since 1.0
|
366 |
-
* @return void
|
367 |
-
*/
|
368 |
-
public function dismiss_notice() {
|
369 |
-
|
370 |
-
if ( empty( $_POST ) ) {
|
371 |
-
echo 'missing POST';
|
372 |
-
die();
|
373 |
-
}
|
374 |
-
|
375 |
-
if ( ! isset( $_POST['id'] ) ) {
|
376 |
-
echo 'missing ID';
|
377 |
-
die();
|
378 |
-
}
|
379 |
-
|
380 |
-
$id = sanitize_text_field( $_POST['id'] );
|
381 |
-
|
382 |
-
if ( $id !== $this->link_id ) {
|
383 |
-
echo "not this instance's job";
|
384 |
-
die();
|
385 |
-
}
|
386 |
-
|
387 |
-
// Get the DNH notice ID ready
|
388 |
-
$notice_id = DNH()->get_id( str_replace( 'wrm-review-link-', '', $id ) );
|
389 |
-
$dismissed = DNH()->dismiss_notice( $notice_id );
|
390 |
-
|
391 |
-
echo $dismissed;
|
392 |
-
|
393 |
-
/**
|
394 |
-
* Fires right after the notice has been dismissed. This allows for various integrations to perform additional tasks.
|
395 |
-
*
|
396 |
-
* @since 1.0
|
397 |
-
*
|
398 |
-
* @param string $id The notice ID
|
399 |
-
* @param string $notice_id The notice ID as defined by the DNH class
|
400 |
-
*/
|
401 |
-
do_action( 'wrm_after_notice_dismissed', $id, $notice_id );
|
402 |
-
|
403 |
-
// Stop execution here
|
404 |
-
die();
|
405 |
-
|
406 |
-
}
|
407 |
-
|
408 |
-
/**
|
409 |
-
* Get the review prompt message
|
410 |
-
*
|
411 |
-
* @since 1.0
|
412 |
-
* @return string
|
413 |
-
*/
|
414 |
-
protected function get_message() {
|
415 |
-
|
416 |
-
$message = $this->message;
|
417 |
-
$link = $this->get_review_link_tag();
|
418 |
-
$message = $message . ' ' . $link;
|
419 |
-
|
420 |
-
return wp_kses_post( $message );
|
421 |
-
|
422 |
-
}
|
423 |
-
|
424 |
-
}
|
425 |
-
|
426 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wps-hide-login.php
CHANGED
@@ -5,7 +5,7 @@ Description: Protect your website by changing the login URL and preventing acces
|
|
5 |
Donate link: https://www.paypal.me/donateWPServeur
|
6 |
Author: WPServeur, NicolasKulka, wpformation
|
7 |
Author URI: https://wpserveur.net
|
8 |
-
Version: 1.8.
|
9 |
Requires at least: 4.1
|
10 |
Tested up to: 5.6
|
11 |
Requires PHP: 7.0
|
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
}
|
22 |
|
23 |
// Plugin constants
|
24 |
-
define( 'WPS_HIDE_LOGIN_VERSION', '1.8.
|
25 |
define( 'WPS_HIDE_LOGIN_FOLDER', 'wps-hide-login' );
|
26 |
|
27 |
define( 'WPS_HIDE_LOGIN_URL', plugin_dir_url( __FILE__ ) );
|
@@ -37,19 +37,4 @@ function plugins_loaded_wps_hide_login_plugin() {
|
|
37 |
\WPS\WPS_Hide_Login\Plugin::get_instance();
|
38 |
|
39 |
load_plugin_textdomain( 'wps-hide-login', false, dirname( WPS_HIDE_LOGIN_BASENAME ) . '/languages' );
|
40 |
-
|
41 |
-
$message = __( 'Do you like plugin WPS Hide Login? <br> Thank you for taking a few seconds to note us on', 'wps-hide-login' );
|
42 |
-
if( 'fr_FR' === get_locale() ) {
|
43 |
-
$message = 'Vous aimez l\'extension WPS Hide Login ?<br>Merci de prendre quelques secondes pour nous noter sur';
|
44 |
-
}
|
45 |
-
|
46 |
-
new \WP_Review_Me(
|
47 |
-
array(
|
48 |
-
'days_after' => 10,
|
49 |
-
'type' => 'plugin',
|
50 |
-
'slug' => 'wps-hide-login',
|
51 |
-
'message' => $message,
|
52 |
-
'link_label' => 'WordPress.org'
|
53 |
-
)
|
54 |
-
);
|
55 |
}
|
5 |
Donate link: https://www.paypal.me/donateWPServeur
|
6 |
Author: WPServeur, NicolasKulka, wpformation
|
7 |
Author URI: https://wpserveur.net
|
8 |
+
Version: 1.8.3
|
9 |
Requires at least: 4.1
|
10 |
Tested up to: 5.6
|
11 |
Requires PHP: 7.0
|
21 |
}
|
22 |
|
23 |
// Plugin constants
|
24 |
+
define( 'WPS_HIDE_LOGIN_VERSION', '1.8.3' );
|
25 |
define( 'WPS_HIDE_LOGIN_FOLDER', 'wps-hide-login' );
|
26 |
|
27 |
define( 'WPS_HIDE_LOGIN_URL', plugin_dir_url( __FILE__ ) );
|
37 |
\WPS\WPS_Hide_Login\Plugin::get_instance();
|
38 |
|
39 |
load_plugin_textdomain( 'wps-hide-login', false, dirname( WPS_HIDE_LOGIN_BASENAME ) . '/languages' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|