Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
jsarnowski/brizy-pro / placeholders / simple-post-aware.php
Size: Mime:
<?php

use BrizyPlaceholders\ContentPlaceholder;
use BrizyPlaceholders\ContextInterface;

class BrizyPro_Content_Placeholders_SimplePostAware extends Brizy_Content_Placeholders_Simple
{

    /**
     * @param ContextInterface $context
     * @param ContentPlaceholder $contentPlaceholder
     * @return false|mixed|string
     */
    public function getValue(ContextInterface $context, ContentPlaceholder $contentPlaceholder)
    {
        if (!$context->getWpPost()) {
            return;
        }

        return parent::getValue($context, $contentPlaceholder);
    }

    /**
     * @return mixed|string
     */
    protected function getOptionValue()
    {

        return $this->getReplacePlaceholder();
    }
}