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/dashboard-api.php
<?php


function cs_dashboard_register_options($config) {
  $options = cs_get_array_value($config, 'values', []);

  foreach ($options as $key => $default) {
    $options[$key] = cs_get_option($key, $default);
  }

  add_filter('cs_dashboard_values', function($values) use ($options) {
    return array_merge($values, $options);
  });

  add_action('cs_dashboard_save', function($params) use ($options) {
    foreach ($options as $key => $value) {
      // Not updating this value
      if (!isset($params[$key])) {
        continue;
      }

      update_option($key, $params[$key], true);
    }
  });
}

/**
 * Add a CS dashboard tab
 *
 * @param string $id
 * @param array $config
 * @param int $position
 */
function cs_dashboard_add_tab($id, $config, $position = -1) {
  if (!is_array($config)) {
    trigger_error('Config for cs_dashboard_add_tab not an array');
    return;
  }

  $config['value'] = $id;


  add_filter('cs_dashboard_controls', function($controls) use ($config, $position) {
    if ($position <= -1) {
      $controls[] = $config;
    } else {
      array_splice($controls, $position, 0, [$config]);
    }

    return $controls;
  });
}

Youez - 2016 - github.com/yon3zu
LinuXploit