Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -12,21 +12,27 @@
|
||||
namespace IPS\{app}\extensions\core\Sitemap;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Extensions\SitemapAbstract;
|
||||
use IPS\Settings as SettingsClass;
|
||||
use IPS\Sitemap;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Support {class} in sitemaps
|
||||
*/
|
||||
class _{class}
|
||||
class {class} extends SitemapAbstract
|
||||
{
|
||||
/**
|
||||
* @brief Recommended Settings
|
||||
*/
|
||||
public $recommendedSettings = array();
|
||||
public array $recommendedSettings = array();
|
||||
|
||||
/**
|
||||
* Add settings for ACP configuration to the form
|
||||
@@ -44,17 +50,17 @@ class _{class}
|
||||
* @param array $values Values
|
||||
* @return void
|
||||
*/
|
||||
public function saveSettings( $values )
|
||||
public function saveSettings( array $values ) : void
|
||||
{
|
||||
if ( $values['sitemap_configuration_info'] )
|
||||
{
|
||||
// Store default values for any settings you define
|
||||
//\IPS\Settings::i()->changeValues( array( ) );
|
||||
//SettingsClass::i()->changeValues( array( ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Store the actual submitted value for any settings you define, from the $values array
|
||||
//\IPS\Settings::i()->changeValues( array( ) );
|
||||
//SettingsClass::i()->changeValues( array( ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,12 +77,13 @@ class _{class}
|
||||
/**
|
||||
* Generate the sitemap
|
||||
*
|
||||
* @param string $filename The sitemap file to build (should be one returned from getFilenames())
|
||||
* @param \IPS\Sitemap $sitemap Sitemap object reference
|
||||
* @return void
|
||||
* @param string $filename The sitemap file to build (should be one returned from getFilenames())
|
||||
* @param Sitemap $sitemap Sitemap object reference
|
||||
* @return int|null
|
||||
*/
|
||||
public function generateSitemap( $filename, $sitemap )
|
||||
public function generateSitemap( string $filename, Sitemap $sitemap ) : ?int
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user