Jake Vanderwerf
2026-03-03 772462eeca3002a1d52508aeba485aab2b4742ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
namespace JVBase\managers\SEO\render\Traits\_Properties;
 
use JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork;
 
if (!defined('ABSPATH')) {
    exit;
}
trait publishingPrinciplesTrait {
    /**
     * @var CreativeWork|string The publishingPrinciples property indicates (typically via URL) a document describing the editorial principles of an Organization (or individual, e.g. a Person writing a blog) that relate to their activities as a publisher, e.g. ethics or diversity policies. When applied to a CreativeWork (e.g. NewsArticle) the principles are those of the party primarily responsible for the creation of the CreativeWork.
     *
     * While such policies are most typically expressed in natural language, sometimes related information (e.g. indicating a funder) can be expressed using schema.org terminology.
     */
    protected CreativeWork|string $publishingPrinciples;
 
    public function getPublishingPrinciples():CreativeWork|string|null
    {
        return $this->publishingPrinciples??null;
    }
    public function setPublishingPrinciples(CreativeWork|string $publishingPrinciples):void
    {
        if (is_string($publishingPrinciples) && !filter_var($publishingPrinciples, FILTER_VALIDATE_URL)) {
            error_log('[SEO] Publishing Principles should be a valid URL: '.$publishingPrinciples);
            return;
        }
        $this->publishingPrinciples = $publishingPrinciples;
    }
}