Skip to content

Commit

Permalink
Revert "Function comments clean up for clarity."
Browse files Browse the repository at this point in the history
This reverts commit 21a9e03.
  • Loading branch information
Nate Devereux committed Jun 17, 2022
1 parent 536762d commit 918650e
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/Model/Extension/SeoPageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,30 +417,24 @@ public function getTwitterCardTypes()

/**
* Get the current page Meta title
* It is important to note the order of fallbacks
*
*
* @since version 2.0.0
*
* @return void|string
* @return string
**/
public function getPageMetaTitle()
{
// If we have a MetaTitle defined for this Page
if ($this->owner->MetaTitle) {
if($this->owner->MetaTitle) {
return $this->owner->MetaTitle;
}
// If we are a BlogPost lets check for a parent Page MetaTitle
if (class_exists(BlogPost::class)) {
if ($this->owner instanceof BlogPost) {
if ($this->owner->Parent()->DefaultPostMetaTitle == 1) {

if(class_exists(BlogPost::class)) {
if($this->owner instanceof BlogPost) {
if($this->owner->Parent()->DefaultPostMetaTitle == 1) {
return $this->owner->Title;
}
}
}

// Lastly if we have the SiteConfig option to use a Page's Title as the MetaTitle use that
if (SiteConfig::current_site_config()->UseTitleAsMetaTitle) {
if(SiteConfig::current_site_config()->UseTitleAsMetaTitle) {
return $this->owner->Title;
}
}
Expand Down Expand Up @@ -563,7 +557,7 @@ public function getPageTwitterCard()
*
* @since version 2.0.0
*
* @return Image
* @return string
**/
public function getPageSocialImage()
{
Expand Down

0 comments on commit 918650e

Please sign in to comment.