Sindbad~EG File Manager
<?php
namespace WP_CLI\o2switch\Services;
use WP_CLI;
class ConfigService
{
/**
* Return WordPress config data from given keys (Attention : this methods is too long because need to use other process).
* @when after_wp_load
* @param array $keys
* @return array
*/
public static function get(array $keys)
{
$configs = [];
$keys_str = "";
foreach($keys as $key){
$keys_str .= " $key";
}
$database_data = json_decode(WP_CLI::runcommand('config list ' . $keys_str . ' --format=json', [
'return' => true,
'launch' => true,
'exit_error' => false
]), true);
foreach($database_data as $elt)
{
$configs[$elt['name']] = $elt['value'];
}
return $configs;
}
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists