Advertisement
Guest User

Chuleria

a guest
Apr 5th, 2013
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.70 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Header for the template.
  4. *
  5. * @package WordPress
  6. */
  7.  
  8. if(session_id() == '')
  9. {
  10. session_start();
  11. }
  12.  
  13. $pp_theme_version = THEMEVERSION;
  14.  
  15. if ( ! isset( $content_width ) ) $content_width = 960;
  16.  
  17. ?><!DOCTYPE html>
  18. <html <?php language_attributes(); ?>>
  19. <head>
  20. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  21. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  22.  
  23. <title><?php wp_title('&lsaquo;', true, 'right'); ?><?php bloginfo('name'); ?></title>
  24. <link rel="profile" href="http://gmpg.org/xfn/11" />
  25. <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
  26. <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
  27.  
  28. <?php
  29. /**
  30. * Get favicon URL
  31. **/
  32. $pp_favicon = get_option('pp_favicon');
  33.  
  34. if(!empty($pp_favicon))
  35. {
  36. ?>
  37. <link rel="shortcut icon" href="<?php echo $pp_favicon; ?>" />
  38. <?php
  39. }
  40. ?>
  41.  
  42. <!-- Template stylesheet -->
  43. <?php
  44. wp_enqueue_style("jqueryui_css", get_stylesheet_directory_uri()."/css/jqueryui/custom.css", false, $pp_theme_version, "all");
  45. wp_enqueue_style("screen_css", get_stylesheet_directory_uri()."/css/screen.css", false, $pp_theme_version, "all");
  46. wp_enqueue_style("tipsy_css", get_stylesheet_directory_uri()."/css/tipsy.css", false, $pp_theme_version, "all");
  47. wp_enqueue_style("fancybox_css", get_stylesheet_directory_uri()."/js/fancybox/jquery.fancybox.css", false, $pp_theme_version, "all");
  48. wp_enqueue_style("flexslider_css", get_stylesheet_directory_uri()."/js/flexslider/flexslider.css", false, $pp_theme_version, "all");
  49.  
  50. $pp_advance_enable_responsive = get_option('pp_advance_enable_responsive');
  51.  
  52. if(!empty($pp_advance_enable_responsive))
  53. {
  54. wp_enqueue_style("grid_css", get_stylesheet_directory_uri()."/css/grid.css", false, $pp_theme_version, "all");
  55. }
  56.  
  57. if(isset($_SESSION['pp_slider_style']))
  58. {
  59. $pp_slider_style = $_SESSION['pp_slider_style'];
  60. }
  61. else
  62. {
  63. $pp_slider_style = get_option('pp_slider_style');
  64. }
  65.  
  66. if($pp_slider_style=='full')
  67. {
  68. wp_enqueue_style("pp_slider_style", get_stylesheet_directory_uri()."/css/fullslide.css", false, $pp_theme_version, "all");
  69. }
  70. wp_enqueue_style("colorpicker.css", get_stylesheet_directory_uri()."/js/colorpicker/css/colorpicker.css", false, $pp_theme_version, "all");
  71.  
  72.  
  73. //Get Google Webfont
  74. if(isset($_SESSION['pp_font']))
  75. {
  76. $pp_font = $_SESSION['pp_font'];
  77. }
  78. else
  79. {
  80. $pp_font = get_option('pp_font');
  81. }
  82.  
  83. if(!empty($pp_font))
  84. {
  85. wp_enqueue_style('google_fonts', "http://fonts.googleapis.com/css?family=".$pp_font."&subset=latin,cyrillic", false, "", "all");
  86. }
  87. else
  88. {
  89. wp_enqueue_style('google_fonts', get_stylesheet_directory_uri()."/css/gfont.css", false, "", "all");
  90. }
  91. ?>
  92.  
  93. <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
  94.  
  95. <?php
  96. wp_enqueue_script("jquery", get_stylesheet_directory_uri()."/js/jquery.js", false, $pp_theme_version);
  97. wp_enqueue_script("jQuery_UI_js", get_stylesheet_directory_uri()."/js/jquery-ui.js", false, $pp_theme_version);
  98. wp_enqueue_script("swfobject.js", get_stylesheet_directory_uri()."/swfobject/swfobject.js", false, $pp_theme_version);
  99. wp_enqueue_script("colorpicker.js", get_stylesheet_directory_uri()."/js/colorpicker.js", false, $pp_theme_version);
  100. wp_enqueue_script("eye.js", get_stylesheet_directory_uri()."/js/eye.js", false, $pp_theme_version);
  101. wp_enqueue_script("utils.js", get_stylesheet_directory_uri()."/js/utils.js", false, $pp_theme_version);
  102. wp_enqueue_script("fancybox_js", get_stylesheet_directory_uri()."/js/fancybox/jquery.fancybox.pack.js", false, $pp_theme_version);
  103. wp_enqueue_script("jQuery_easing", get_stylesheet_directory_uri()."/js/jquery.easing.js", false, $pp_theme_version);
  104. wp_enqueue_script("jQuery_hint", get_stylesheet_directory_uri()."/js/hint.js", false, $pp_theme_version);
  105. wp_enqueue_script("jQuery_validate", get_stylesheet_directory_uri()."/js/jquery.validate.js", false, $pp_theme_version);
  106. wp_enqueue_script("jQuery_tipsy", get_stylesheet_directory_uri()."/js/jquery.tipsy.js", false, $pp_theme_version);
  107. wp_enqueue_script("reflection_js", get_stylesheet_directory_uri()."/js/reflection.js", false, $pp_theme_version);
  108. wp_enqueue_script("browser_js", get_stylesheet_directory_uri()."/js/browser.js", false, $pp_theme_version);
  109. wp_enqueue_script("flexslider_js", get_stylesheet_directory_uri()."/js/flexslider/jquery.flexslider-min.js", false, $pp_theme_version);
  110. wp_enqueue_script("marquee_js", get_stylesheet_directory_uri()."/js/jquery.marquee.js", false, $pp_theme_version);
  111. wp_enqueue_script("jwplayer_js", get_stylesheet_directory_uri()."/js/jwplayer.js", false, $pp_theme_version);
  112. wp_enqueue_script("jquery.isotope.js", get_stylesheet_directory_uri()."/js/jquery.isotope.js", false, $pp_theme_version);
  113. wp_enqueue_script("gmap_js", get_stylesheet_directory_uri()."/js/gmap.js", false, $pp_theme_version);
  114. wp_enqueue_script("custom_js", get_stylesheet_directory_uri()."/js/custom.js", false, $pp_theme_version);
  115.  
  116. /* Always have wp_head() just before the closing </head>
  117. * tag of your theme, or you will break many plugins, which
  118. * generally use this hook to add elements to <head> such
  119. * as styles, scripts, and meta tags.
  120. */
  121. wp_head();
  122. ?>
  123.  
  124. <!--[if IE]>
  125. <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/ie.css" type="text/css" media="all"/>
  126. <![endif]-->
  127.  
  128. <style type="text/css">
  129. <?php
  130. if(isset($_SESSION['pp_skin']))
  131. {
  132. $pp_skin = $_SESSION['pp_skin'];
  133. }
  134. else
  135. {
  136. $pp_skin = get_option('pp_skin');
  137. }
  138.  
  139. if(!empty($pp_skin))
  140. {
  141. ?>
  142. h2.breaking, .flex-control-nav li a:hover, .flex-control-nav li a.active, .post_comment_number, .post_comment_number:hover, .post_comment_number:active, .pagination span.current, .pagination a:hover, input[type=submit], input[type=button], a.button, a.button:hover, a.button:active, .readmore, .widget_tag_cloud div a:hover, .meta-tags a:hover, #footer .widget_tag_cloud div a:hover, #footer .meta-tags a:hover, .main_nav ul li a:hover, .main_nav li a:hover, .main_nav ul li a.hover, .main_nav li a.hover, .main_nav ul li a:active, .main_nav li a:active, .main_nav li.current-menu-item a, .rev_title
  143. {
  144. background: <?php echo $pp_skin; ?>;
  145. }
  146. #footer a:hover, #footer a:active, a:hover, a:active, ul.twitter li a
  147. {
  148. color: <?php echo $pp_skin; ?>;
  149. }
  150. #slider_wrapper
  151. {
  152. border-top: 5px solid <?php echo $pp_skin; ?>;
  153. }
  154. <?php
  155. }
  156.  
  157. ?>
  158. <?php
  159. if(isset($_SESSION['pp_content_bg_img']))
  160. {
  161. $pp_content_bg_img = $_SESSION['pp_content_bg_img'];
  162. }
  163. else
  164. {
  165. $pp_content_bg_img = get_option('pp_content_bg_img');
  166. }
  167.  
  168. if(!empty($pp_content_bg_img))
  169. {
  170. if($pp_content_bg_img == 1)
  171. {
  172. ?>
  173. body { background: #fff; }
  174. <?php
  175. }
  176. else
  177. {
  178. ?>
  179. body { background: url(<?php echo get_stylesheet_directory_uri(); ?>/images/patterns/<?php echo $pp_content_bg_img; ?>) repeat top left;}
  180. <?php
  181. }
  182. }
  183. ?>
  184.  
  185. <?php
  186. if(isset($_SESSION['pp_font_family']))
  187. {
  188. $pp_font_family = $_SESSION['pp_font_family'];
  189. }
  190. else
  191. {
  192. $pp_font_family = get_option('pp_font_family');
  193. }
  194.  
  195. if(!empty($pp_font_family))
  196. {
  197. ?>
  198. h1, h2, h3, h4, h5, h6, input[type=submit], input[type=button], a.button, a.button:hover, a.button:active, .btn2 a, .btn2 a:hover, button, button:hover, strong.title, a.post_title, #top_menu li, .main_nav ul li a, .main_nav li a, .breaking_new p a, .post_comment_number, .post_comment_number:hover, .post_comment_number:active, .readmore, .caption_cat, .post_img .caption_cat, #content_wrapper .sidebar .content .sidebar_widget li h2.widgettitle, h2.widgettitle, .pagination a, .pagination a:active, .pagination a.active, .pagination span.current, .styled_box_title, table tr th { font-family: '<?php echo $pp_font_family; ?>'; }
  199. <?php
  200. }
  201. ?>
  202.  
  203. <?php
  204. if(pp_is_plugin_active('wereviews/wereviews.php'))
  205. {
  206. ?>
  207. .breaking_new { margin-top: 15px; }
  208. <?php
  209. }
  210. ?>
  211. </style>
  212.  
  213. <?php
  214. /**
  215. * Get custom CSS
  216. **/
  217. $pp_custom_css = get_option('pp_custom_css');
  218.  
  219.  
  220. if(!empty($pp_custom_css))
  221. {
  222. echo '<style>';
  223. echo stripslashes($pp_custom_css);
  224. echo '</style>';
  225. }
  226. ?>
  227.  
  228. </head>
  229.  
  230. <?php
  231.  
  232. /**
  233. * Get Current page object
  234. **/
  235. $page = get_page($post->ID);
  236.  
  237.  
  238. /**
  239. * Get current page id
  240. **/
  241. $current_page_id = '';
  242.  
  243. if(isset($page->ID))
  244. {
  245. $current_page_id = $page->ID;
  246. }
  247.  
  248. $pp_homepage_slider_trans = get_option('pp_homepage_slider_trans');
  249. if(empty($pp_homepage_slider_trans))
  250. {
  251. $pp_homepage_slider_trans = 'fade';
  252. }
  253.  
  254. ?>
  255.  
  256. <body <?php body_class(); ?>>
  257.  
  258. <input type="hidden" id="pp_homepage_slider_trans" name="pp_homepage_slider_trans" value="<?php echo $pp_homepage_slider_trans; ?>"/>
  259. <input type="hidden" id="pp_homepage_url" name="pp_homepage_url" value="<?php echo home_url(); ?>"/>
  260.  
  261. <!-- Begin template wrapper -->
  262. <div id="wrapper">
  263.  
  264. <!-- Begin header -->
  265. <div id="header_wrapper">
  266.  
  267.  
  268. <div class="standard_wrapper">
  269. <?php
  270. if ( has_nav_menu( 'main-menu' ) )
  271. {
  272. //Get page nav
  273. wp_nav_menu(
  274. array(
  275. 'menu_id' => 'main_menu',
  276. 'menu_class' => 'main_nav',
  277. 'theme_location' => 'main-menu',
  278. )
  279. );
  280. }
  281. else
  282. {
  283. echo '<div class="mainmenu notice">Please setup Wordpress Dashboard > Appearance > Menus</div>';
  284. }
  285. ?>
  286.  
  287. <div id="menu_border_wrapper"></div>
  288. <div class="social_wrapper">
  289. <ul>
  290. <?php
  291. $pp_facebook_username = get_option('pp_facebook_username');
  292.  
  293. if(!empty($pp_facebook_username))
  294. {
  295. ?>
  296. <li><a target="_blank" href="http://facebook.com/<?php echo $pp_facebook_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/facebook.png" alt=""/></a></li>
  297. <?php
  298. }
  299. ?>
  300. <?php
  301. $pp_twitter_username = get_option('pp_twitter_username');
  302.  
  303. if(!empty($pp_twitter_username))
  304. {
  305. ?>
  306. <li><a target="_blank" href="http://twitter.com/<?php echo $pp_twitter_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/twitter.png" alt=""/></a></li>
  307. <?php
  308. }
  309. ?>
  310. <?php
  311. $pp_flickr_username = get_option('pp_flickr_username');
  312.  
  313. if(!empty($pp_flickr_username))
  314. {
  315. ?>
  316. <li><a target="_blank" title="Flickr" href="http://flickr.com/people/<?php echo $pp_flickr_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/flickr.png" alt=""/></a></li>
  317. <?php
  318. }
  319. ?>
  320. <?php
  321. $pp_youtube_username = get_option('pp_youtube_username');
  322.  
  323. if(!empty($pp_youtube_username))
  324. {
  325. ?>
  326. <li><a target="_blank" title="Youtube" href="http://youtube.com/user/<?php echo $pp_youtube_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/youtube.png" alt=""/></a></li>
  327. <?php
  328. }
  329. ?>
  330. <?php
  331. $pp_vimeo_username = get_option('pp_vimeo_username');
  332.  
  333. if(!empty($pp_vimeo_username))
  334. {
  335. ?>
  336. <li><a target="_blank" title="Vimeo" href="http://vimeo.com/<?php echo $pp_vimeo_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/vimeo.png" alt=""/></a></li>
  337. <?php
  338. }
  339. ?>
  340. <?php
  341. $pp_tumblr_username = get_option('pp_tumblr_username');
  342.  
  343. if(!empty($pp_tumblr_username))
  344. {
  345. ?>
  346. <li><a target="_blank" title="Tumblr" href="http://<?php echo $pp_tumblr_username; ?>.tumblr.com"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/tumblr.png" alt=""/></a></li>
  347. <?php
  348. }
  349. ?>
  350. <?php
  351. $pp_google_username = get_option('pp_google_username');
  352.  
  353. if(!empty($pp_google_username))
  354. {
  355. ?>
  356. <li><a target="_blank" title="Google+" href="<?php echo $pp_google_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/google.png" alt=""/></a></li>
  357. <?php
  358. }
  359. ?>
  360. <?php
  361. $pp_dribbble_username = get_option('pp_dribbble_username');
  362.  
  363. if(!empty($pp_dribbble_username))
  364. {
  365. ?>
  366. <li><a target="_blank" title="Dribbble" href="http://dribbble.com/<?php echo $pp_dribbble_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/dribbble.png" alt=""/></a></li>
  367. <?php
  368. }
  369. ?>
  370. <?php
  371. $pp_digg_username = get_option('pp_digg_username');
  372.  
  373. if(!empty($pp_digg_username))
  374. {
  375. ?>
  376. <li><a target="_blank" title="Digg" href="http://digg.com/<?php echo $pp_digg_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/digg.png" alt=""/></a></li>
  377. <?php
  378. }
  379. ?>
  380. <?php
  381. $pp_linkedin_username = get_option('pp_linkedin_username');
  382.  
  383. if(!empty($pp_linkedin_username))
  384. {
  385. ?>
  386. <li><a target="_blank" title="Linkedin" href="<?php echo $pp_linkedin_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/linkedin.png" alt=""/></a></li>
  387. <?php
  388. }
  389. ?>
  390. <?php
  391. $pp_pinterest_username = get_option('pp_pinterest_username');
  392.  
  393. if(!empty($pp_pinterest_username))
  394. {
  395. ?>
  396. <li><a target="_blank" title="Pinterest" href="http://pinterest.com/<?php echo $pp_pinterest_username; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/pinterest.png" alt=""/></a></li>
  397. <?php
  398. }
  399. ?>
  400. <?php
  401. $pp_feedburner_id = get_option('pp_feedburner_id');
  402.  
  403. if(!empty($pp_feedburner_id))
  404. {
  405. ?>
  406. <li><a target="_blank" href="<?php echo $pp_feedburner_id; ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/rss.png" alt=""/></a></li>
  407. <?php
  408. }
  409. ?>
  410. </ul>
  411. </div>
  412. </div>
  413. </div>
  414. <!-- End header -->
  415.  
  416. <br class="clear"/>
  417.  
  418. <?php
  419. $pp_advance_enable_switcher = get_option('pp_advance_enable_switcher');
  420.  
  421. if(!empty($pp_advance_enable_switcher))
  422. {
  423. $bg_patterns_arr = array(
  424. 'furley_bg.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/furley_bg.png) repeat;" class="pp_checkbox_wrapper"></div>',
  425. 'subtlenet2.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/subtlenet2.png) repeat;" class="pp_checkbox_wrapper"></div>',
  426. 'crisp_paper_ruffles.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/crisp_paper_ruffles.png) repeat;" class="pp_checkbox_wrapper"></div>',
  427. 'lil_fiber.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/lil_fiber.png) repeat;" class="pp_checkbox_wrapper"></div>',
  428. 'tex2res3.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/tex2res3.png) repeat;" class="pp_checkbox_wrapper"></div>',
  429. 'arches.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/arches.png) repeat;" class="pp_checkbox_wrapper"></div>',
  430. 'hexellence.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/hexellence.png) repeat;" class="pp_checkbox_wrapper"></div>',
  431. 'frenchstucco.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/frenchstucco.png) repeat;" class="pp_checkbox_wrapper"></div>',
  432. 'gradient_squares.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/gradient_squares.png) repeat;" class="pp_checkbox_wrapper"></div>',
  433. 'diagonal_striped_brick.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/diagonal_striped_brick.png) repeat;" class="pp_checkbox_wrapper"></div>',
  434. 'foggy_birds.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/foggy_birds.png) repeat;" class="pp_checkbox_wrapper"></div>',
  435. 'xv.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/xv.png) repeat;" class="pp_checkbox_wrapper"></div>',
  436. 'square_bg.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/square_bg.png) repeat;" class="pp_checkbox_wrapper"></div>',
  437. 'project_papper.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/project_papper.png) repeat;" class="pp_checkbox_wrapper"></div>',
  438. 'brushed_alu.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/brushed_alu.png) repeat;" class="pp_checkbox_wrapper"></div>',
  439. 'stacked_circles.png' => '<div style="float:left;width:41px;height:41px;margin:0 5px 5px 0;float:left;border:1px solid #ebebeb;background:url('.get_stylesheet_directory_uri().'/images/patterns/stacked_circles.png) repeat;" class="pp_checkbox_wrapper"></div>',
  440.  
  441. );
  442. ?>
  443. <form action="<?php echo get_stylesheet_directory_uri(); ?>/switcher.php" method="get" id="form_option" name="form_option">
  444. <div id="option_wrapper">
  445. <div class="inner">
  446. <h4 style="color:#000">Options Panel</h4><hr/><br/>
  447.  
  448. Which homepage style you want to used?<br/><br/>
  449. <select id="pp_slider_style" name="pp_slider_style">
  450. <option value="full" <?php if($_SESSION['pp_slider_style']=='full') { echo 'selected'; } ?>>Fullwidth Slider</option>
  451. <option value="small" <?php if($_SESSION['pp_slider_style']=='small') { echo 'selected'; } ?>>Slider with sidebar</option>
  452. <option value="mansory" <?php if($_SESSION['pp_slider_style']=='mansory') { echo 'selected'; } ?>>Fullwidth Mansory</option>
  453. </select>
  454.  
  455. <br class="clear"/><br/>
  456.  
  457. Which background patterns you want to used? (You can upload own background image)<br/><br/>
  458. <?php
  459. foreach($bg_patterns_arr as $key => $bg_pattern)
  460. {
  461. ?>
  462.  
  463. <a href="<?php echo get_stylesheet_directory_uri(); ?>/switcher.php?pp_content_bg_img=<?php echo $key; ?>"><?php echo $bg_pattern; ?></a>
  464.  
  465. <?php
  466. }
  467. ?>
  468. <br class="clear"/><br/>
  469.  
  470. <?php
  471. // Get Google font list
  472. $pp_font_arr = array();
  473. $font_cache_path = get_template_directory().'/cache/gg_fonts.cache';
  474.  
  475. if(file_exists($font_cache_path))
  476. {
  477. $file = file_get_contents($font_cache_path, true);
  478. $pp_font_arr = unserialize($file);
  479. }
  480.  
  481. if(isset($_SESSION['pp_font_family']))
  482. {
  483. $pp_font_family = $_SESSION['pp_font_family'];
  484. }
  485. else
  486. {
  487. $pp_font_family = get_option('pp_font_family');
  488. }
  489.  
  490. ?>
  491. Which header font style you want to used?<br/>
  492. <select name="pp_font" id="pp_font">
  493. <option value="" data-family="">--- Theme Default Font ---</option>
  494. <?php
  495. foreach ($pp_font_arr as $key => $option) {
  496. ?>
  497. <option <?php if($option['css-name']==$pp_font) { echo 'selected="selected"'; } ?> value="<?php echo $option['css-name']; ?>" data-family="<?php echo $option['font-name']; ?>"><?php echo $option['font-name']; ?></option>
  498. <?php } ?>
  499. </select>
  500. <input type="hidden" id="pp_font_family" name="pp_font_family" value="<?php echo $pp_font_family; ?>"/>
  501. <br class="clear"/><br/>
  502.  
  503. Which skin color you want to used?<br/>
  504. <div id="pp_skin_preview" class="colorpicker_preview" style="background:<?php echo $pp_skin; ?>;margin-top:5px">&nbsp;</div>
  505. <input type="hidden" id="pp_skin" name="pp_skin" value="<?php echo $pp_skin; ?>" />
  506.  
  507. <br/><br/>
  508. <a class="button" href="<?php echo get_stylesheet_directory_uri(); ?>/switcher.php?reset=1" style="width:54px">Reset</a>
  509. </div>
  510. </div>
  511. <div id="option_btn">
  512. <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/color.png" alt=""/>
  513. </div>
  514. </form>
  515. <?php
  516. }
  517. ?>
  518.  
  519. <div id="boxed_wrapper">
  520. <div class="logo">
  521. <!-- Begin logo -->
  522.  
  523. <?php
  524. //get custom logo
  525. $pp_logo = get_option('pp_logo');
  526.  
  527. if(empty($pp_logo))
  528. {
  529. $pp_logo = get_stylesheet_directory_uri().'/images/logo.png';
  530. }
  531.  
  532. ?>
  533.  
  534. <a id="custom_logo" href="<?php echo home_url(); ?>"><img src="<?php echo $pp_logo?>" alt=""/></a>
  535. <?php
  536. $site_tagline = get_bloginfo('description');
  537. if(!empty($site_tagline))
  538. {
  539. ?>
  540. <div class="logo_tagline"><?php echo $site_tagline; ?></div>
  541. <?php
  542. }
  543. ?>
  544.  
  545. <!-- End logo -->
  546. </div>
  547. <div class="header_ads">
  548. <?php
  549. $pp_top_banner = get_option('pp_top_banner');
  550.  
  551. if(!empty($pp_top_banner))
  552. {
  553. echo stripslashes($pp_top_banner);
  554. }
  555. ?>
  556. </div>
  557.  
  558. <br class="clear"/>
  559.  
  560. <?php
  561. $pp_enable_breaking = get_option('pp_enable_breaking');
  562.  
  563. if(!empty($pp_enable_breaking))
  564. {
  565. // Get featured posts
  566. $pp_breaking_cat = get_option('pp_breaking_cat');
  567. $pp_breaking_items = get_option('pp_breaking_items');
  568. if(empty($pp_breaking_items))
  569. {
  570. $pp_breaking_items = 5;
  571. }
  572. $breaking_posts_arr = get_posts('numberposts='.$pp_breaking_items.'&order=DESC&orderby=date&category='.$pp_breaking_cat);
  573.  
  574. if(!empty($breaking_posts_arr) && !empty($breaking_posts_arr))
  575. {
  576. ?>
  577. <div id="breaking_wrapper">
  578. <h2 class="breaking"><?php _e( 'Breaking', THEMEDOMAIN ); ?></h2>
  579. <div class="breaking_new">
  580. <div class="marquee">
  581. <?php
  582. foreach($breaking_posts_arr as $key => $breaking_post)
  583. {
  584. $hyperlink_url = get_permalink($breaking_post->ID);
  585. ?>
  586. <p><a href="<?php echo $hyperlink_url;?>"><?php echo $breaking_post->post_title; ?></a></p>
  587. <?php
  588. }
  589. ?>
  590. </div>
  591. </div>
  592. </div>
  593. <?php
  594. }
  595. }
  596. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement