Beispiel #1
0
 function importWattheme()
 {
     if (isset($_POST['wat_import_theme']) && $_POST['wat_import_theme']) {
         //initialize WAT themes
         $get_wat_themes = new WPSTHEMES();
         $wat_themes = $get_wat_themes->get_wat_themes();
         $theme_selected = trim($_POST['wat_import_theme']);
         $get_wps_options_default = $this->get_wps_option_data('wat_options');
         $get_wps_options_color = unserialize(base64_decode($wat_themes[$theme_selected]));
         $wps_color_theme_data = array_merge($get_wps_options_default, $get_wps_options_color);
         $wps_color_theme_data = serialize($wps_color_theme_data);
         if ($this->is_wps_single()) {
             update_option($this->wps_options, $wps_color_theme_data);
         } else {
             update_site_option($this->wps_options, $wps_color_theme_data);
         }
     }
 }
Beispiel #2
0
<?php

$this->watOptions = TitanFramework::getInstance('wat');
$blog_email = get_option('admin_email');
$blog_from_name = get_option('blogname');
$wps_options = unserialize(get_option('wat_options'));
//get all admin users
$user_query = new WP_User_Query(array('role' => 'Administrator'));
if (!empty($user_query->results)) {
    foreach ($user_query->results as $user) {
        $admin_users[$user->ID] = $user->display_name;
    }
}
//initialize WAT themes
$get_wat_themes = new WPSTHEMES();
$wat_themes = $get_wat_themes->get_wat_themes();
$wat_color_themes = array();
foreach ($wat_themes as $wat_theme_name => $wat_theme) {
    $wat_theme_data = unserialize(base64_decode($wat_theme));
    unset($color_palette_preview);
    $color_palette_preview = '
                <div class="colors" style="float:right;display:inline-block;margin-top:-19px;margin-bottom:10px;">
                <table class="colors">
                    <tbody><tr>
                            <th>' . $wat_theme_name . '</th>
                            <td style="border:1px solid #e1e1e1;background-color: ' . $wat_theme_data['admin_bar_color'] . ' ">&nbsp;</td>
                            <td style="border:1px solid #e1e1e1;background-color: ' . $wat_theme_data['nav_wrap_color'] . '">&nbsp;</td>
                            <td style="border:1px solid #e1e1e1;background-color: ' . $wat_theme_data['active_menu_color'] . '">&nbsp;</td>
                            <td style="border:1px solid #e1e1e1;background-color: ' . $wat_theme_data['pry_button_color'] . '">&nbsp;</td>
                            <td style="border:1px solid #e1e1e1;background-color: ' . $wat_theme_data['sec_button_color'] . '">&nbsp;</td>
                            </tr>