/** * @var $this->_properties['dir'] * @param void * @return Boolean, Is cache exists * @see https://github.com/Viaprestige/PrestigeSEO/wiki/developer/#_cacheExists() */ public function cacheExists() { $this->_properties['dir'] = dirname(dirname(parent::getTemplatedirectory())) . $this->_properties['dir']; $this->_properties['cachefile'] = scandir($this->_properties['dir']); if (file_exists($this->_properties['dir']) && isset($this->_properties['cachefile'][2])) { return true; } else { return false; } }
/** * @var $this->_properties * @param viod * @return [], String * @see https://github.com/Viaprestige/PrestigeSEO/wiki/developer/#_setProperties() */ private function _setProperties() { // Check if is Article if (parent::isSingle() == true && !parent::isFrontpage() && !parent::isAuthor()) { // _properties['@context'] is set to default $this->_properties['@type'] = 'Article'; // Static value $this->_properties['url'] = parent::getUrl(); $this->_properties['author'] = array('@type' => 'Person', 'name' => parent::getUsername()); $this->_properties['headline'] = parent::getTitle(); $this->_properties['datePublished'] = parent::getPublishdate(); $this->_properties['dateModified'] = parent::getModifieddate(); $this->_properties['mainEntityOfPage'] = parent::getBlogurl(); $this->_properties['ArticleSection'] = parent::getCategoryname(); $this->_properties['description'] = parent::getArticleresume(); $this->_properties['image'] = array("@type" => "ImageObject", "url" => parent::getImage(), "width" => 800, "height" => 800); $this->_properties['Publisher'] = array('@type' => 'Organization', 'name' => 'Viaprestige', 'url' => 'http://viaprestige-agency.com/', 'logo' => array("@type" => "ImageObject", "url" => "http://viaprestige-agency.com/wp-content/uploads/2015/10/logo-viaprestige.png", "width" => 250, "height" => 60)); return $this->_properties; break; } elseif (parent::isFrontpage() == true && !parent::isAuthor() && !parent::isSingle()) { // _properties['@context'] is set to default $this->_properties['@type'] = 'Organization'; // Static value $this->_properties['name'] = parent::getSitename(); $this->_properties['logo'] = $this->_objects['Avada']->getLogo(); $this->_properties['description'] = parent::getSitedescription(); $this->_properties['url'] = parent::getUrl(); $this->_properties['sameAs'] = array($this->_objects['Avada']->getSocial('facebook'), $this->_objects['Avada']->getSocial('twitter'), $this->_objects['Avada']->getSocial('linkedin'), $this->_objects['Avada']->getSocial('google')); $this->_properties['contactPoint'] = array(array("@type" => "ContactPoint", "telephone" => $this->_objects['Avada']->getPhone(), "email" => $this->_objects['Avada']->getMail(), "contactType" => "customer service", "availableLanguage" => parent::getSitelanguage())); $this->_properties['address'] = array(array("@type" => "PostalAddress", "addressLocality" => $this->_objects['Avada']->getAddress('addressLocality'), "postalCode" => $this->_objects['Avada']->getAddress('postalCode'), "streetAddress" => $this->_objects['Avada']->getAddress('streetAddress'))); return $this->_properties; break; } elseif (parent::isAuthor() == true && !parent::isFrontpage() && !parent::isSingle()) { // _properties['@context'] is set to default $this->_properties['@type'] = 'Person'; // Static value $this->_properties['name'] = parent::getUsername(); $this->_properties['telephone'] = $this->_objects['Avada']->getPhone(); $this->_properties['sameAs'] = array($this->_objects['Avada']->getSocial('facebook'), $this->_objects['Avada']->getSocial('twitter'), $this->_objects['Avada']->getSocial('linkedin'), $this->_objects['Avada']->getSocial('google')); return $this->_properties; break; } elseif (parent::isContact() == true) { // _properties['@context'] is set to default $this->_properties['@type'] = 'LocalBusiness'; // Static value $this->_properties['name'] = parent::getSitename(); $this->_properties['telephone'] = $this->_objects['Avada']->getPhone(); $this->_properties['address'] = array(array("@type" => "PostalAddress", "addressLocality" => $this->_objects['Avada']->getAddress('addressLocality'), "postalCode" => $this->_objects['Avada']->getAddress('postalCode'), "streetAddress" => $this->_objects['Avada']->getAddress('streetAddress'))); return $this->_properties; break; } }