![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /proc/self/cwd/wp-content/plugins/elementor-pro/modules/theme-builder/conditions/ |
<?php namespace ElementorPro\Modules\ThemeBuilder\Conditions; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Any_Child_Of extends Child_Of { public function get_name() { return 'any_child_of'; } public function get_label() { return esc_html__( 'Any Child Of', 'elementor-pro' ); } public function check( $args ) { if ( ! is_singular() ) { return false; } $id = (int) $args['id']; $parents = get_post_ancestors( get_the_ID() ); return ( ( 0 === $id && ! empty( $parents ) ) || in_array( $id, $parents ) ); } }