<div id="cwp_container" style="display:none"> <form id="cwp_form" method="post" action="#" enctype="multipart/form-data"> <?php settings_fields(cwppos_config("menu_slug")); ?> <div id="header"> <div class="logo "> <h2> <img class="theme_options_logo" src="<?php echo plugins_url('img/logo.png', __FILE__) . ''; ?> " alt="<?php echo cwppos_config('admin_page_header'); ?> "> <?php if (!class_exists('CWP_PR_PRO_Core')) { ?> <a href="https://themeisle.com/plugins/wp-product-review-pro-add-on/" class="read_docs button" target="_blank" style="color:red;text-decoration: none;"><?php _e("Buy the PRO Add-ons Bundle", "cwppos"); ?> </a><?php } ?> <a href="https://themeisle.com/allthemes" class="read_docs button" target="_blank" style=" text-decoration: none; "><?php _e("Recommended Review Themes", "cwppos");
public function get_options_data($options = 0) { $structure = cwpposConfig::$structure; $defaults = cwppos_get_config_defaults($structure); $option = get_option(cwppos_config("menu_slug")); $options = array_merge($defaults, is_array($option) ? $option : array()); $data = array(); foreach ($structure as $k => $fields) { if ($fields['type'] == 'tab') { foreach ($fields['options'] as $r => $field) { if ($field['type'] == 'group') { foreach ($field['options'] as $m => $gfield) { if ($gfield["type"] != 'title') { $data[$gfield['id']] = array("default" => $options[$gfield['id']], "type" => $gfield['type']); } } } else { if ($field["type"] != 'title') { $data[$field['id']] = array("default" => $options[$field['id']], "type" => $field['type']); } } } } } return $data; }
public function add_color($tabid, $name, $description, $id, $class = '') { $html = ' <div class="controls ' . $class . ' "> <div class="explain">' . $name . '</div><p class="field_description">' . $description . '</p> <input type="hidden" id="' . $id . '_color" name="' . cwppos_config("menu_slug") . '[' . $id . ']" value="' . $this->options[$id] . '"/> </br> <input type="text" name="" class="subo-color-picker" id="' . $id . '_color_selector" value="' . $this->options[$id] . '" /> <br/> </div>'; $this->tabs[$tabid]["elements"][] = array("type" => "color", "html" => $html); }
function cwppos($name = '') { $op = get_option(cwppos_config("menu_slug")); if (empty($name)) { return $op; } if (isset($op[$name])) { return $op[$name]; } return null; }