GRAYBYTE WORDPRESS FILE MANAGER3907

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/nioscentre.in/wp-content/plugins/elementskit-lite/modules/header-footer/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/nioscentre.in/wp-content/plugins/elementskit-lite/modules/header-footer//cpt.php
<?php 
namespace ElementsKit_Lite\Modules\HeaderFooterBuilder;

defined( 'ABSPATH' ) || exit;

class Cpt {

	public function __construct() {
		$this->post_type(); 

		add_action( 'admin_menu', array( $this, 'cpt_menu' ) );
		add_filter( 'single_template', array( $this, 'load_canvas_template' ) );
	}

	public function post_type() {
		
		$labels = array(
			'name'               => esc_html__( 'Templates', 'elementskit-lite' ),
			'singular_name'      => esc_html__( 'Template', 'elementskit-lite' ),
			'menu_name'          => esc_html__( 'Header Footer', 'elementskit-lite' ),
			'name_admin_bar'     => esc_html__( 'Header Footer', 'elementskit-lite' ),
			'add_new'            => esc_html__( 'Add New', 'elementskit-lite' ),
			'add_new_item'       => esc_html__( 'Add New Template', 'elementskit-lite' ),
			'new_item'           => esc_html__( 'New Template', 'elementskit-lite' ),
			'edit_item'          => esc_html__( 'Edit Template', 'elementskit-lite' ),
			'view_item'          => esc_html__( 'View Template', 'elementskit-lite' ),
			'all_items'          => esc_html__( 'All Templates', 'elementskit-lite' ),
			'search_items'       => esc_html__( 'Search Templates', 'elementskit-lite' ),
			'parent_item_colon'  => esc_html__( 'Parent Templates:', 'elementskit-lite' ),
			'not_found'          => esc_html__( 'No Templates found.', 'elementskit-lite' ),
			'not_found_in_trash' => esc_html__( 'No Templates found in Trash.', 'elementskit-lite' ),
		);

		$args = array(
			'labels'              => $labels,
			'public'              => true,
			'rewrite'             => false,
			'show_ui'             => true,
			'show_in_menu'        => false,
			'show_in_nav_menus'   => false,
			'exclude_from_search' => true,
			'capability_type'     => 'page',
			'hierarchical'        => false,
			'supports'            => array( 'title', 'thumbnail', 'elementor' ),
		);

		register_post_type( 'elementskit_template', $args );
	}

	public function cpt_menu() {
		$link_our_new_cpt = 'edit.php?post_type=elementskit_template';
		add_submenu_page( 'elementskit', esc_html__( 'Header Footer', 'elementskit-lite' ), esc_html__( 'Header Footer', 'elementskit-lite' ), 'manage_options', $link_our_new_cpt );
	}

	function load_canvas_template( $single_template ) {

		global $post;

		if ( 'elementskit_template' == $post->post_type ) {

			$elementor_2_0_canvas = ELEMENTOR_PATH . '/modules/page-templates/templates/canvas.php';

			if ( file_exists( $elementor_2_0_canvas ) ) {
				return $elementor_2_0_canvas;
			} else {
				return ELEMENTOR_PATH . '/includes/page-templates/canvas.php';
			}
		}

		return $single_template;
	}
}

new Cpt();

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
June 25 2025 08:35:10
giriqfky / giriqfky
0755
assets
--
June 25 2025 08:35:10
giriqfky / giriqfky
0755
theme-hooks
--
June 25 2025 08:35:10
giriqfky / giriqfky
0755
views
--
June 25 2025 08:35:10
giriqfky / giriqfky
0755
activator.php
5.131 KB
November 28 2023 17:47:40
giriqfky / giriqfky
0644
cpt-api.php
4.113 KB
June 20 2022 12:35:04
giriqfky / giriqfky
0644
cpt-hooks.php
4.251 KB
November 28 2023 17:47:40
giriqfky / giriqfky
0644
cpt.php
2.585 KB
May 18 2022 20:49:00
giriqfky / giriqfky
0644
init.php
1.763 KB
May 18 2022 20:49:00
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF