golden hour
/home/godaofbq/drhyperbaric.com/wp-content/plugins/betterdocs/includes/Admin/Builder
⬆️ Go Up
Upload
File/Folder
Size
Actions
.htaccess
420 B
Del
OK
GlobalFields.php
1.32 KB
Del
OK
Rule.php
1.22 KB
Del
OK
Rules.php
3.38 KB
Del
OK
Edit: Rule.php
<?php namespace WPDeveloper\BetterDocs\Admin\Builder; use JsonSerializable; class Rule implements JsonSerializable { public $condition; public $name; public $value; public function __construct( $condition, $name, $value ) { $this->condition = $condition; $this->name = $name; $this->value = $value; } public function add_value( $value ) { if ( ! is_array( $this->value ) ) { $this->value = [$this->value]; } if ( is_a( $value, 'NotificationX\Core\Rule' ) ) { $value = $value->value; } if ( is_array( $value ) ) { $this->value = array_merge( $this->value, $value ); } else { $this->value[] = $value; } $this->value = array_values( array_unique( $this->value ) ); } public function can_add( $rule ) { if ( $this->condition == 'includes' && $this->condition == $rule->condition && $this->name == $rule->name ) { return true; } return false; } #[\ReturnTypeWillChange] public function jsonSerialize() { return [ $this->condition, $this->name, $this->value ]; } }
Save