| Server IP : 87.98.154.146 / Your IP : 216.73.216.165 Web Server : Apache System : Linux webm004.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : ohklomafyi ( 52085) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/ohklomafyi/www/wp-content/plugins/wp-seopress/src/Actions/Front/Metas/ |
Upload File : |
<?php
namespace SEOPress\Actions\Front\Metas;
defined('ABSPATH') or exit('Cheatin’ uh?');
use SEOPress\Core\Hooks\ExecuteHooksFrontend;
class DescriptionMeta implements ExecuteHooksFrontend {
protected $tagsToStringService;
public function __construct() {
$this->tagsToStringService = seopress_get_service('TagsToString');
}
/**
* @since 4.4.0
*
* @return void
*/
public function hooks() {
if (apply_filters('seopress_old_wp_head_description', true)) {
return;
}
add_action('wp_head', [$this, 'preLoad'], 0);
}
public function preLoad(){
if ((function_exists('is_wpforo_page') && is_wpforo_page()) || (class_exists('Ecwid_Store_Page') && \Ecwid_Store_Page::is_store_page())) {//disable on wpForo pages to avoid conflicts
return;
}
add_action('wp_head', [$this, 'render'], 1);
}
public function render() {
$content = $this->getContent();
if (empty($content)) {
return;
}
$html = '<meta name="description" content="' . $content . '">';
$html .= "\n";
echo $html;
}
protected function getContent() {
$context = seopress_get_service('ContextPage')->getContext();
$description = seopress_get_service('DescriptionMeta')->getValue($context);
return $description;
}
}