HEX
Server: Apache
System: Linux cpanelx.inxs.ro 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: crowdandsafety (1041)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/cornerstone/includes/views/partials/dropdown.php
<?php

// =============================================================================
// VIEWS/PARTIALS/DROPDOWN.PHP
// -----------------------------------------------------------------------------
// Dropdown partial.
// =============================================================================

$_region              = ( isset( $_region )                               ) ? $_region              : '';
$classes              = ( isset( $classes )                               ) ? $classes              : [];
$atts                 = ( isset( $atts )                                  ) ? $atts                 : [];
$dropdown_custom_atts = ( isset( $dropdown_custom_atts )                  ) ? $dropdown_custom_atts : null;
$tag                  = ( isset( $dropdown_tag ) && $dropdown_tag         ) ? $dropdown_tag         : 'div';

// Dropdown hover converted to object
// passed directly to stem.js hoverintent
$hoverintent = cs_split_to_object($_view_data, 'dropdown_hover');
$hoverintent = json_encode($hoverintent);

// Prepare Atts
// ------------

$atts = array_merge([
  'id'                => ( isset( $id ) && ! empty( $id ) ) ? $id . '-dropdown' : $toggleable_id . '-dropdown',
  'class'             => array_merge( [ 'x-dropdown' ], $classes ),
  'data-x-stem'       => NULL,
  'data-x-stem-root'  => NULL,
  'data-x-toggleable' => $toggleable_id,
  'data-x-hoverintent' => $hoverintent,
  'aria-hidden'       => 'true',
], $atts);

if ( isset( $style ) && ! empty( $style ) ) {
  $atts['style'] = $style;
}

if ( $_region === 'left' ) {
  $atts['data-x-stem-root'] = 'h';
}

if ( $_region === 'right' ) {
  $atts['data-x-stem-root'] = 'rh';
}

if (!empty($dropdown_position)) {
  $atts['data-x-stem'] = $dropdown_position;
  $atts['data-x-stem-force'] = $dropdown_position;
}

// RVT reset dynamic rendering
if (!empty($dropdown_content_dynamic_rendering)) {
  $atts['data-rvt-offscreen-reset'] = '';
}

// ESC key close
if (!empty($dropdown_esc_key_close)) {
  $atts['data-x-esc-close'] = '';
}

// Direct close
if (!empty($dropdown_direct_close)) {
  $atts['data-x-dropdown-direct-close'] = '';
}

// Output
// ------

echo cs_tag( $tag, $atts, $dropdown_custom_atts, $dropdown_content);