Update PHP files to pass coding standards
This commit is contained in:
@@ -10,14 +10,14 @@ namespace Roots\Sage\Wrapper;
|
||||
*/
|
||||
|
||||
function template_path() {
|
||||
return Sage_Wrapping::$main_template;
|
||||
return SageWrapping::$main_template;
|
||||
}
|
||||
|
||||
function sidebar_path() {
|
||||
return new Sage_Wrapping('templates/sidebar.php');
|
||||
return new SageWrapping('templates/sidebar.php');
|
||||
}
|
||||
|
||||
class Sage_Wrapping {
|
||||
class SageWrapping {
|
||||
// Stores the full path to the main template file
|
||||
public static $main_template;
|
||||
|
||||
@@ -28,7 +28,7 @@ class Sage_Wrapping {
|
||||
public $templates;
|
||||
|
||||
// Stores the base name of the template file; e.g. 'page' for 'page.php' etc.
|
||||
static $base;
|
||||
public static $base;
|
||||
|
||||
public function __construct($template = 'base.php') {
|
||||
$this->slug = basename($template, '.php');
|
||||
@@ -45,7 +45,7 @@ class Sage_Wrapping {
|
||||
return locate_template($this->templates);
|
||||
}
|
||||
|
||||
static function wrap($main) {
|
||||
public static function wrap($main) {
|
||||
// Check for other filters returning null
|
||||
if (!is_string($main)) {
|
||||
return $main;
|
||||
@@ -58,7 +58,7 @@ class Sage_Wrapping {
|
||||
self::$base = false;
|
||||
}
|
||||
|
||||
return new Sage_Wrapping();
|
||||
return new SageWrapping();
|
||||
}
|
||||
}
|
||||
add_filter('template_include', [__NAMESPACE__ . '\\Sage_Wrapping', 'wrap'], 99);
|
||||
add_filter('template_include', [__NAMESPACE__ . '\\SageWrapping', 'wrap'], 99);
|
||||
|
||||
Reference in New Issue
Block a user