This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
define( 'ZEN_URL', path_join( WP_PLUGIN_URL, basename( dirname( __FILE__ ) ) ) );
define( 'ZEN_PATH', dirname( __FILE__ ) );
class zen {
var $options_key = 'zen';
var $themes = array(
array(
'slug' => 'zen-light',
'name' => 'Zen Light',
'thumb' => '',
'author' => '',
'credit' => '',
),
array(
'slug' => 'zen-dark',
'name' => 'Zen Dark',
'thumb' => '',
'author' => '',
'credit' => '',
),
array(
'slug' => 'zen-papyrus',
'name' => 'Zen Papyrus',
'thumb' => '',
'author' => '',
'credit' => 'Background by DevonTT (flickr)',
),
array(
'slug' => 'zen-papyrus-lite',
'name' => 'Zen Papyrus Lite',
'thumb' => '',
'author' => ' by Andrew Spittle',
'credit' => '',
),
array(
'slug' => 'zen-terminal',
'name' => 'Zen Terminal',
'thumb' => '',
'author' => ' by Andrew Spittle',
'credit' => '',
),
array(
'slug' => 'zen-sunset',
'name' => 'Zen Sunset',
'thumb' => '',
'author' => '',
'credit' => 'Background by elkit (flickr)',
),
array(
'slug' => 'zen-sky',
'name' => 'Zen Sea & Sky',
'thumb' => '',
'author' => '',
'credit' => 'Background by stevekrh19 (sxc.hu)',
),
array(
'slug' => 'zen-foiled',
'name' => 'Zen Foiled Again',
'thumb' => '',
'author' => '',
'credit' => 'Background by asolario (sxc.hu)',
)
);
function __construct() {
add_action('admin_enqueue_scripts', array(&$this, 'admin_scripts'));
add_action('admin_print_styles', array(&$this, 'admin_styles'));
add_action('personal_options_update', array(&$this, 'update_user_profile'));
add_action('profile_personal_options', array(&$this, 'show_user_profile_options'));
add_action('save_post', array(&$this, 'update_active_theme'));
}
function show_user_profile_options( ) {
global $user_id, $profileuser;
if( current_user_can('edit_posts') ) :
$user_options = $this->get_user_options($user_id);
$themes = $this->get_themes();
?>