HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/testingff/public_html/fdfctr/wp-content/plugins/iks-menu/includes/Widget.php
<?php
/**
 * Iks Menu
 *
 *
 * @package   Iks Menu
 * @author    IksStudio
 * @license   GPL-3.0
 * @link      https://iks-menu.ru
 * @copyright 2019 IksStudio
 */

namespace IksStudio\IKSM;

use IksStudio\IKSM_CORE\Plugin;
use IksStudio\IKSM_CORE\render\StylesRenderer;
use IksStudio\IKSM_CORE\utils\PluginPostManager;
use IksStudio\IKSM_CORE\utils\Utils;
use IksStudio\IKSM_CORE\Widget_Base;
use IksStudio\IKSM\render\MenuRenderer;

/**
 * @subpackage Widget
 */
class Widget extends Widget_Base {

	/**
	 * Initialize the widget
	 *
	 * @since 1.0.0
	 */
	public function __construct() {
		parent::__construct( Utils::t( "Accordion menu with terms from any taxonomy or custom menu" ) );
	}


	/**
	 * Main render function of the widget
	 *
	 * @param array $args
	 * @param array $instance
	 */
	public function widget( $args, $instance ) {
		$output  = '';
		$post_id = (int) Utils::get( $instance, "id" );

		/*
		 * Render
		 */

		$post_manager  = new PluginPostManager( $post_id );
		$post_settings = $post_manager->get_settings();
		$renderer      = new MenuRenderer( $post_settings, $post_id );
		$output        .= $renderer->render();

		/*
		 * Styles
		 */
		$settings = Plugin::$SettingsStore->get_settings();
		echo ( new StylesRenderer( $post_settings, $post_id ) )->render( $settings );

		/*
		 * Widget output
		 */
		$this->render_widget_before( $args, $instance );
		echo $output;
		$this->render_widget_after( $args, $instance );
	}

}