Skip to content

Commit fa158fd

Browse files
authored
Merge pull request #22 from Camwyn/master
PHP requires magic methods to be public.
2 parents 39bab61 + 5415723 commit fa158fd

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

WP_Router.class.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
2+
33
class WP_Router extends WP_Router_Utility {
44
const ROUTE_CACHE_OPTION = 'WP_Router_route_hash';
55
private $routes = array();
@@ -87,7 +87,7 @@ public function remove_route( $id ) {
8787

8888
/**
8989
* Get the URL to access the given route with the given arguments
90-
*
90+
*
9191
* @param string $route_id
9292
* @param array $arguments
9393
* @return string The url to the route, or the home URL if the route doesn't exist
@@ -115,7 +115,7 @@ public static function get_instance() {
115115
}
116116
return self::$instance;
117117
}
118-
118+
119119
/**
120120
* Hook into WordPress
121121
*/
@@ -126,12 +126,12 @@ private function __construct() {
126126
add_filter('query_vars', array($this, 'add_query_vars'), 10, 1);
127127
}
128128

129-
private function __clone() {
129+
public function __clone() {
130130
// cannot be cloned
131131
trigger_error(__CLASS__.' may not be cloned', E_USER_ERROR);
132132
}
133133

134-
private function __sleep() {
134+
public function __sleep() {
135135
// cannot be serialized
136136
trigger_error(__CLASS__.' may not be serialized', E_USER_ERROR);
137137
}
@@ -285,7 +285,7 @@ protected function hash( $rules ) {
285285

286286
/**
287287
* Tell WordPress to flush its rewrite rules
288-
*
288+
*
289289
* @return void
290290
*/
291291
protected function flush_rewrite_rules() {

0 commit comments

Comments
 (0)