Server IP : 172.67.214.6 / Your IP : 216.73.216.84 Web Server : LiteSpeed System : Linux premium900.web-hosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : redwjova ( 1790) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/redwjova/clevorio.com/wp-content/plugins/smartmag-core/lib/admin/ |
Upload File : |
<?php class Bunyad_Admin_MetaRenderer extends Bunyad_Admin_OptionRenderer { private $prefix; public function set_prefix($prefix) { $this->prefix = $prefix; return $this; } /** * Renders a specific element adding in the default values. * * @param array $element */ public function render($element) { // Set default value if available (the known value). if (isset($this->default_values[$element['name']])) { $default = $this->default_values[$element['name']]; // Array? - possible messed up import. if (is_array($default) && isset($default[0])) { $default = $default[0]; } $element['value'] = $default; } return $this->render_element($element); } /** * Get compatible options - currently just adds prefix to name. * * @param array $options multi-dimensional array of options */ public function options($options) { $new_options = array(); foreach ($options as $key => $option) { $option['name'] = $this->prefix . $option['name']; $new_options[$key] = $option; } return $new_options; } }