File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ abstract class Config
32
32
protected static string $ defaulttemplatebody = '' ;
33
33
protected static ?string $ defaulttemplatecss = null ;
34
34
protected static ?string $ defaulttemplatejavascript = null ;
35
+ protected static bool $ defaultnoindex = false ;
36
+
35
37
protected static string $ suffix = "" ;
36
38
protected static bool $ externallinkblank = true ;
37
39
protected static bool $ internallinkblank = false ;
@@ -316,6 +318,11 @@ public static function defaulttemplatejavascript(): ?string
316
318
return self ::$ defaulttemplatejavascript ;
317
319
}
318
320
321
+ public static function defaultnoindex (): bool
322
+ {
323
+ return self ::$ defaultnoindex ;
324
+ }
325
+
319
326
public static function defaultfavicon (): string
320
327
{
321
328
return self ::$ defaultfavicon ;
@@ -596,6 +603,10 @@ public static function setdefaulttemplatejavascript(?string $templatejavascript)
596
603
}
597
604
}
598
605
606
+ public static function setdefaultnoindex (bool $ defaultnoindex ): void
607
+ {
608
+ self ::$ defaultnoindex = $ defaultnoindex ;
609
+ }
599
610
600
611
public static function setdefaultfavicon (string $ defaultfavicon ): void
601
612
{
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ public function reset(): void
143
143
$ this ->setrefresh (0 );
144
144
$ this ->setpassword ('' );
145
145
$ this ->externallinks = [];
146
- $ this ->noindex = false ;
146
+ $ this ->noindex = Config:: defaultnoindex () ;
147
147
$ this ->postprocessaction = false ;
148
148
}
149
149
Original file line number Diff line number Diff line change 215
215
</select>
216
216
</p>
217
217
218
+ <p class="field">
219
+ <label for="defaultnoindex">no index</label>
220
+ <input type="hidden" name="defaultnoindex" value="0" form="admin">
221
+ <input type="checkbox" name="defaultnoindex" value="1" id="defaultnoindex" form="admin" <?= Wcms \Config::defaultnoindex () ? 'checked ' : '' ?> >
222
+ </p>
223
+
218
224
<h3>Default tags</h3>
219
225
220
226
<p class="field">
You can’t perform that action at this time.
0 commit comments