Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @brief Theme Hook Compilation Skeleton - Catch calls to parent during compile.
|
||||
* @author <a href='https://invisioncommunity.com/'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2023 Invision Power Services, Inc.
|
||||
* @package Invision Community
|
||||
* @since 16 February 2023
|
||||
*/
|
||||
|
||||
namespace IPS\Theme\Compile;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Theme Hook skeleton class
|
||||
*/
|
||||
class _ThemeHook
|
||||
{
|
||||
/**
|
||||
* @param $name
|
||||
* @param $arguments
|
||||
* @return string
|
||||
*/
|
||||
public function __call( string $name, array $arguments ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param $arguments
|
||||
* @return string
|
||||
*/
|
||||
public static function __callStatic( string $name, array $arguments ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @return void
|
||||
*/
|
||||
public function __set( string $name, mixed $value ): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2700,7 +2700,7 @@ class _Theme extends \IPS\Node\Model
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( eval( "namespace IPS\\Theme;\n\n" . str_replace( array( ' extends _HOOK_CLASS_', 'parent::hookData()' ), array( '_tmp', 'array()' ), file_get_contents( $path . '/' . $data['file'] ) ) ) !== FALSE )
|
||||
if ( eval( "namespace IPS\\Theme;\n\n" . str_replace( array( ' extends _HOOK_CLASS_', 'parent::hookData()' ), array( '_tmp EXTENDS \IPS\Theme\Compile\ThemeHook', 'array()' ), file_get_contents( $path . '/' . $data['file'] ) ) ) !== FALSE )
|
||||
{
|
||||
$class = "IPS\\Theme\\" . $data['class'] . "_tmp";
|
||||
$templateHooks = array_merge_recursive( $templateHooks, $class::hookData() );
|
||||
|
||||
Reference in new issue
Block a user