HEX
Server: nginx/1.26.1
System: Linux iZrj9cbdvwu1cot8sjlyzlZ 5.10.134-15.al8.x86_64 #1 SMP Thu Jul 20 00:44:04 CST 2023 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/dewenlabels.com11/wp-content/plugins/iks-menu/includes/AdminLocal.php
<?php
/**
 * IksStudio Core
 *
 *
 * @package   IksStudio Core
 * @author    IksStudio
 * @license   GPL-3.0
 * @link      https://iks-studio.com
 * @copyright 2019 IksStudio
 */

namespace IksStudio\IKSM;

use IksStudio\IKSM_CORE\Plugin;
use IksStudio\IKSM_CORE\utils\Utils;
use IksStudio\IKSM\utils\UtilsLocal;

/**
 * @subpackage AdminLocal
 */
class AdminLocal {

	/**
	 * Instance of this class.
	 *
	 * @since    1.0.0
	 *
	 * @var      object
	 */
	protected static $instance = null;


	/**
	 * Return an instance of this class.
	 *
	 * @return    object    A single instance of this class.
	 * @since     1.0.0
	 *
	 */
	public static function get_instance() {

		// If the single instance hasn't been set, set it now.
		if ( null == self::$instance ) {
			self::$instance = new self;
			self::$instance->do_hooks();
		}

		return self::$instance;
	}


	/**
	 * Handle WP actions and filters.
	 *
	 * @since    1.0.0
	 */
	private function do_hooks() {
		add_action( 'init', array( $this, 'register_faqs' ) );
	}

	/**
	 * Register FAQs
	 * @since 1.11.0
	 */
	public function register_faqs() {
		// Register post type
		$post_name = Plugin::$name . " FAQs";
		register_post_type(
			UtilsLocal::get_faqs_type(),
			array(
				"labels"              => array(
					"name"          => $post_name,
					"singular_name" => Plugin::$name . " FAQ",
					"menu_name"     => $post_name,
					"add_new"       => Utils::t( "Add FAQ" ),
					"add_new_item"  => Utils::t( "Adding FAQ" ),
					"edit_item"     => Utils::t( "Edit FAQ" ),
					"new_item"      => Utils::t( "New FAQ" ),
					"view_item"     => Utils::t( "View FAQ" ),
				),
				"public"              => false,
				"hierarchical"        => false,
				"exclude_from_search" => true,
				"capability_type"     => "post",
				"query_var"           => false,
				"show_ui"             => true,
				"show_in_menu"        => true,
				"supports"            => [
					"title",
					"thumbnail",
					"editor",
				],
				"menu_icon"           => "dashicons-format-chat",
				"rewrite"             => false,
			)
		);

		// Register taxonomy
		$tax_name = Plugin::$name . " " . Utils::t( "FAQ Groups" );
		register_taxonomy(
			UtilsLocal::get_faqs_taxonomy_type(),
			UtilsLocal::get_faqs_type(),
			array(
				"labels"             => array(
					"name"              => $tax_name,
					"singular_name"     => Plugin::$name . " " . Utils::t( "FAQ Group" ),
					"menu_name"         => Utils::t( "Groups" ),
					"search_items"      => Utils::t( "Search Groups" ),
					"all_items"         => Utils::t( "All Groups" ),
					"view_item "        => Utils::t( "View Group" ),
					"parent_item"       => Utils::t( "Parent Group" ),
					"parent_item_colon" => Utils::t( "Parent Group:" ),
					"edit_item"         => Utils::t( "Edit Group" ),
					"update_item"       => Utils::t( "Update Group" ),
					"add_new_item"      => Utils::t( "Add New Group" ),
					"new_item_name"     => Utils::t( "New Group Name" ),
					"back_to_items"     => Utils::t( "Back to Groups" ),
				),
				"hierarchical"       => true,
				"publicly_queryable" => false,
				"rewrite"            => false,
			)
		);
	}
}