403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.141
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/KnowledgeBase/wp-content/plugins/betterdocs/includes/REST/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/KnowledgeBase/wp-content/plugins/betterdocs/includes/REST/CategoryField.php
<?php

namespace WPDeveloper\BetterDocs\REST;
use WPDeveloper\BetterDocs\Core\BaseAPI;

class CategoryField extends BaseAPI {
    /**
     * @return mixed
     */
    public function register() {
        $this->register_field( 'doc_category', 'thumbnail', [
            'get_callback' => [$this, 'thumbnail_image']
        ] );
    }

    public function thumbnail_image( $object ) {
        $attachment_id = get_term_meta( $object['id'], 'doc_category_image-id', true );
        if ( ! $attachment_id ) {
            return;
        }

        return wp_get_attachment_url( $attachment_id );
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit