403Webshell
Server IP : 172.67.159.97  /  Your IP : 216.73.217.154
Web Server : nginx/1.24.0
System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/rebeccaone.com/wp-content/plugins/cornerstone/includes/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/rebeccaone.com/wp-content/plugins/cornerstone/includes/functions/control-api.php
<?php


/**
 * Cut controls by their key
 */
function cs_control_cut($controls, $controlKey) {

  foreach ($controls as $key => $control) {
    // Key is this control
    if (!empty($control['key']) && $control['key'] === $controlKey) {
      // Would break using unset
      $controls[$key] = null;
      continue;
    }

    // Is group of controls
    if (!empty($control['controls'])) {
      $controls[$key]['controls'] = cs_control_cut($control['controls'], $controlKey);
    }
  }

  return $controls;
}


function cs_control_values_from_assoc($values = [], $designation = 'markup') {
  $out = [];

  foreach ($values as $key => $value) {
    if (is_array($value)) {
      $out[$key] = $value;
      continue;
    }

    $out[$key] = cs_value($value, $designation);
  }

  return $out;
}


// Gets array of values based on a key and the child elements
function cs_control_get_key_values($element, $key) {
  $out = [];

  if (empty($element['_modules'])) {
    return $out;
  }

  // Loop modules
  foreach ($element['_modules'] as $child) {
    if (isset($child[$key])) {
      $out[] = $child[$key];
    }

    if (!empty($child['_modules'])) {
      $out = array_merge($out, cs_control_get_key_values($child, $key));
    }
  }

  return $out;
}

Youez - 2016 - github.com/yon3zu
LinuXploit