Version Description
Download this release
Release Info
Developer | barrykooij |
Plugin | Related Posts for WordPress |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.5 to 2.1.0
- classes/class-rp4wp.php +1 -1
- classes/filters/class-filter-yoast-duplicate-post.php +21 -0
- composer.lock +12 -7
- includes/filters.php +3 -2
- readme.txt +7 -2
- related-posts-for-wp.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/composer/ClassLoader.php +146 -19
- vendor/composer/autoload_classmap.php +3 -1
- vendor/composer/autoload_namespaces.php +1 -1
- vendor/composer/autoload_psr4.php +1 -1
- vendor/composer/autoload_real.php +10 -26
- vendor/composer/autoload_real_52.php +3 -3
- vendor/composer/autoload_static.php +5 -3
classes/class-rp4wp.php
CHANGED
@@ -8,7 +8,7 @@ class RP4WP {
|
|
8 |
|
9 |
private static $instance = null;
|
10 |
|
11 |
-
const VERSION = '2.0
|
12 |
|
13 |
/**
|
14 |
* @var RP4WP_Settings
|
8 |
|
9 |
private static $instance = null;
|
10 |
|
11 |
+
const VERSION = '2.1.0';
|
12 |
|
13 |
/**
|
14 |
* @var RP4WP_Settings
|
classes/filters/class-filter-yoast-duplicate-post.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
} // Exit if accessed directly
|
6 |
+
|
7 |
+
class RP4WP_Filter_Yoast_Duplicate_Post extends RP4WP_Filter {
|
8 |
+
protected $tag = 'duplicate_post_excludelist_filter';
|
9 |
+
protected $priority = 10;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Filters out custom fields from being duplicated in addition to the defaults.
|
13 |
+
*
|
14 |
+
* @param array $meta_excludelist The default exclusion list, based on the “Do not copy these fields” setting, plus some other field names.
|
15 |
+
*
|
16 |
+
* @return array The custom fields to exclude.
|
17 |
+
*/
|
18 |
+
public function run( $meta_excludelist ) {
|
19 |
+
return array_merge( $meta_excludelist, array( RP4WP_Constants::PM_POST_AUTO_LINKED ) );
|
20 |
+
}
|
21 |
+
}
|
composer.lock
CHANGED
@@ -1,23 +1,23 @@
|
|
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#
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
"content-hash": "df49fc6a62cf1658476ec876ed16f6af",
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "xrstf/composer-php52",
|
11 |
-
"version": "v1.0.
|
12 |
"source": {
|
13 |
"type": "git",
|
14 |
"url": "https://github.com/composer-php52/composer-php52.git",
|
15 |
-
"reference": "
|
16 |
},
|
17 |
"dist": {
|
18 |
"type": "zip",
|
19 |
-
"url": "https://api.github.com/repos/composer-php52/composer-php52/zipball/
|
20 |
-
"reference": "
|
21 |
"shasum": ""
|
22 |
},
|
23 |
"type": "library",
|
@@ -35,7 +35,11 @@
|
|
35 |
"license": [
|
36 |
"MIT"
|
37 |
],
|
38 |
-
"
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
],
|
41 |
"packages-dev": [],
|
@@ -45,5 +49,6 @@
|
|
45 |
"prefer-stable": false,
|
46 |
"prefer-lowest": false,
|
47 |
"platform": [],
|
48 |
-
"platform-dev": []
|
|
|
49 |
}
|
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": "df49fc6a62cf1658476ec876ed16f6af",
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "xrstf/composer-php52",
|
11 |
+
"version": "v1.0.21",
|
12 |
"source": {
|
13 |
"type": "git",
|
14 |
"url": "https://github.com/composer-php52/composer-php52.git",
|
15 |
+
"reference": "670ac996f93792f8de0427605cfef342b3429ff3"
|
16 |
},
|
17 |
"dist": {
|
18 |
"type": "zip",
|
19 |
+
"url": "https://api.github.com/repos/composer-php52/composer-php52/zipball/670ac996f93792f8de0427605cfef342b3429ff3",
|
20 |
+
"reference": "670ac996f93792f8de0427605cfef342b3429ff3",
|
21 |
"shasum": ""
|
22 |
},
|
23 |
"type": "library",
|
35 |
"license": [
|
36 |
"MIT"
|
37 |
],
|
38 |
+
"support": {
|
39 |
+
"issues": "https://github.com/composer-php52/composer-php52/issues",
|
40 |
+
"source": "https://github.com/composer-php52/composer-php52"
|
41 |
+
},
|
42 |
+
"time": "2022-06-08T03:23:46+00:00"
|
43 |
}
|
44 |
],
|
45 |
"packages-dev": [],
|
49 |
"prefer-stable": false,
|
50 |
"prefer-lowest": false,
|
51 |
"platform": [],
|
52 |
+
"platform-dev": [],
|
53 |
+
"plugin-api-version": "2.3.0"
|
54 |
}
|
includes/filters.php
CHANGED
@@ -3,5 +3,6 @@
|
|
3 |
return array(
|
4 |
'after_post',
|
5 |
'plugin_links',
|
6 |
-
'set_screen_option'
|
7 |
-
|
|
3 |
return array(
|
4 |
'after_post',
|
5 |
'plugin_links',
|
6 |
+
'set_screen_option',
|
7 |
+
'yoast_duplicate_post'
|
8 |
+
);
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: never5, barrykooij
|
|
3 |
Donate link: http://www.barrykooij.com/donate/
|
4 |
Tags: related posts for wordpress, related posts for wp, simple related posts, easy related posts, related posts, related post, related, relations, internal links, seo, bounce rate
|
5 |
Requires at least: 3.6
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 2.0
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -118,6 +118,11 @@ There is one custom table created for the post cache, this table will however no
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
121 |
= 2.0.5: July 6, 2021 =
|
122 |
* Tweak: Fixed an XSS vulnerability in heading text option.
|
123 |
* Tweak: Fixed an XSS vulnerability in custom CSS option.
|
3 |
Donate link: http://www.barrykooij.com/donate/
|
4 |
Tags: related posts for wordpress, related posts for wp, simple related posts, easy related posts, related posts, related post, related, relations, internal links, seo, bounce rate
|
5 |
Requires at least: 3.6
|
6 |
+
Tested up to: 6.0.2
|
7 |
+
Stable tag: 2.1.0
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 2.1.0: September 12, 2022 =
|
122 |
+
* Feature: Added compatibility support for Yoast Duplicate Post plugin.
|
123 |
+
* Tweak: meta data updates.
|
124 |
+
* Tweak: Various small improvements.
|
125 |
+
|
126 |
= 2.0.5: July 6, 2021 =
|
127 |
* Tweak: Fixed an XSS vulnerability in heading text option.
|
128 |
* Tweak: Fixed an XSS vulnerability in custom CSS option.
|
related-posts-for-wp.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Related Posts for WordPress
|
4 |
Plugin URI: http://www.relatedpostsforwp.com/
|
5 |
Description: Related Posts for WordPress, the best way to display related posts in WordPress.
|
6 |
-
Version: 2.0
|
7 |
Author: Never5
|
8 |
Author URI: http://www.never5.com/
|
9 |
License: GPL v3
|
3 |
Plugin Name: Related Posts for WordPress
|
4 |
Plugin URI: http://www.relatedpostsforwp.com/
|
5 |
Description: Related Posts for WordPress, the best way to display related posts in WordPress.
|
6 |
+
Version: 2.1.0
|
7 |
Author: Never5
|
8 |
Author URI: http://www.never5.com/
|
9 |
License: GPL v3
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit878e2a98c3221f2b061d618a8a9d70cc::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -37,57 +37,130 @@ namespace Composer\Autoload;
|
|
37 |
*
|
38 |
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
-
* @see
|
41 |
-
* @see
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
|
|
|
|
|
|
45 |
// PSR-4
|
|
|
|
|
|
|
|
|
46 |
private $prefixLengthsPsr4 = array();
|
|
|
|
|
|
|
|
|
47 |
private $prefixDirsPsr4 = array();
|
|
|
|
|
|
|
|
|
48 |
private $fallbackDirsPsr4 = array();
|
49 |
|
50 |
// PSR-0
|
|
|
|
|
|
|
|
|
51 |
private $prefixesPsr0 = array();
|
|
|
|
|
|
|
|
|
52 |
private $fallbackDirsPsr0 = array();
|
53 |
|
|
|
54 |
private $useIncludePath = false;
|
|
|
|
|
|
|
|
|
|
|
55 |
private $classMap = array();
|
|
|
|
|
56 |
private $classMapAuthoritative = false;
|
|
|
|
|
|
|
|
|
|
|
57 |
private $missingClasses = array();
|
|
|
|
|
58 |
private $apcuPrefix;
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
63 |
-
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
64 |
}
|
65 |
|
66 |
return array();
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
69 |
public function getPrefixesPsr4()
|
70 |
{
|
71 |
return $this->prefixDirsPsr4;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
74 |
public function getFallbackDirs()
|
75 |
{
|
76 |
return $this->fallbackDirsPsr0;
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
79 |
public function getFallbackDirsPsr4()
|
80 |
{
|
81 |
return $this->fallbackDirsPsr4;
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
84 |
public function getClassMap()
|
85 |
{
|
86 |
return $this->classMap;
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
-
* @param
|
|
|
|
|
|
|
91 |
*/
|
92 |
public function addClassMap(array $classMap)
|
93 |
{
|
@@ -102,9 +175,11 @@ class ClassLoader
|
|
102 |
* Registers a set of PSR-0 directories for a given prefix, either
|
103 |
* appending or prepending to the ones previously set for this prefix.
|
104 |
*
|
105 |
-
* @param string
|
106 |
-
* @param
|
107 |
-
* @param bool
|
|
|
|
|
108 |
*/
|
109 |
public function add($prefix, $paths, $prepend = false)
|
110 |
{
|
@@ -147,11 +222,13 @@ class ClassLoader
|
|
147 |
* Registers a set of PSR-4 directories for a given namespace, either
|
148 |
* appending or prepending to the ones previously set for this namespace.
|
149 |
*
|
150 |
-
* @param string
|
151 |
-
* @param
|
152 |
-
* @param bool
|
153 |
*
|
154 |
* @throws \InvalidArgumentException
|
|
|
|
|
155 |
*/
|
156 |
public function addPsr4($prefix, $paths, $prepend = false)
|
157 |
{
|
@@ -195,8 +272,10 @@ class ClassLoader
|
|
195 |
* Registers a set of PSR-0 directories for a given prefix,
|
196 |
* replacing any others previously set for this prefix.
|
197 |
*
|
198 |
-
* @param string
|
199 |
-
* @param
|
|
|
|
|
200 |
*/
|
201 |
public function set($prefix, $paths)
|
202 |
{
|
@@ -211,10 +290,12 @@ class ClassLoader
|
|
211 |
* Registers a set of PSR-4 directories for a given namespace,
|
212 |
* replacing any others previously set for this namespace.
|
213 |
*
|
214 |
-
* @param string
|
215 |
-
* @param
|
216 |
*
|
217 |
* @throws \InvalidArgumentException
|
|
|
|
|
218 |
*/
|
219 |
public function setPsr4($prefix, $paths)
|
220 |
{
|
@@ -234,6 +315,8 @@ class ClassLoader
|
|
234 |
* Turns on searching the include path for class files.
|
235 |
*
|
236 |
* @param bool $useIncludePath
|
|
|
|
|
237 |
*/
|
238 |
public function setUseIncludePath($useIncludePath)
|
239 |
{
|
@@ -256,6 +339,8 @@ class ClassLoader
|
|
256 |
* that have not been registered with the class map.
|
257 |
*
|
258 |
* @param bool $classMapAuthoritative
|
|
|
|
|
259 |
*/
|
260 |
public function setClassMapAuthoritative($classMapAuthoritative)
|
261 |
{
|
@@ -276,10 +361,12 @@ class ClassLoader
|
|
276 |
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
277 |
*
|
278 |
* @param string|null $apcuPrefix
|
|
|
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
282 |
-
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
283 |
}
|
284 |
|
285 |
/**
|
@@ -296,25 +383,44 @@ class ClassLoader
|
|
296 |
* Registers this instance as an autoloader.
|
297 |
*
|
298 |
* @param bool $prepend Whether to prepend the autoloader or not
|
|
|
|
|
299 |
*/
|
300 |
public function register($prepend = false)
|
301 |
{
|
302 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
}
|
304 |
|
305 |
/**
|
306 |
* Unregisters this instance as an autoloader.
|
|
|
|
|
307 |
*/
|
308 |
public function unregister()
|
309 |
{
|
310 |
spl_autoload_unregister(array($this, 'loadClass'));
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
* Loads the given class or interface.
|
315 |
*
|
316 |
* @param string $class The name of the class
|
317 |
-
* @return
|
318 |
*/
|
319 |
public function loadClass($class)
|
320 |
{
|
@@ -323,6 +429,8 @@ class ClassLoader
|
|
323 |
|
324 |
return true;
|
325 |
}
|
|
|
|
|
326 |
}
|
327 |
|
328 |
/**
|
@@ -367,6 +475,21 @@ class ClassLoader
|
|
367 |
return $file;
|
368 |
}
|
369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
private function findFileWithExtension($class, $ext)
|
371 |
{
|
372 |
// PSR-4 lookup
|
@@ -377,11 +500,11 @@ class ClassLoader
|
|
377 |
$subPath = $class;
|
378 |
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
379 |
$subPath = substr($subPath, 0, $lastPos);
|
380 |
-
$search = $subPath.'\\';
|
381 |
if (isset($this->prefixDirsPsr4[$search])) {
|
|
|
382 |
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
383 |
-
$
|
384 |
-
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
385 |
return $file;
|
386 |
}
|
387 |
}
|
@@ -438,6 +561,10 @@ class ClassLoader
|
|
438 |
* Scope isolated include.
|
439 |
*
|
440 |
* Prevents access to $this/self from included files.
|
|
|
|
|
|
|
|
|
441 |
*/
|
442 |
function includeFile($file)
|
443 |
{
|
37 |
*
|
38 |
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see https://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see https://www.php-fig.org/psr/psr-4/
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
45 |
+
/** @var ?string */
|
46 |
+
private $vendorDir;
|
47 |
+
|
48 |
// PSR-4
|
49 |
+
/**
|
50 |
+
* @var array[]
|
51 |
+
* @psalm-var array<string, array<string, int>>
|
52 |
+
*/
|
53 |
private $prefixLengthsPsr4 = array();
|
54 |
+
/**
|
55 |
+
* @var array[]
|
56 |
+
* @psalm-var array<string, array<int, string>>
|
57 |
+
*/
|
58 |
private $prefixDirsPsr4 = array();
|
59 |
+
/**
|
60 |
+
* @var array[]
|
61 |
+
* @psalm-var array<string, string>
|
62 |
+
*/
|
63 |
private $fallbackDirsPsr4 = array();
|
64 |
|
65 |
// PSR-0
|
66 |
+
/**
|
67 |
+
* @var array[]
|
68 |
+
* @psalm-var array<string, array<string, string[]>>
|
69 |
+
*/
|
70 |
private $prefixesPsr0 = array();
|
71 |
+
/**
|
72 |
+
* @var array[]
|
73 |
+
* @psalm-var array<string, string>
|
74 |
+
*/
|
75 |
private $fallbackDirsPsr0 = array();
|
76 |
|
77 |
+
/** @var bool */
|
78 |
private $useIncludePath = false;
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @var string[]
|
82 |
+
* @psalm-var array<string, string>
|
83 |
+
*/
|
84 |
private $classMap = array();
|
85 |
+
|
86 |
+
/** @var bool */
|
87 |
private $classMapAuthoritative = false;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @var bool[]
|
91 |
+
* @psalm-var array<string, bool>
|
92 |
+
*/
|
93 |
private $missingClasses = array();
|
94 |
+
|
95 |
+
/** @var ?string */
|
96 |
private $apcuPrefix;
|
97 |
|
98 |
+
/**
|
99 |
+
* @var self[]
|
100 |
+
*/
|
101 |
+
private static $registeredLoaders = array();
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @param ?string $vendorDir
|
105 |
+
*/
|
106 |
+
public function __construct($vendorDir = null)
|
107 |
+
{
|
108 |
+
$this->vendorDir = $vendorDir;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @return string[]
|
113 |
+
*/
|
114 |
public function getPrefixes()
|
115 |
{
|
116 |
if (!empty($this->prefixesPsr0)) {
|
117 |
+
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
118 |
}
|
119 |
|
120 |
return array();
|
121 |
}
|
122 |
|
123 |
+
/**
|
124 |
+
* @return array[]
|
125 |
+
* @psalm-return array<string, array<int, string>>
|
126 |
+
*/
|
127 |
public function getPrefixesPsr4()
|
128 |
{
|
129 |
return $this->prefixDirsPsr4;
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
* @return array[]
|
134 |
+
* @psalm-return array<string, string>
|
135 |
+
*/
|
136 |
public function getFallbackDirs()
|
137 |
{
|
138 |
return $this->fallbackDirsPsr0;
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* @return array[]
|
143 |
+
* @psalm-return array<string, string>
|
144 |
+
*/
|
145 |
public function getFallbackDirsPsr4()
|
146 |
{
|
147 |
return $this->fallbackDirsPsr4;
|
148 |
}
|
149 |
|
150 |
+
/**
|
151 |
+
* @return string[] Array of classname => path
|
152 |
+
* @psalm-return array<string, string>
|
153 |
+
*/
|
154 |
public function getClassMap()
|
155 |
{
|
156 |
return $this->classMap;
|
157 |
}
|
158 |
|
159 |
/**
|
160 |
+
* @param string[] $classMap Class to filename map
|
161 |
+
* @psalm-param array<string, string> $classMap
|
162 |
+
*
|
163 |
+
* @return void
|
164 |
*/
|
165 |
public function addClassMap(array $classMap)
|
166 |
{
|
175 |
* Registers a set of PSR-0 directories for a given prefix, either
|
176 |
* appending or prepending to the ones previously set for this prefix.
|
177 |
*
|
178 |
+
* @param string $prefix The prefix
|
179 |
+
* @param string[]|string $paths The PSR-0 root directories
|
180 |
+
* @param bool $prepend Whether to prepend the directories
|
181 |
+
*
|
182 |
+
* @return void
|
183 |
*/
|
184 |
public function add($prefix, $paths, $prepend = false)
|
185 |
{
|
222 |
* Registers a set of PSR-4 directories for a given namespace, either
|
223 |
* appending or prepending to the ones previously set for this namespace.
|
224 |
*
|
225 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
226 |
+
* @param string[]|string $paths The PSR-4 base directories
|
227 |
+
* @param bool $prepend Whether to prepend the directories
|
228 |
*
|
229 |
* @throws \InvalidArgumentException
|
230 |
+
*
|
231 |
+
* @return void
|
232 |
*/
|
233 |
public function addPsr4($prefix, $paths, $prepend = false)
|
234 |
{
|
272 |
* Registers a set of PSR-0 directories for a given prefix,
|
273 |
* replacing any others previously set for this prefix.
|
274 |
*
|
275 |
+
* @param string $prefix The prefix
|
276 |
+
* @param string[]|string $paths The PSR-0 base directories
|
277 |
+
*
|
278 |
+
* @return void
|
279 |
*/
|
280 |
public function set($prefix, $paths)
|
281 |
{
|
290 |
* Registers a set of PSR-4 directories for a given namespace,
|
291 |
* replacing any others previously set for this namespace.
|
292 |
*
|
293 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
294 |
+
* @param string[]|string $paths The PSR-4 base directories
|
295 |
*
|
296 |
* @throws \InvalidArgumentException
|
297 |
+
*
|
298 |
+
* @return void
|
299 |
*/
|
300 |
public function setPsr4($prefix, $paths)
|
301 |
{
|
315 |
* Turns on searching the include path for class files.
|
316 |
*
|
317 |
* @param bool $useIncludePath
|
318 |
+
*
|
319 |
+
* @return void
|
320 |
*/
|
321 |
public function setUseIncludePath($useIncludePath)
|
322 |
{
|
339 |
* that have not been registered with the class map.
|
340 |
*
|
341 |
* @param bool $classMapAuthoritative
|
342 |
+
*
|
343 |
+
* @return void
|
344 |
*/
|
345 |
public function setClassMapAuthoritative($classMapAuthoritative)
|
346 |
{
|
361 |
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
362 |
*
|
363 |
* @param string|null $apcuPrefix
|
364 |
+
*
|
365 |
+
* @return void
|
366 |
*/
|
367 |
public function setApcuPrefix($apcuPrefix)
|
368 |
{
|
369 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
370 |
}
|
371 |
|
372 |
/**
|
383 |
* Registers this instance as an autoloader.
|
384 |
*
|
385 |
* @param bool $prepend Whether to prepend the autoloader or not
|
386 |
+
*
|
387 |
+
* @return void
|
388 |
*/
|
389 |
public function register($prepend = false)
|
390 |
{
|
391 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
392 |
+
|
393 |
+
if (null === $this->vendorDir) {
|
394 |
+
return;
|
395 |
+
}
|
396 |
+
|
397 |
+
if ($prepend) {
|
398 |
+
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
399 |
+
} else {
|
400 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
401 |
+
self::$registeredLoaders[$this->vendorDir] = $this;
|
402 |
+
}
|
403 |
}
|
404 |
|
405 |
/**
|
406 |
* Unregisters this instance as an autoloader.
|
407 |
+
*
|
408 |
+
* @return void
|
409 |
*/
|
410 |
public function unregister()
|
411 |
{
|
412 |
spl_autoload_unregister(array($this, 'loadClass'));
|
413 |
+
|
414 |
+
if (null !== $this->vendorDir) {
|
415 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
416 |
+
}
|
417 |
}
|
418 |
|
419 |
/**
|
420 |
* Loads the given class or interface.
|
421 |
*
|
422 |
* @param string $class The name of the class
|
423 |
+
* @return true|null True if loaded, null otherwise
|
424 |
*/
|
425 |
public function loadClass($class)
|
426 |
{
|
429 |
|
430 |
return true;
|
431 |
}
|
432 |
+
|
433 |
+
return null;
|
434 |
}
|
435 |
|
436 |
/**
|
475 |
return $file;
|
476 |
}
|
477 |
|
478 |
+
/**
|
479 |
+
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
480 |
+
*
|
481 |
+
* @return self[]
|
482 |
+
*/
|
483 |
+
public static function getRegisteredLoaders()
|
484 |
+
{
|
485 |
+
return self::$registeredLoaders;
|
486 |
+
}
|
487 |
+
|
488 |
+
/**
|
489 |
+
* @param string $class
|
490 |
+
* @param string $ext
|
491 |
+
* @return string|false
|
492 |
+
*/
|
493 |
private function findFileWithExtension($class, $ext)
|
494 |
{
|
495 |
// PSR-4 lookup
|
500 |
$subPath = $class;
|
501 |
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
502 |
$subPath = substr($subPath, 0, $lastPos);
|
503 |
+
$search = $subPath . '\\';
|
504 |
if (isset($this->prefixDirsPsr4[$search])) {
|
505 |
+
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
506 |
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
507 |
+
if (file_exists($file = $dir . $pathEnd)) {
|
|
|
508 |
return $file;
|
509 |
}
|
510 |
}
|
561 |
* Scope isolated include.
|
562 |
*
|
563 |
* Prevents access to $this/self from included files.
|
564 |
+
*
|
565 |
+
* @param string $file
|
566 |
+
* @return void
|
567 |
+
* @private
|
568 |
*/
|
569 |
function includeFile($file)
|
570 |
{
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -2,10 +2,11 @@
|
|
2 |
|
3 |
// autoload_classmap.php @generated by Composer
|
4 |
|
5 |
-
$vendorDir = dirname(
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
9 |
'RP4WP' => $baseDir . '/classes/class-rp4wp.php',
|
10 |
'RP4WP_Cap_Manager' => $baseDir . '/classes/class-cap-manager.php',
|
11 |
'RP4WP_Class_Manager' => $baseDir . '/classes/class-class-manager.php',
|
@@ -15,6 +16,7 @@ return array(
|
|
15 |
'RP4WP_Filter_After_Post' => $baseDir . '/classes/filters/class-filter-after-post.php',
|
16 |
'RP4WP_Filter_Plugin_Links' => $baseDir . '/classes/filters/class-filter-plugin-links.php',
|
17 |
'RP4WP_Filter_Set_Screen_Option' => $baseDir . '/classes/filters/class-filter-set-screen-option.php',
|
|
|
18 |
'RP4WP_Hook' => $baseDir . '/classes/hooks/class-hook.php',
|
19 |
'RP4WP_Hook_Admin_Scripts' => $baseDir . '/classes/hooks/class-hook-admin-scripts.php',
|
20 |
'RP4WP_Hook_Ajax_Delete_Link' => $baseDir . '/classes/hooks/class-hook-ajax-delete-link.php',
|
2 |
|
3 |
// autoload_classmap.php @generated by Composer
|
4 |
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
10 |
'RP4WP' => $baseDir . '/classes/class-rp4wp.php',
|
11 |
'RP4WP_Cap_Manager' => $baseDir . '/classes/class-cap-manager.php',
|
12 |
'RP4WP_Class_Manager' => $baseDir . '/classes/class-class-manager.php',
|
16 |
'RP4WP_Filter_After_Post' => $baseDir . '/classes/filters/class-filter-after-post.php',
|
17 |
'RP4WP_Filter_Plugin_Links' => $baseDir . '/classes/filters/class-filter-plugin-links.php',
|
18 |
'RP4WP_Filter_Set_Screen_Option' => $baseDir . '/classes/filters/class-filter-set-screen-option.php',
|
19 |
+
'RP4WP_Filter_Yoast_Duplicate_Post' => $baseDir . '/classes/filters/class-filter-yoast-duplicate-post.php',
|
20 |
'RP4WP_Hook' => $baseDir . '/classes/hooks/class-hook.php',
|
21 |
'RP4WP_Hook_Admin_Scripts' => $baseDir . '/classes/hooks/class-hook-admin-scripts.php',
|
22 |
'RP4WP_Hook_Ajax_Delete_Link' => $baseDir . '/classes/hooks/class-hook-ajax-delete-link.php',
|
vendor/composer/autoload_namespaces.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_namespaces.php @generated by Composer
|
4 |
|
5 |
-
$vendorDir = dirname(
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
2 |
|
3 |
// autoload_namespaces.php @generated by Composer
|
4 |
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
vendor/composer/autoload_psr4.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_psr4.php @generated by Composer
|
4 |
|
5 |
-
$vendorDir = dirname(
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
2 |
|
3 |
// autoload_psr4.php @generated by Composer
|
4 |
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
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 |
|
@@ -13,37 +13,21 @@ class ComposerAutoloaderIniteda194100eccf2275d23589996347a97
|
|
13 |
}
|
14 |
}
|
15 |
|
|
|
|
|
|
|
16 |
public static function getLoader()
|
17 |
{
|
18 |
if (null !== self::$loader) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
-
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
require_once __DIR__ . '/autoload_static.php';
|
29 |
-
|
30 |
-
call_user_func(\Composer\Autoload\ComposerStaticIniteda194100eccf2275d23589996347a97::getInitializer($loader));
|
31 |
-
} else {
|
32 |
-
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
-
foreach ($map as $namespace => $path) {
|
34 |
-
$loader->set($namespace, $path);
|
35 |
-
}
|
36 |
-
|
37 |
-
$map = require __DIR__ . '/autoload_psr4.php';
|
38 |
-
foreach ($map as $namespace => $path) {
|
39 |
-
$loader->setPsr4($namespace, $path);
|
40 |
-
}
|
41 |
-
|
42 |
-
$classMap = require __DIR__ . '/autoload_classmap.php';
|
43 |
-
if ($classMap) {
|
44 |
-
$loader->addClassMap($classMap);
|
45 |
-
}
|
46 |
-
}
|
47 |
|
48 |
$loader->register(true);
|
49 |
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit91a3c7c82278c7e01b5ce9877aaa9299
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
13 |
}
|
14 |
}
|
15 |
|
16 |
+
/**
|
17 |
+
* @return \Composer\Autoload\ClassLoader
|
18 |
+
*/
|
19 |
public static function getLoader()
|
20 |
{
|
21 |
if (null !== self::$loader) {
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit91a3c7c82278c7e01b5ce9877aaa9299', 'loadClassLoader'), true, true);
|
26 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit91a3c7c82278c7e01b5ce9877aaa9299', 'loadClassLoader'));
|
28 |
+
|
29 |
+
require __DIR__ . '/autoload_static.php';
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit91a3c7c82278c7e01b5ce9877aaa9299::getInitializer($loader));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit442e3f5637b89254b0477194a9f1fb8b {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInit878e2a98c3221f2b061d618a8a9d70cc {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit878e2a98c3221f2b061d618a8a9d70cc', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit878e2a98c3221f2b061d618a8a9d70cc', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixesPsr0 = array (
|
10 |
'x' =>
|
@@ -17,6 +17,7 @@ class ComposerStaticIniteda194100eccf2275d23589996347a97
|
|
17 |
);
|
18 |
|
19 |
public static $classMap = array (
|
|
|
20 |
'RP4WP' => __DIR__ . '/../..' . '/classes/class-rp4wp.php',
|
21 |
'RP4WP_Cap_Manager' => __DIR__ . '/../..' . '/classes/class-cap-manager.php',
|
22 |
'RP4WP_Class_Manager' => __DIR__ . '/../..' . '/classes/class-class-manager.php',
|
@@ -26,6 +27,7 @@ class ComposerStaticIniteda194100eccf2275d23589996347a97
|
|
26 |
'RP4WP_Filter_After_Post' => __DIR__ . '/../..' . '/classes/filters/class-filter-after-post.php',
|
27 |
'RP4WP_Filter_Plugin_Links' => __DIR__ . '/../..' . '/classes/filters/class-filter-plugin-links.php',
|
28 |
'RP4WP_Filter_Set_Screen_Option' => __DIR__ . '/../..' . '/classes/filters/class-filter-set-screen-option.php',
|
|
|
29 |
'RP4WP_Hook' => __DIR__ . '/../..' . '/classes/hooks/class-hook.php',
|
30 |
'RP4WP_Hook_Admin_Scripts' => __DIR__ . '/../..' . '/classes/hooks/class-hook-admin-scripts.php',
|
31 |
'RP4WP_Hook_Ajax_Delete_Link' => __DIR__ . '/../..' . '/classes/hooks/class-hook-ajax-delete-link.php',
|
@@ -62,8 +64,8 @@ class ComposerStaticIniteda194100eccf2275d23589996347a97
|
|
62 |
public static function getInitializer(ClassLoader $loader)
|
63 |
{
|
64 |
return \Closure::bind(function () use ($loader) {
|
65 |
-
$loader->prefixesPsr0 =
|
66 |
-
$loader->classMap =
|
67 |
|
68 |
}, null, ClassLoader::class);
|
69 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit91a3c7c82278c7e01b5ce9877aaa9299
|
8 |
{
|
9 |
public static $prefixesPsr0 = array (
|
10 |
'x' =>
|
17 |
);
|
18 |
|
19 |
public static $classMap = array (
|
20 |
+
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
21 |
'RP4WP' => __DIR__ . '/../..' . '/classes/class-rp4wp.php',
|
22 |
'RP4WP_Cap_Manager' => __DIR__ . '/../..' . '/classes/class-cap-manager.php',
|
23 |
'RP4WP_Class_Manager' => __DIR__ . '/../..' . '/classes/class-class-manager.php',
|
27 |
'RP4WP_Filter_After_Post' => __DIR__ . '/../..' . '/classes/filters/class-filter-after-post.php',
|
28 |
'RP4WP_Filter_Plugin_Links' => __DIR__ . '/../..' . '/classes/filters/class-filter-plugin-links.php',
|
29 |
'RP4WP_Filter_Set_Screen_Option' => __DIR__ . '/../..' . '/classes/filters/class-filter-set-screen-option.php',
|
30 |
+
'RP4WP_Filter_Yoast_Duplicate_Post' => __DIR__ . '/../..' . '/classes/filters/class-filter-yoast-duplicate-post.php',
|
31 |
'RP4WP_Hook' => __DIR__ . '/../..' . '/classes/hooks/class-hook.php',
|
32 |
'RP4WP_Hook_Admin_Scripts' => __DIR__ . '/../..' . '/classes/hooks/class-hook-admin-scripts.php',
|
33 |
'RP4WP_Hook_Ajax_Delete_Link' => __DIR__ . '/../..' . '/classes/hooks/class-hook-ajax-delete-link.php',
|
64 |
public static function getInitializer(ClassLoader $loader)
|
65 |
{
|
66 |
return \Closure::bind(function () use ($loader) {
|
67 |
+
$loader->prefixesPsr0 = ComposerStaticInit91a3c7c82278c7e01b5ce9877aaa9299::$prefixesPsr0;
|
68 |
+
$loader->classMap = ComposerStaticInit91a3c7c82278c7e01b5ce9877aaa9299::$classMap;
|
69 |
|
70 |
}, null, ClassLoader::class);
|
71 |
}
|