Website : phonehp.ir
backdoor
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Home
Console
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Warning
: Undefined variable $backdoor in
/home/nehpir/public_html/goods.php
on line
326
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
nehpir
/
www
/
wp-content
/
plugins
/
woocommersa
/
includes
/
Core
/
SEO
/
Providers
/
Filename :
Yoast.php
back
Warning
: Undefined variable $file in
/home/nehpir/public_html/goods.php
on line
545
Copy
<?php namespace WooCommersa\Core\SEO\Providers; if (!defined('ABSPATH')) exit; use WooCommersa\Core\SEO\ProviderInterface; class Yoast implements ProviderInterface { private $keys = [ 'title' => '_yoast_wpseo_title', 'description' => '_yoast_wpseo_metadesc', 'keywords' => '_yoast_wpseo_focuskw' ]; public function update_meta($post_id, $field, $value) { if (!isset($this->keys[$field])) return false; $result = update_post_meta($post_id, $this->keys[$field], $value); $this->notify_yoast($post_id); return $result; } public function get_meta($post_id, $field) { if (!isset($this->keys[$field])) return ''; return get_post_meta($post_id, $this->keys[$field], true); } public function supports_schema() { return defined('WPSEO_VERSION'); // Yoast handles schema } public function inject_schema($post_id) { // Yoast handles its own schema injection. return true; } public function get_robots($post_id) { $noindex = get_post_meta($post_id, '_yoast_wpseo_meta-robots-noindex', true); $nofollow = get_post_meta($post_id, '_yoast_wpseo_meta-robots-nofollow', true); $robots = []; $robots[] = ($noindex == '1') ? 'noindex' : 'index'; $robots[] = ($nofollow == '1') ? 'nofollow' : 'follow'; return $robots; } public function update_robots($post_id, $robots) { $robots = (array) $robots; $noindex = in_array('noindex', $robots) ? '1' : '0'; $nofollow = in_array('nofollow', $robots) ? '1' : '0'; update_post_meta($post_id, '_yoast_wpseo_meta-robots-noindex', $noindex); update_post_meta($post_id, '_yoast_wpseo_meta-robots-nofollow', $nofollow); $this->notify_yoast($post_id); return true; } public function get_faq_schema($post_id) { // Yoast usually stores FAQ in blocks, so we use our fallback meta for katalog sync $faq = get_post_meta($post_id, 'faq_schema_data', true); return is_array($faq) ? $faq : []; } public function update_faq_schema($post_id, $faq_data) { return update_post_meta($post_id, 'faq_schema_data', (array) $faq_data); } public function has_faq_schema($post_id) { // Yoast typically uses blocks, we return false to favor our reliable meta-based schema return false; } /** * Notify Yoast SEO about metadata changes */ private function notify_yoast($post_id) { // Invalidate Yoast Indexable to force a re-index if (function_exists('YoastSEO')) { try { $indexable_repository = \YoastSEO()->classes->get(\Yoast\WP\SEO\Repositories\Indexable_Repository::class); $indexable = $indexable_repository->find_by_id_and_type($post_id, 'post'); if ($indexable) { $indexable_repository->delete($indexable); } } catch (\Throwable $e) { // Silently fail if Yoast classes are not accessible } } } }