private function setup_skin_data() { // skin list and check if class exists $skins = thesis_skins::get_items(); if (!isset($skins[$this->class]) && !empty($skins[$this->class]['folder'])) { wp_die(__('Could not find the specified skin.', 'thesis')); } else { $this->skin->feedback(__('Setting up skin.', 'thesis')); } $this->skin_data = $skins[$this->class]; }
public function admin_footer($complete = true) { global $thesis; $iframe = "#thesis_upload_iframe_{$this->args_t['prefix']}"; $div = empty($GLOBALS['thesis_object_upload_fail']) ? "'#{$this->args_t['folder']}_{$this->item_headers['class']}'" : 'false'; if ($this->args_t['folder'] == 'skin') { $item = empty($GLOBALS['thesis_object_upload_fail']) ? thesis_skins::item_info($this->item_headers) : ''; $js = 'skins'; $selector = '#installed_skins'; } elseif ($this->args_t['folder'] == 'package') { $item = empty($GLOBALS['thesis_object_upload_fail']) ? thesis_user_packages::item_info($this->item_headers) : ''; $js = 'objects'; $selector = '.object_list'; } elseif ($this->args_t['folder'] == 'box') { $item = empty($GLOBALS['thesis_object_upload_fail']) ? thesis_user_boxes::item_info($this->item_headers) : ''; $js = 'objects'; $selector = '.object_list'; } // final override $selector = empty($GLOBALS['thesis_object_upload_fail']) ? "'{$selector}'" : 'false'; echo "<div style=\"display:none;\">{$item}</div>", "<script type=\"text/javascript\">\n", "(function(){\n", "\tparent.thesis_{$js}.add_item('{$iframe}', {$div}, {$selector}, '", admin_url("admin-post.php?action={$this->args_t['prefix']}_window&window_nonce=" . wp_create_nonce('thesis_upload_iframe')), "');\n", "\tparent.thesis_{$js}.init();\n", "})();\n", "</script>\n"; }