ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //home/u435929562/domains/tec-edu.in/public_html/wp-content/themes/lectura-lite/related-pages.php
<?php
$parent_id = $post->post_parent;

if ($parent_id == 0) {
	$child_of = $post->ID;
	$widget_title = the_title('','',false);
} // if no parent
else {
	$child_of = $parent_id;
	$widget_title = get_the_title($parent_id);
	$pagelink = get_page_link( $parent_id );
}

$children_pages = get_pages( array( 'child_of' => $child_of, 'sort_column' => 'post_title', 'sort_order' => 'ASC' ) );

if (count($children_pages) > 1) {
	echo '<div class="widget">';
	echo '<p class="title-widget title-s title-widget-blue">';
	if (isset($pagelink)) {
		echo '<a href="'.esc_url($pagelink).'">'.esc_html($widget_title).'</a>';
	} else {
		echo esc_html($widget_title);
	}
	echo '</p>';
	echo '<ul class="academia-related-pages">';
	
	foreach ($children_pages as $child_page) {
		echo'<li class="academia-related-page';
		if ($child_page->ID == $post->ID) {echo ' current-menu-item';}
		echo'"><a href="' . esc_url ( get_page_link( $child_page->ID ) ) . '">' . esc_html($child_page->post_title) . '</a></li>';
	} // foreach
	
	echo '</ul></div>';
}
wp_reset_postdata();