- Add package.json dependencies: jquery, jquery-ui, moment, daterangepicker, wavesurfer.js, air-datepicker - Create scripts/setup-vendor.js to copy npm packages to public/assets/vendor - Update view templates to use vendor paths instead of old /js/ or CDN URLs - Clean up legacy commented-out scripts in master layout
36 lines
739 B
PHP
36 lines
739 B
PHP
<?php
|
|
namespace Model;
|
|
|
|
class MetaData {
|
|
private $data = ['type' => 'article', 'locale' => 'nl-nl'];
|
|
|
|
public function set($prop, $val) {
|
|
if($val) {
|
|
$this->data[$prop] = $val;
|
|
}
|
|
return $this;
|
|
}
|
|
|
|
public function append($prop, $val) {
|
|
if(array_key_exists($prop, $this->data)) {
|
|
$this->data[$prop] .= $val;
|
|
}
|
|
return $this;
|
|
}
|
|
|
|
public function prepend($prop, $val) {
|
|
if(array_key_exists($prop, $this->data)) {
|
|
$this->data[$prop] = $val . $this->data[$prop];
|
|
}
|
|
return $this;
|
|
}
|
|
|
|
public function metaTags() {
|
|
foreach($this->data as $prop => $val) {
|
|
if($val) {
|
|
echo "<meta property=\"og:$prop\" content=\"" . htmlentities($val) . "\" />\n";
|
|
}
|
|
}
|
|
}
|
|
}
|