26 lines
No EOL
839 B
PHP
26 lines
No EOL
839 B
PHP
<?php namespace ProcessWire;
|
|
|
|
if(!defined("PROCESSWIRE")) die();
|
|
|
|
/** @var ProcessWire $wire */
|
|
|
|
/**
|
|
* ProcessWire Bootstrap Initialization
|
|
* ====================================
|
|
* This init.php file is called during ProcessWire bootstrap initialization process.
|
|
* This occurs after all autoload modules have been initialized, but before the current page
|
|
* has been determined. This is a good place to attach hooks. You may place whatever you'd
|
|
* like in this file. For example:
|
|
*
|
|
* $wire->addHookAfter('Page::render', function($event) {
|
|
* $event->return = str_replace("</body>", "<p>Hello World</p></body>", $event->return);
|
|
* });
|
|
*
|
|
*/
|
|
|
|
$wire->addHookAfter('Pages::added', function($event)
|
|
{
|
|
$page = $event->arguments(0);
|
|
foreach ($this->wire->languages as $lang) $page->set("status$lang", 1);
|
|
$page->save();
|
|
}); |