Skip to content

Commit

Permalink
Merge pull request #22 from Camwyn/master
Browse files Browse the repository at this point in the history
PHP requires magic methods to be public.
  • Loading branch information
jbrinley authored Oct 14, 2019
2 parents 39bab61 + 5415723 commit fa158fd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions WP_Router.class.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

class WP_Router extends WP_Router_Utility {
const ROUTE_CACHE_OPTION = 'WP_Router_route_hash';
private $routes = array();
Expand Down Expand Up @@ -87,7 +87,7 @@ public function remove_route( $id ) {

/**
* Get the URL to access the given route with the given arguments
*
*
* @param string $route_id
* @param array $arguments
* @return string The url to the route, or the home URL if the route doesn't exist
Expand Down Expand Up @@ -115,7 +115,7 @@ public static function get_instance() {
}
return self::$instance;
}

/**
* Hook into WordPress
*/
Expand All @@ -126,12 +126,12 @@ private function __construct() {
add_filter('query_vars', array($this, 'add_query_vars'), 10, 1);
}

private function __clone() {
public function __clone() {
// cannot be cloned
trigger_error(__CLASS__.' may not be cloned', E_USER_ERROR);
}

private function __sleep() {
public function __sleep() {
// cannot be serialized
trigger_error(__CLASS__.' may not be serialized', E_USER_ERROR);
}
Expand Down Expand Up @@ -285,7 +285,7 @@ protected function hash( $rules ) {

/**
* Tell WordPress to flush its rewrite rules
*
*
* @return void
*/
protected function flush_rewrite_rules() {
Expand Down

0 comments on commit fa158fd

Please sign in to comment.