403Webshell
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/Ajax/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/ohklomafyi/www/wp-content/plugins/wp-seopress/src/Actions/Ajax/PreviewMetaTitle.php
<?php

namespace SEOPress\Actions\Ajax;

if ( ! defined('ABSPATH')) {
    exit;
}

use SEOPress\Core\Hooks\ExecuteHooksBackend;

class PreviewMetaTitle implements ExecuteHooksBackend {
    /**
     * @since 4.4.0
     *
     * @return void
     */
    public function hooks() {
        add_action('wp_ajax_get_preview_meta_title', [$this, 'get']);
    }

    /**
     * @since 4.4.0
     *
     * @return array
     */
    public function get() {
        if ( ! isset($_GET['template'])) { //phpcs:ignore
            wp_send_json_error();
            return;
        }

        $template    = stripcslashes($_GET['template']);
        $postId      = isset($_GET['post_id']) ? (int) $_GET['post_id'] : null;
        $homeId      = isset($_GET['home_id']) ? (int) $_GET['home_id'] : null;
        $termId      = isset($_GET['term_id']) ? (int) $_GET['term_id'] : null;

        $contextPage = seopress_get_service('ContextPage')->buildContextWithCurrentId((int) $_GET['post_id']);
        if ($postId) {
            $contextPage->setPostById((int) $_GET['post_id']);
            $contextPage->setIsSingle(true);

            $terms = get_the_terms($postId, 'post_tag');

            if ( ! empty($terms)) {
                $contextPage->setHasTag(true);
            }

            $categories = get_the_terms($postId, 'category');
            if ( ! empty($categories)) {
                $contextPage->setHasCategory(true);
            }
        }

        if ($postId === $homeId && null !== $homeId) {
            $contextPage->setIsHome(true);
        }

        if ($postId === $termId && null !== $termId) {
            $contextPage->setIsCategory(true);
            $contextPage->setTermId($termId);
        }

        $value   = seopress_get_service('TagsToString')->replace($template, $contextPage->getContext());

        wp_send_json_success($value);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit