Esempio n. 1
0
function epanel_head_common(){
	?>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<?php 
		/*
		 * Print the <title> tag based on what is being viewed.
		 */
		 
		echo '<title>';
		global $page, $paged;
	
		wp_title( '|', true, 'right' );
	
		// Add the blog name.
		bloginfo( 'name' );
	
		// Add the blog description for the home/front page.
		$site_description = get_bloginfo( 'description', 'display' );
		if ( $site_description && ( is_home() || is_front_page() ) )
			echo " | $site_description";
	
		// Add a page number if necessary:
		if ( $paged >= 2 || $page >= 2 )
			echo ' | ' . sprintf( __( 'Page %s', 'epanel' ), max( $paged, $page ) );
		echo '</title>';
	/*
		Meta Images
	*/
	if(epanel_option('epanel_favicon')){
		echo '<link rel="shortcut icon" href="'.epanel_option('epanel_favicon').'" type="image/x-icon" />';
	}
	if(epanel_option('epanel_touchicon')){
		echo '<link rel="apple-touch-icon" href="'.epanel_option('epanel_touchicon').'" />';
	}
	if(epanel_option('gfonts')): ?>
		<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php print_epanel_option('gfonts_families', 'molengo');?>">
	<?php endif;
	echo ( !apply_filters( 'epanel_xfn', '' ) )  ? "\r\n<link rel=\"profile\" href=\"http://gmpg.org/xfn/11\" />\r\n" : '';
	
}
Esempio n. 2
0
function build_header(){?>
			<div class='wrap'>
				<table id="optionstable"><tbody><tr><td valign="top" width="100%">
					
				  <form id="epanel-settings-form" method="post" action="options.php" class="main_settings_form">
					
						 <!-- hidden fields -->
							<?php wp_nonce_field('update-options') ?>
							<?php settings_fields(EPANEL_SETTINGS); // important! ?>
							
							<input type="hidden" name="<?php echo EPANEL_SETTINGS; ?>[theme_version]>" value="<?php echo esc_attr(epanel_option('theme_version')); ?>" />
							<input type="hidden" name="<?php echo EPANEL_SETTINGS; ?>[selectedtab]" id="selectedtab" value="<?php print_epanel_option('selectedtab', 0); ?>" />
							<input type="hidden" name="<?php echo EPANEL_SETTINGS; ?>[just_saved]" id="just_saved" value="1" />
							<input type="hidden" id="input-full-submit" name="input-full-submit" value="0" />
							
							<?php $this->_get_confirmations_and_system_checking(); ?>
							

					<?php
					
						if(isset($_COOKIE['EPANEL_WPTabCookie']))
							$selected_tab = (int) $_COOKIE['EPANEL_WPTabCookie'];
						elseif(epanel_option('selectedtab'))
							$selected_tab = epanel_option('selectedtab');
						else
							$selected_tab = 0;
				
					//echo $_COOKIE['EPANEL_WPTabCookie'];
					?>
				
						<script type="text/javascript">
								jQuery.noConflict();
								jQuery(document).ready(function($) {						
									var $myTabs = $("#tabs").tabs({ fx: { opacity: "toggle", duration: "fast" }, selected: <?php echo $selected_tab; ?>});
									
									$('#tabs').bind('tabsshow', function(event, ui) {
										
										var selectedTab = $('#tabs').tabs('option', 'selected');
										
										$("#selectedtab").val(selectedTab);
										
										$.cookie('EPANEL_WPTabCookie', selectedTab);
									});

								});
						</script>
								
								
									
									<div id="header">
									
										<h2>E-Panel Theme Configuration</h2>
									
									</div>

									<?php $theme_data = get_theme_data(TEMPLATEPATH . '/style.css'); ?>
									
									<?php if(isset($_GET['updated']) || isset($_GET['pageaction']) || isset($_GET['reset'])):?>
													
											<div id="message" class="confirmation slideup_message fade <?php if(isset($_GET['reset']) && !isset($_GET['updated'])) echo ' reset'; elseif(isset($_GET['pageaction']) && $_GET['pageaction']=='activated' && !isset($_GET['updated'])) echo ' activated'; elseif($_GET['pageaction']=='import' && !isset($_GET['updated'])) echo 'settings-import';?>" style="">
												<div class="confirmation-pad">
													<?php if(isset($_GET['updated'])) echo THEMENAME.' Settings Saved. &nbsp;<a class="sh_preview" href="'.home_url().'/" target="_blank" target-position="front">View Your Site &rarr;</a>' ;
														
														elseif(isset($_GET['pageaction']) && $_GET['pageaction']=='activated' && !isset($_GET['updated'])) echo "Congratulations! ".THEMENAME ." Has Been Successfully Activated. Remember To Check The Documentation.";
														
														elseif(isset($_GET['pageaction']) && $_GET['pageaction']=='import' && isset($_GET['imported']) && !isset($_GET['updated'])) echo "Congratulations! New settings have been successfully imported.";
														
														elseif(isset($_GET['pageaction']) && $_GET['pageaction']=='import' && isset($_GET['error']) && !isset($_GET['updated'])) echo "There was an error with import. Please make sure you are using the correct file.";
														
														elseif(isset($_GET['reset']) && isset($_GET['opt_id']) && $_GET['opt_id'] == 'resettemplates') echo "Template Configuration Restored To Default.";
														
														elseif(isset($_GET['reset']) && isset($_GET['opt_id']) && $_GET['opt_id'] == 'resetlayout') echo "Layout Dimensions Restored To Default.";
														
														elseif(isset($_GET['reset'])) echo "Settings Successfully Restored To Default Values.";
															?>
															</div>
														</div>
														
												<?php endif;?>
									
									
									
									<?php if(ini_get('safe_mode')):?>
										<div id="message" class="confirmation fade plerror">
											<div class="confirmation-pad">
												
													Your server is currently running PHP in 'Safe Mode' a deprecated security feature used by some hosts.<br/>
													This causes issues with <?php echo $theme_data['Title'];?> Theme, please contact your host to disable the Safe Mode.
											</div>
									
										</div>
									
									<?php endif;?>
									
									<?php if(floatval(phpversion()) < 5.2):?>
									<div id="message" class="confirmation plerror fade">	
										<div class="confirmation-pad">
											<div class="confirmation-head">You are using PHP version <?php echo phpversion(); ?></div>
											<div class="confirmation-subtext">
												Version 5.2 or higher is required for this theme to work correctly. Please contact your hosting provider and request an update. 
											</div>
										</div>
									</div>
									<?php endif;?>
									
									<?php if(ie_version() && ie_version() < 8):?>
									<div id="message" class="confirmation plerror fade">	
										<div class="confirmation-pad">
											<div class="confirmation-head">You are using Internet Explorer version: <?php echo ie_version();?></div>
											<div class="confirmation-subtext">
												Advanced options don't support Internet Explorer version 7 or lower. Please switch to a standards based browser that will allow you to easily configure your site (e.g. Firefox, Chrome, Safari, even IE8 or better would work).
											</div>
										</div>
									</div>
									
									<?php endif; ?>
												
									<div id="optionssubheader">
										<div class="hl"></div>
										<div class="padding fix">
											<div class="subheader_links">
												<a class="sh_preview" href="<?php echo home_url(); ?>/" target="_blank" target-position="front">View Your Website</a>
					
												<a class="sh_support" href="<?php support_url();?>" target="_blank" ><?php _e('Support', 'epanel');?></a>
												<a class="sh_version" href="<?php theme_url();?>" target="_blank" ><?php _e('Theme Version : ', 'epanel'); echo $theme_data['Version'];?></a>
											</div>

											<div class="subheader_right">

												<input class="button-primary" type="submit" name="submit" value="<?php _e('Save Theme Settings', 'epanel');?>" />
											</div>
										</div>
									</div>



									<div class="clear"></div>
								</div>
		<?php }
Esempio n. 3
0
function e_epanel($key, $alt = null, $post_id = null, $setting = null){
	print_epanel_option( $key, $alt, $post_id, $setting);
}