Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.16.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : Status.php
<?php

namespace WeDevs\Dokan\Admin\Status;

use Exception;
use WeDevs\Dokan\Abstracts\StatusElement;
use WeDevs\Dokan\VendorNavMenuChecker;

class Status extends StatusElement {

    protected bool $support_children = true;
    protected string $hook_key = 'dokan_status';

    public function __construct() {
        parent::__construct( 'dokan-status' );
    }

    /**
     * @inheritDoc
     */
    public function escape_data( string $data ): string {
        return $data;
    }

    public function render(): array {
        try {
            $this->describe();
        } catch ( Exception $e ) {
            dokan_log( $e->getMessage() );
        }
        return parent::render()['children'];
    }

    /**
     * Describe the settings options.
     *
     * @return void
     * @throws Exception
     */
    public function describe() {
		//        $this->add(
		//            StatusElementFactory::heading( 'main_heading' )
		//                ->set_title( __( 'Dokan Status', 'dokan-lite' ) )
		//                ->set_description( __( 'Check the status of your Dokan installation.', 'dokan-lite' ) )
		//        );

		//        $this->add(
		//            StatusElementFactory::section( 'overridden_features' )
		//                ->set_title( __( 'Overridden Templates', 'dokan-lite' ) )
		//                ->set_description( __( 'The templates currently overridden that is preventing enabling new features.', 'dokan-lite' ) )
		//                ->add(
		//                    StatusElementFactory::table( 'override_table' )
		//                        ->set_title( __( 'General Heading', 'dokan-lite' ) )
		//                        ->set_headers(
		//                            [
		//                                __( 'Template', 'dokan-lite' ),
		//                                __( 'Feature', 'dokan-lite' ),
		//                                'Action',
		//                            ]
		//                        )
		//                        ->add(
		//                            StatusElementFactory::table_row( 'override_row' )
		//                                ->add(
		//                                    StatusElementFactory::table_column( 'template' )
		//                                        ->add(
		//                                            StatusElementFactory::paragraph( 'file' )
		//                                                ->set_title( __( 'FileA.php', 'dokan-lite' ) )
		//                                        )
		//                                )
		//                                ->add(
		//                                    StatusElementFactory::table_column( 'action' )
		//                                        ->add(
		//                                            StatusElementFactory::button( 'action' )
		//                                                ->set_title( __( 'Remove', 'dokan-lite' ) )
		//                                        )
		//                                )
		//                        )
		//                )
		//        );

        do_action( 'dokan_status_after_describing_elements', $this );
    }
}
© 2025 XylotrechusZ