<?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;
|
}
|
}
|