Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Capitão D

Menu de plugin não aparece no painel

Recommended Posts

Boa tarde, pessoal

 

Estou com um problema em um site feito em wordpress há algum tempo.

Enfim, esse site foi feito por outra pessoa que não trabalha mais comigo e agora preciso de uma força pra poder atualizar.

 

O problema que estou tendo é que não consigo visualizar o menu de Plugins no painel de admin, mesmo entrando como administrador da conta.

 

Acredito que isso esteja desabilitado no functions.php, porém não estou encontrando...

 

Gostaria de saber se alguem poderia me dar uma força pra esse menu de plugin ficar habilitado novamente no painel, já que preciso mexer num plugin de smtp.

 

Bom, pessoal, agradeço a força.

Valew! :)

Compartilhar este post


Link para o post
Compartilhar em outros sites

Posta ai o o código do arquivo functions.php vamos ver onde está bloqueando esse menu, caso não seja nele, pode ser no arquivo menu.php dentro da pasta wp-admin

Compartilhar este post


Link para o post
Compartilhar em outros sites

Segue o código, Ted k'!

 

Desculpa pelo tamanho, mas peguei o codigo bruto do cara que trabalhava, veja:

 


<?php

//
//  Custom Child Theme Functions
//

// I've included a "commented out" sample function below that'll add a home link to your menu
// More ideas can be found on "A Guide To Customizing The Thematic Theme Framework" 
// http://themeshaper.com/thematic-for-wordpress/guide-customizing-thematic-theme-framework/

// Adds a home link to your menu
// http://codex.wordpress.org/Template_Tags/wp_page_menu
//function childtheme_menu_args($args) {
//    $args = array(
//        'show_home' => 'Home',
//        'sort_column' => 'menu_order',
//        'menu_class' => 'menu',
//        'echo' => true
//    );
//	return $args;
//}
//add_filter('wp_page_menu_args','childtheme_menu_args');

//  get_bloginfo('stylesheet_directory')




/*/EMPRESA LOG INI/////////////////////////////////////////////////////////////////////////////////////////////////////////////
$xfile = "D:/www/benedito/www/cms/making_log_error.txt";
$fh = fopen($xfile , "a");if($fh==false)die("unable to create file");if($error){}else{}
$dados = "CHECK 222 ".iso8601()." \r\n
postid = $postid \r\n
xkey1 = $xkey1 \r\n
xkey2 = $xkey2 \r\n
xkey4 = $xkey4 \r\n
\r\n";
//$dados .= '$e->errorMessage(): ' . $e->errorMessage()."\r\n\r\n";
fwrite($fh,$dados);
fclose($fh);
//EMPRESA LOG INI////////////////////////////////////////////////////////////////////////////////////////////////////////////*/


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
/**
* wpi_stylesheet_uri
* overwrite default theme stylesheet uri
* filter stylesheet_uri
* @see get_stylesheet_uri()
*/
function wpi_stylesheet_uri($stylesheet_uri, $stylesheet_dir_uri){

global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;	

////////////////////////////////////////////////////////////	
if($is_chrome) {
	return $stylesheet_dir_uri.'/style-chrome.css';	
}
////////////////////////////////////////////////////////////	
elseif($is_IE) {

        if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false){
		return $stylesheet_dir_uri.'/style-ie6.css';
        }else{
		return $stylesheet_dir_uri.'/style-ie7.css';
		 }

}
////////////////////////////////////////////////////////////
else{
		return $stylesheet_dir_uri.'/style.css';
}


}


add_filter('stylesheet_uri','wpi_stylesheet_uri',10,2);

//mk x fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//return;



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x fim
//remove ACTIONS nao utilizados
//ps: nao aceita is_*()
function xremove_action_func() {

//remove_action('thematic_header','thematic_brandingopen',1);
remove_action('thematic_header',  'thematic_blogtitle',3);
remove_action('thematic_header',  'thematic_blogdescription',5);
//remove_action('thematic_header' ,'thematic_brandingclose',7);
remove_action('thematic_header'   ,'thematic_access',9);

//remove nave next preview

//atencao
   remove_action('thematic_navigation_above', 'thematic_nav_above', 2);

// remove_action('thematic_navigation_below', 'thematic_nav_below', 2);






//remove info em comments sobre plugin wp-spamfree
remove_action('comment_form', 'spamfree_comment_form',10);

//remove conteudo do index
remove_action ('thematic_indexloop','thematic_index_loop');	


remove_action('thematic_singlepost', 'thematic_single_post');

remove_action('thematic_categoryloop', 'thematic_category_loop');	
remove_action('thematic_archiveloop', 'thematic_archive_loop');		
remove_action('thematic_tagloop', 'thematic_tag_loop');		

remove_action('thematic_searchloop', 'thematic_search_loop');


//remove footer	
//remove_action('thematic_footer', 'thematic_siteinfoopen', 20);
//remove_action('thematic_footer', 'thematic_siteinfo', 30);
//remove_action('thematic_footer', 'thematic_siteinfoclose', 40);


}


//remove thematic_nav_below somente de single e home
function xremove_action_singlepage_func() {

//is_home flash-main
if (is_single() || is_home() || is_page()  ) {
	remove_action('thematic_navigation_below', 'thematic_nav_below', 2);
}
}



add_action('init', 'xremove_action_func');	/**/
add_action('wp','xremove_action_singlepage_func');/**/



//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//mk 007-001n
update_option('image_default_link_type' , 'file');






//ini////////////////////
//reatach image

function upload_columns($columns) {

unset($columns['parent']);
$columns['better_parent'] = "Parent";

return $columns;

}
function media_custom_columns($column_name, $id) {

$post = get_post($id);

if($column_name != 'better_parent')
	return;

	if ( $post->post_parent > 0 ) {
		if ( get_post($post->post_parent) ) {
			$title =_draft_or_post_title($post->post_parent);
		}
		?>
		<strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title ?></a></strong>, <?php echo get_the_time(__('Y/m/d')); ?>
		<br />
		<a class="hide-if-no-js" onclick="findPosts.open('media[]','<?php echo $post->ID ?>');return false;" href="#the-list"><?php _e('Re-Attach'); ?></a></td>

		<?php
	} else {
		?>
		<?php _e('(Unattached)'); ?><br />
		<a class="hide-if-no-js" onclick="findPosts.open('media[]','<?php echo $post->ID ?>');return false;" href="#the-list"><?php _e('Attach'); ?></a>
		<?php
	}

}



//add_filter("manage_upload_columns", 'upload_columns');
//add_action("manage_media_custom_column", 'media_custom_columns', 0, 2);


//fim////////////////////








//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
// filter thematic_sidebar() 
//remove sidebar do home
function remove_sidebar() {
//is_home flash-main
if(is_page('home')){
	return false;
//is_home flash-main
}else{
	return true;
	//is_home flash-main
}

}
add_filter('thematic_sidebar', 'remove_sidebar');
//mk fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






function sghbdfankykydkyy() {

$browser = get_browser(null, true);
//print_r($browser);


echo 'browser '.$browser[browser] ."<br />";
echo 'version '.$browser[version] ."<br />";
echo 'majorver '.$browser[majorver] ."<br />";
echo 'minorver '.$browser[minorver] ."<br />";



}
//add_action('thematic_header','sghbdfankykydkyy',2);












//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//ADD FLASH-MAIN OU FLASH-MENU NO HEADER
function xthematic_header_brandin_func() {


//is_home flash-main
if(is_page('home')){
return ;

}




$xb_tag_ini = '<a href="';
$xb_tag_med = '">';
$xb_tag_fim = '</a>';
$xb_separator = '<span class="xheader_custom_separador">|</span>';



$xb1 = $xb_tag_ini.get_bloginfo('url').'/#/home'.$xb_tag_med.''.$xb_tag_fim;
$xb2 = $xb_tag_ini.get_bloginfo('url').'/#/home/conceito'.$xb_tag_med.''.$xb_tag_fim;
$xb3 = $xb_tag_ini.get_bloginfo('url').'/#/ambientes'.$xb_tag_med.''.$xb_tag_fim;
$xb4 = $xb_tag_ini.get_category_link(_get_category_ID_by_name('especialistas')).$xb_tag_med.''.$xb_tag_fim;
$xb5 = $xb_tag_ini.get_category_link(_get_category_ID_by_name('noticias')).$xb_tag_med.''.$xb_tag_fim;
$xb6 = $xb_tag_ini.get_bloginfo('url').'/#/home/atendimento'.$xb_tag_med.''.$xb_tag_fim;

//$xb_menu = $xb1.$xb2.$xb3.$xb4.$xb5.$xb6; 

//add classe hover para pagina aberta
function xis_menupage($xcount2){
//echo 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'.$xcount2.'<br />';
//echo 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'._get_category_slug().'<br />';
if( $xcount2 == 4  ){
if(  _get_category_slug() == 'especialistas' ||  _get_category_slug() == 'especialista-em-moveis'   ||  _get_category_slug() == 'especialista-em-arquitetura'  )
	return ' page_item_clone'.$xcount2;
}
else if( $xcount2 == 5 ){
	if(  _get_category_slug() == 'noticias' ||  _get_category_slug() == 'eventos'   ||  _get_category_slug() == 'imprensa' || is_date() )
	return ' page_item_clone'.$xcount2;
}

}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$xcount = 1;

$xb_menu = '
			<div id="access">
				<!--div class="skip-link"><!--a href="#content" title="CHECK 111"></a--></div-->
				<div class="menu">
					<ul class="sf-menu sf-navbar">
						<li class="page_item page_item-'.$xcount.' '.xis_menupage($xcount++).'">'.$xb1 .'</li>
						<li class="page_item page_item-'.$xcount.' '.xis_menupage($xcount++).'">'.$xb2 .'</li>
						<li class="page_item page_item-'.$xcount.' '.xis_menupage($xcount++).'">'.$xb3 .'</li>
						<li class="page_item page_item-'.$xcount.' '.xis_menupage($xcount++).'">'.$xb4 .'</li>
						<li class="page_item page_item-'.$xcount.' '.xis_menupage($xcount++).'">'.$xb5 .'</li>
						<li class="page_item page_item-'.$xcount.' '.xis_menupage($xcount++).'">'.$xb6 .'</li>
					</ul> <!-- .sf-menu -->
				</div><!-- #menu -->
			</div> <!-- #access -->
';

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////







//ini div
//$content  = '<img src="http://192.168.0.1/cliente/cms/wp-content/themes/cliente-noticias/images/twetter_icon1.png" class="ro" height="40" width="100" /><input src="http://192.168.0.1/cliente/cms/wp-content/themes/cliente-noticias/images/twetter_icon2.png" class="ro" type="image" />';

/*

$content  = '<div class="xheader_custom0" >';
//logo
$content .= '<div class="xheader_custom1" >';
$content .= '<a target="_blank" alt="www.cliente.com.br" href="http://www.cliente.com.br" ><img src="'. get_bloginfo('stylesheet_directory').'/images/header_logo_cliente.jpg" width="108" height="20" />';
$content .= '</div>';
//quebra
$content .= '<div class="xclear"></div>';
//logo ds
$content .= '<div class="xheader_custom2" >';
$content .= '<img src="'. get_bloginfo('stylesheet_directory').'/images/header_logo_cliente_ds.jpg" width="310" height="64" />';
$content .= '</div>';
//menu
$content .= '<div class="xheader_custom3" >';
$content .=  $xb_menu ;
$content .= '</div>';
//quebra
$content .= '<div class="xclear"></div>';
//logo ds
$content .= '<div  class="xheader_custom4" >';
$content .= '<img src="'. get_bloginfo('stylesheet_directory').'/images/header_tapete.jpg" width="980" height="60" />';
$content .= '</div>';
//fim div
$content .= '</div>';

*/
//[kml_flashembed wmode="transparent"  movie="'. get_bloginfo('stylesheet_directory') . '/images/cliente-header-especialistas_banner.swf" width="943" height="302" fversion="9" base="'. get_bloginfo('stylesheet_directory') . '/images/" /]
//  	<img src="'. get_bloginfo('stylesheet_directory').'/images/header_logo_cliente.jpg" width="126" height="46" />

$content  = '


<!--xbrandin_custom ini-->
<div class="xbrandin_custom0">
 <!--linha1-->
 <div class="xbrandin_custom1">

<div class="xbrandin_custom1-1">
[kml_flashembed wmode="transparent"  movie="'. get_bloginfo('stylesheet_directory') . '/images/logo-cliente.swf" width="126" height="46" fversion="9" base="'. get_bloginfo('stylesheet_directory') . '/images/" /]
</div>

 </div>
 <!--clear-->
 <div class="xclear"></div>

 <!--linha2-->
 <div class="xbrandin_custom2">
  <div class="xbrandin_custom2-1">
 		<a href="'. get_bloginfo('url') . '"><img src="'. get_bloginfo('stylesheet_directory').'/images/header_logo_cliente_ds.jpg" width="275" height="66" /></a>
  </div>
  <div class="xbrandin_custom2-2">
  '.$xb_menu.'
  </div>      
 </div>
 <!--clear-->
 <div class="xclear"></div>


 <!--linha3-->
 <div class="xbrandin_custom3">
 	<img src="'. get_bloginfo('stylesheet_directory').'/images/header_tapete.jpg" width="980" height="60" />
 </div>
 <!--clear-->
 <div class="xclear"></div>

<!--xbrandin_custom fim-->
</div>

';















echo $content ;


/*
$content = '<div id="flashmovie">';
$content .= '[kml_flashembed wmode="transparent"  movie="'. get_bloginfo('stylesheet_directory') . '/images/cliente-header-noticias.swf" width="980" height="175" fversion="9" base="'. get_bloginfo('stylesheet_directory') . '/images/" /]';
$content .= '</div>';

echo do_shortcode($content);
*/





//is_home flash-main





}
add_action('thematic_header', 'xthematic_header_brandin_func', 2);/**/

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini

function thematic_header_banner_func(){

if ( is_category('especialistas')    ) {
$content = '<div class="xespecialistas-banner">';
$content .= '[kml_flashembed wmode="transparent"  movie="'. get_bloginfo('stylesheet_directory') . '/images/cliente-header-especialistas_banner.swf" width="943" height="302" fversion="9" base="'. get_bloginfo('stylesheet_directory') . '/images/" /]';
$content .= '</div>';

echo do_shortcode($content);
}


}

add_action('thematic_header','thematic_header_banner_func',9);
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//limita o tamanho do excerpt
function xnew_excerpt_length_func($length) {

return 20;		

}
add_filter('excerpt_length', 'xnew_excerpt_length_func');/**/

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////










//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini

//func limita lenght titulo
function xthe_title_func($before = "", $after = "", $echo = true, $length = false) {
$title = get_the_title();
if ( $length && is_numeric($length) ) {
$title = substr( $title, 0, $length );
}
if ( strlen($title)> 0 ) {
$title = apply_filters('xthe_title_func', $before . $title . $after, $before, $after);
if ( $echo )
echo $title;
else
return $title;
}
}

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////














//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//filtra/comenta titulo
// Filter the page title
// located in archive.php, attachement.php, author.php, category.php, search.php, tag.php
function xthematic_page_title_func() {
	global $post;
	$content = '';


	if ( is_category() || is_date() || is_tag()  || is_search()  ) {
		return ;

	} elseif (is_attachment()) {
			$content .= '<h2 class="page-title"><a href="';
			$content .= get_permalink($post->post_parent);
			$content .= '" rev="attachment"><span class="meta-nav">« </span>';
			$content .= get_the_title($post->post_parent);
			$content .= '</a></h2>';
	} elseif (is_author()) {
			$content .= '<h1 class="page-title author">';
			$author = get_the_author();
			$content .= __('Author Archives: ', 'thematic');
			$content .= '<span>';
			$content .= $author;
			$content .= '</span></h1>';
	} elseif (is_category()) {



			$content .= '<h1 class="page-title">';
			$content .= __('Category Archives:', 'thematic');
			$content .= ' <span>';
			$content .= single_cat_title('', FALSE);
			$content .= '</span></h1>' . "\n";
			$content .= '<div class="archive-meta">';
			if ( !(''== category_description()) ) : $content .= apply_filters('archive_meta', category_description()); endif;
			$content .= '</div>';


	} elseif (is_search()) {
			$content .= '<h1 class="page-title">';
			$content .= __('Search Results for:', 'thematic');
			$content .= ' <span id="search-terms">';
			$content .= wp_specialchars(stripslashes($_GET['s']), true);
			$content .= '</span></h1>';
	} elseif (is_tag()) {
			$content .= '<h1 class="page-title">';
			$content .= __('Tag Archives:', 'thematic');
			$content .= ' <span>';
			$content .= __(thematic_tag_query());
			$content .= '</span></h1>';
	}	elseif (is_day()) {
			$content .= '<h1 class="page-title">';
			$content .= sprintf(__('Daily Archives: <span>%s</span>', 'thematic'), get_the_time(get_option('date_format')));
			$content .= '</h1>';
	} elseif (is_month()) {
			$content .= '<h1 class="page-title">';
			$content .= sprintf(__('Monthly Archives: <span>%s</span>', 'thematic'), get_the_time('F Y'));
			$content .= '</h1>';
	} elseif (is_year()) {
			$content .= '<h1 class="page-title">';
			$content .= sprintf(__('Yearly Archives: <span>%s</span>', 'thematic'), get_the_time('Y'));
			$content .= '</h1>';
	} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
			$content .= '<h1 class="page-title">';
			$content .= __('Blog Archives', 'thematic');
			$content .= '</h1>';
	}
	$content .= "\n";






	return $content;		

	//bkp echo apply_filters('thematic_page_title', $content);
}
add_action('thematic_page_title', 'xthematic_page_title_func');/**/
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////









//LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS INI


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
// The Index Loop
function xthematic_index_loop_func() {

//add flash-main
?>

<div id="flashcontent" style="width: 100%;height: auto">
	<div id="alternateContent">
		<h1>Nome do Cliente</h1>
		<h2>Index</h2>
           <ul id="sitenav">
               <li><a href="index.html">Index</a></li>
           </ul>
		<div id="copy">
			<p id="sample">Sample</p>
		</div>
	</div>
	<div id="noflash">
		<p><strong>You need to upgrade your Flash Player</strong></p>
		<p>This is replaced by the Flash content.</p>
		<p>Place your alternate content here and users without the Flash plugin or with 
		Javascript turned off will see this. Content here allows you to leave out <code>noscript</code> 
		tags. Include a link to <a href="index.html?detectflash=false">bypass the detection</a> if you wish.</p>
	</div>
</div>

<?php


return ;
/*	
global $options;
foreach ($options as $value) {
   	if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; }
   	else { $$value['id'] = get_option( $value['id'] ); }
   }

	$count = 1;// Count the number of posts so we can insert a widgetized area 
	while ( have_posts() ) : the_post() ?>

		<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
   			<?php thematic_postheader(); ?>
			<div class="entry-content">
<?php thematic_content(); ?>

			<?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
			</div>
			<?php thematic_postfooter(); ?>
		</div><!-- .post -->

			<?php comments_template();

			if ($count==$thm_insert_position) {
					get_sidebar('index-insert');
			}
			$count = $count + 1;
	endwhile;
*/		
}
//CHECK COMENTAR 2
// add_action('thematic_indexloop', 'xthematic_index_loop_func');/**/
//mk x fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
//add javascript ou css no header
//1 abilita tickbox no home
//2 add javascript focus em coments (somente se for single)
function xset_thickbox_css_func() {




?><script type="text/javascript">
// <![CDATA[

//jQuery(document).ready(function() {
//alert('CHECK 111 xadd_flash'+" <?php //echo _get_category_name(); ?>");											   
//});


// ]]>
</script><?php


//is_home flash-main
if(is_page('home')){



?>
<script type="text/javascript">
// <![CDATA[


jQuery(document).ready(function() {
//alert('CHECK 222 xadd_flash'+" <?php //echo _get_category_name(); ?>");											   
});


// ]]>
</script>


<script type="text/javascript" src="<?php echo  get_bloginfo('stylesheet_directory'); ?>/images/home_swf/js/swfaddress.js"></script>
<!--script type="text/javascript" src="js/swffit.js"></script-->
<script type="text/javascript">
// <![CDATA[
var params = {
	base: "<?php echo  get_bloginfo('stylesheet_directory'); ?>/images/home_swf/",
	quality: "high",
	scale: "noscale",
	wmode: "GPU",
	allowscriptaccess: "always",
	bgcolor: "#FFFFFF"
};
var flashvars = {
	//siteXML: "xml/site.xml"
	siteXML: "<?php echo  get_bloginfo('stylesheet_directory'); ?>/images/home_swf/xml/site.xml"
};
var attributes = {
	id: "flashcontent",
	name: "flashcontent"
};
swfobject.embedSWF("<?php echo  get_bloginfo('stylesheet_directory'); ?>/images/home_swf/main.swf", "flashcontent", "100%", "620", "9.0.124", "expressInstall.swf", flashvars, params, attributes);
	//swfobject.embedSWF("main.swf", "flashcontent", "100%", "620", "9.0.124", "expressInstall.swf", flashvars, params, attributes);
//swffit.fit("flashcontent",1440,700);
// ]]>	
</script>

<style type="text/css">
/*hide from ie on mac\*/
body{
	/*overflow:scroll;/**/
	color:#FFF;
	}

#flashcontent {
	color:#FFF;
	width: 100%;/**/
	height: 690px;/**/
}
#flashcontent a {
	color:#FFF;

}	
#header {
	 display:none;/**/
	/*background:none;/**/
	/*width: 100%;/**/
	/*height: 620px;/**/
}
#container, #main{
	padding:0;
	margin:0;
	width: 100%;/**/
	height: 690px;/**/
	/* display:none;/**/
}

#main{
	/*width:500px;/**/	
}

#xfooter1 {
	float:right;
	/*width:272px;/**/		
	/*width:272px;/**/
	/*background-color:#06F;/**/
	margin:0 128px 0 0;/**/

}


#siteinfo {
/*width:101%;	/**/
}



<?php
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;	

////////////////////////////////////////////////////////////	
if($is_IE) {
        if( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false      ){

?>
.xfooter-1-1-1 {
float: right;
margin: 0 65px 0 0;

}


.xfooter-2-1-2{
float:right;
margin: 0 65px 0 0;

}	

.xfooter-2-1b{
width:100%;	
}
<?php	


        }else  if(  strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false       ){


?>
.xfooter-1-1-1 {
float: right;
margin: 0 130px 0 0px;

}


.xfooter-2-1-2{
float:right;
margin: 0 130px 0 0px;

}	

.xfooter-2-1b{
width:100%;	
}



<?php	


	}



}
////////////////////////////////////////////////////////////	
else{
?>
.xfooter-1-1-1 {
float: right;
margin: 0 120px 0 0;

}


.xfooter-2-1-2{
float:right;
margin: 0 134px 0 0;

}	

.xfooter-2-1b{
width:100%;	
}


















<?php
	}
?>














/* end hide */
</style>

<?php


}else{

//D:\www\cliente\www\cms\wp-includes\js\thickbox	
//1 abilita tickbox no home	ini
$css = get_bloginfo('wpurl')."/wp-content/themes/cliente-noticias/thickbox2.css";
wp_enqueue_style('thickbox_css', $css, false, false, 'screen');
wp_print_styles(array('thickbox_css'));
//corrige close button e loading
echo "\n" . '<script type="text/javascript">tb_pathToImage = "' . get_option('siteurl') . '/cms/wp-includes/js/thickbox/loadingAnimation.gif";tb_closeImage = "' . get_option('siteurl') . '/cms/wp-includes/js/thickbox/tb-close.png";</script>'. "\n";
//1 abilita tickbox no home	fim
//  ../../../../wp-includes/js/thickbox/loadingAnimation.gif

//2 add javascript focus em coments
if ( is_single() &&  is_user_logged_in() ) { 

?>
<script type="text/javascript">
// <![CDATA[

/*
jQuery(document).ready(function() {

jQuery('#xsimplemodal-user-on').click(function() {
										   jQuery('#comment').focus();
//alert('1111111111111');											   
}
*/
//jQuery('#comment').focus();
//alert('1111111111111');


});

// ]]>
</script>
<?php
}//fim if ( is_user_logged_in() ) { 


}//fim if(is_home)	




}

add_action('wp_head', 'xset_thickbox_css_func');/**/
wp_enqueue_script('thickbox');/**/

//mk fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////









//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//add custom utility 
//
//The Category Loop
function xthematic_category_loop_func() {
		//	    global $id, $post;	


/////////////////////////////////////////////////////////////////
if(  is_category('noticias') ||  is_category('eventos')   ) {

	while (have_posts()) : the_post(); ?>

		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?> xlinehori-noticias2">
   			<?php thematic_postheader(); ?>
			<div class="entry-content entry-content-n-e-i">
<?php thematic_content(); ?>
<div class="xclear"></div>
			</div>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->

	<?php endwhile;

}
/////////////////////////////////////////////////////////////////
else if(   is_category('imprensa')   ) {

	while (have_posts()) : the_post(); ?>

		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?> xlinehori-noticias2">
   			<?php thematic_postheader(); ?>
			<div class="entry-content entry-content-n-e-i">
<?php //thematic_content(); ?>
<div class="xclear"></div>
			</div>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->

	<?php endwhile;

}

/////////////////////////////////////////////////////////////////	
else if(is_category('especialistas')){

	while (have_posts()) : the_post(); ?>

		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?> xlinehori-especialista2">
           	<!--div class="ximg-especialistas-category"-->

			<?php xget_especialistas_xfoto_key1( get_the_content(),$id );	 ?> <!--/div-->

   			<?php thematic_postheader(); ?>
			<span class="entry-content xentry-content-especialistas">
<?php thematic_content(); ?>
<div class="xclear"></div>
			</span>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->

	<?php endwhile;

}
/////////////////////////////////////////////////////////////////	
else if( is_category('especialista-em-arquitetura') || is_category('especialista-em-moveis') ){

	while (have_posts()) : the_post(); ?>

		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">


   			<?php thematic_postheader(); ?>
			<div class="entry-content entry-content-arquitetura-moveis">
<?php thematic_content(); ?>
<div class="xclear"></div>
			</div>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->
           <div class="xclear"></div>
           <?php xcustom_utility_func1(); ?>

 <?php //thematic_comments_template();  ?>
	<?php endwhile;

}


/////////////////////////////////////////////////////////////////	
else{

	while (have_posts()) : the_post(); ?>

		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
   			<?php thematic_postheader(); ?>
			<div class="entry-content">
<?php thematic_content(); ?>
<div class="xclear"></div>
			</div>
			<?php thematic_postfooter(); ?>
		</div><!-- .post -->

	<?php endwhile;

}
/////////////////////////////////////////////////////////////////	



}

//bkp $postfooter = '<div class="entry-utility xlinehori-especialista">';	


add_action('thematic_categoryloop', 'xthematic_category_loop_func');

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////










//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//add custom utility 
// The Single Post
function xthematic_single_post_func() { 


/////////////////////////////////////////////////////////////////////////////////////////////////////////
if( _get_category_slug() == 'especialista-em-arquitetura' ||  _get_category_slug() == 'especialista-em-moveis'   ){
?>

		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
   			<?php thematic_postheader(); ?>
			<div class="entry-content entry-content-especialista-arquitetura-moveis">
<?php thematic_content(); ?>

				<?php //wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
			</div>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->
           <div class="xclear"></div>
           <?php xcustom_utility_func1(); ?>

<?php }
/////////////////////////////////////////////////////////////////////////////////////////////////////////
else if( _get_category_slug() == 'noticias' ||  _get_category_slug() == 'eventos'   ){
?>

		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
   			<?php thematic_postheader(); ?>
			<div class="entry-content entry-content-noticias-eventos">
<?php thematic_content(); ?>

				<?php //wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
			</div>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->
           <div class="xclear"></div>
           <?php xcustom_utility_func1(); ?>

<?php }

/////////////////////////////////////////////////////////////////////////////////////////////////////////
else{ ?>



		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>">
   			<?php thematic_postheader(); ?>
			<div class="entry-content">
<?php thematic_content(); ?>

				<?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
			</div>
			<?php thematic_postfooter(); ?>
		</div><!-- .post -->



<?php
/////////////////////////////////////////////////////////////////////////////////////////////////////////
}

}
add_action('thematic_singlepost', 'xthematic_single_post_func');
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////







//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini


function xthematic_archive_loop_func() {

	while ( have_posts() ) : the_post(); ?>

		<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?> xlinehori-tags-archives">
   			<?php thematic_postheader(); ?>
			<div class="entry-content">
<?php thematic_content(); ?>

			</div>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->

	<?php endwhile;
}
add_action('thematic_archiveloop', 'xthematic_archive_loop_func');

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini

// The Tag Loop
function xthematic_tag_loop_func() {
	while (have_posts()) : the_post(); ?>

		<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class(); ?>  xlinehori-tags-archives">
   			<?php thematic_postheader(); ?>
			<div class="entry-content">
<?php thematic_content() ?>

			</div>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->

	<?php endwhile;
}
add_action('thematic_tagloop', 'xthematic_tag_loop_func');

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//muda posicao
function xthematic_postheader_func() {
   global $post;

   if ($post->post_type == 'page' || is_404()) {
	$postheader = thematic_postheader_posttitle();       
   } 
else {
	$postheader = thematic_postheader_postmeta() .thematic_postheader_posttitle() ;    
       //bkp $postheader = thematic_postheader_posttitle() . thematic_postheader_postmeta();    
   }

return $postheader;

   //bkp echo apply_filters( 'thematic_postheader', $postheader ); // Filter to override default post header

} // end thematic_postheader

add_action('thematic_postheader', 'xthematic_postheader_func');/**/

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//filtra autor e linkedit  
function xthematic_postheader_postmeta_func() {

/////////////////////////////////////////////////////////////////////////	
if (is_category('especialistas')  ){

   $postmeta = '<div class="entry-meta entry-meta-especialistas-category">';
   //$postmeta .=  _get_category_ID();
$postmeta .= '<a href="'.get_category_link( _get_category_ID() ).'">'._get_category_name().'</a>';
   $postmeta .= "</div><!-- .entry-meta -->\n";


   $postmeta .= '<div class="entry-meta entry-meta-especialistas-date">';
   $postmeta .= thematic_postmeta_entrydate();
   $postmeta .= "</div><!-- .entry-meta -->\n";

	}

/////////////////////////////////////////////////////////////////////////	
elseif ( is_category('especialista-em-arquitetura') || is_category('especialista-em-moveis') ){


   $postmeta .= '<div class="entry-meta entry-meta-especialistas-date">';
   $postmeta .= thematic_postmeta_entrydate();
   $postmeta .= "</div><!-- .entry-meta -->\n";

	}

/////////////////////////////////////////////////////////////////////////	
elseif (is_category() || is_single() || is_date() || is_tag()    || is_search()  ){
   $postmeta = '<div class="entry-meta">';
//    $postmeta .= thematic_postmeta_authorlink();
//    $postmeta .= '<span class="meta-sep meta-sep-entry-date"> | </span>';
   $postmeta .= thematic_postmeta_entrydate();

//    $postmeta .= thematic_postmeta_editlink();

   $postmeta .= "</div><!-- .entry-meta -->\n";

	}
/////////////////////////////////////////////////////////////////////////	
	else{
   $postmeta = '<div class="entry-meta">';
   $postmeta .= thematic_postmeta_authorlink();
   $postmeta .= '<span class="meta-sep meta-sep-entry-date"> | </span>';
   $postmeta .= thematic_postmeta_entrydate();

   $postmeta .= thematic_postmeta_editlink();

   $postmeta .= "</div><!-- .entry-meta -->\n";

	}
/////////////////////////////////////////////////////////////////////////	


return  $postmeta;


   //bkp return apply_filters('thematic_postheader_postmeta',$postmeta); 

} // end thematic_postheader_postmeta

add_action('thematic_postheader_postmeta', 'xthematic_postheader_postmeta_func');/**/

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////







//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//filtra data
function xthematic_postmeta_entrydate_func() {


if(is_category() || is_single() || is_date() || is_tag() || is_search()    ){
   //$entrydate = '<span class="meta-prep meta-prep-entry-date">' . __('Published: ', 'thematic') . '</span>';
   $entrydate .= '<span class="entry-date"><abbr class="published" title="';
   $entrydate .= get_the_time(thematic_time_title()) . '">';
   $entrydate .= get_the_time(thematic_time_display());
   $entrydate .= '</abbr></span>';


	}else{

   $entrydate = '<span class="meta-prep meta-prep-entry-date">' . __('Published: ', 'thematic') . '</span>';
   $entrydate .= '<span class="entry-date"><abbr class="published" title="';
   $entrydate .= get_the_time(thematic_time_title()) . '">';
   $entrydate .= get_the_time(thematic_time_display());
   $entrydate .= '</abbr></span>';

	}


return $entrydate;

   //bkp return apply_filters('thematic_post_meta_entrydate', $entrydate);

} // end thematic_postmeta_entrydate()

add_action('thematic_post_meta_entrydate', 'xthematic_postmeta_entrydate_func');/**/

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






















//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
function xcustom_utility_func1() {

global $id, $post;

$postfooter = '';	





if (thematic_postfooter_posttags()){


$postfooter .= '<div style=" width:100%;height:auto"   id="xxfooter_post_tags">

<div  style="font-family:Arial;font-size:16px;font-weight:bold;float:left;width:51px;padding:0px 0px 0 0;height:auto"  id="xxxfooter_post_get_tags">
Tags:
</div>

<div  style="float:left;width:515px;padding:0px 0px 0 0;height:auto"  id="xxfooter_post_get_tags">
'. thematic_postfooter_posttags()  .'
</div>


<div style=" clear: both" ></div>

</div>';	



}




$postfooter .= '




<div id="xfooter_post">



<div id="xfooter_post_icon"  ><span class="xfooter_post_icon_link">

';


//se usuario logado...
if ( is_user_logged_in() ) { 

//if ( is_single()   ) { 
//	$postfooter .= '<a href="#comment';	
//}else{
	$postfooter .= '<a href="'.get_permalink().'#comment';		
//	}




}
else{
//login e redirect
	$postfooter .= '<a class="simplemodal-login"  href="'.get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink();
}

	$postfooter .='"><img src="'.get_bloginfo('stylesheet_directory') .'/images/pixel_trans.gif" width="69" height="48" border="0"></a></span></div>';
	$postfooter .='<div id="xfooter_post_commets"><img src="'.get_bloginfo('stylesheet_directory') .'/images/footer_post_comments.jpg" width="157" height="48" /></div></div>';

	echo $postfooter; 
   // return $postfooter; 

} 

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

























//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//add linha  extre postos
// Information in Post Footer
function xthematic_postfooter_func() {
   global $id, $post;

   if ($post->post_type == 'page' && current_user_can('edit_posts')) { /* For logged-in "page" search results */
       $postfooter = '<div class="entry-utility">' . thematic_postfooter_posteditlink();
       $postfooter .= "</div><!-- .entry-utility -->\n";    
   } elseif ($post->post_type == 'page') { /* For logged-out "page" search results */
       $postfooter = '';
   } else {
       if (is_single()) {



		//add custom utility single
		if( _get_category_slug('especialista-em-arquitetura')  || _get_category_slug('especialista-em-moveis') || _get_category_slug('imprensa')  ){
            $postfooter = '<div class="entry-utility">' ;	






//custom utility ini

           $postfooter .= '

<div id="xfooter_post">

<div id="xfooter_post_tags">'.(thematic_postfooter_posttags()?'<img src="'.get_bloginfo('stylesheet_directory') .'/images/footer_post_tags.jpg" width="65" height="48" />':"").'
</div>

<div id="xfooter_post_get_tags">
<img src="'.get_bloginfo('stylesheet_directory') .'/images/pixel_trans.gif" width="10" height="14" border="0"><br/>
'. thematic_postfooter_posttags()  .'
</div>


';



	$postfooter .='<div id="xfooter_post_icon"  ><span class="xfooter_post_icon_link">';


//se usuario logado...
/////////////////// 333 
if ( is_user_logged_in() ) { 
	$postfooter .= '<a   href="#comment';
	//$postfooter .= '<a   href="'.get_permalink();
}
else{
	$postfooter .= '<a  class="simplemodal-login"  href="'.get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink();
}

/////////////////// 444
$postfooter .='"><img src="'.get_bloginfo('stylesheet_directory') .'/images/pixel_trans.gif" width="69" height="48" border="0"></a></span></div>';


/////////////////// 555
	$postfooter .='<div id="xfooter_post_commets"><img src="'.get_bloginfo('stylesheet_directory') .'/images/footer_post_comments.jpg" width="157" height="48" /></div></div>';








//custom utility fim



















		}else{
            $postfooter = '<div class="entry-utility">' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . thematic_postfooter_postconnect();				
		}









       } else {
		//category



/////////////////////////////////////////////////////////
if ( is_category('especialista-em-arquitetura')  || is_category('especialista-em-moveis') ) {

//add custom utility
           $postfooter = '<div class="entry-utility">';



//custom utility ini			
           $postfooter .= '

<div id="xfooter_post">

<div id="xfooter_post_tags">'.(thematic_postfooter_posttags()?'<img src="'.get_bloginfo('stylesheet_directory') .'/images/footer_post_tags.jpg" width="65" height="48" />':"").'
</div>

<div id="xfooter_post_get_tags">
<img src="'.get_bloginfo('stylesheet_directory') .'/images/pixel_trans.gif" width="10" height="14" border="0"><br/>
'. thematic_postfooter_posttags()  .'
</div>


';



	$postfooter .='<div id="xfooter_post_icon"  ><span class="xfooter_post_icon_link">';


//se usuario logado...
/////////////////// 333 
if ( is_user_logged_in() ) { 
	//$postfooter .= '<a   href="#comment';
	$postfooter .= '<a   href="'.get_permalink();
}
else{
	$postfooter .= '<a  class="simplemodal-login"  href="'.get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink();
}

/////////////////// 444
$postfooter .='"><img src="'.get_bloginfo('stylesheet_directory') .'/images/pixel_trans.gif" width="69" height="48" border="0"></a></span></div>';


/////////////////// 555
	$postfooter .='<div id="xfooter_post_commets"><img src="'.get_bloginfo('stylesheet_directory') .'/images/footer_post_comments.jpg" width="157" height="48" /></div></div>';









//custom utility fim










}

/////////////////////////////////////////////////////////
else {
           $postfooter = '<div class="entry-utility">' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . thematic_postfooter_postcomments();
}
/////////////////////////////////////////////////////////





       }
       $postfooter .= "</div><!-- .entry-utility -->\n";    
   }


    return $postfooter; // Filter to override default post footer    
   // Put it on the screen
   //bkp echo apply_filters( 'thematic_postfooter', $postfooter ); // Filter to override default post footer
} // end thematic_postfooter

//add_action('thematic_postfooter', 'xthematic_postfooter_func');

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//filtra default content full excerpt
function xthematic_content_func($content) {

if ( is_category('noticias') || is_category('eventos')  || is_category('especialistas') || is_search()   ) {
	//$content= 'full';
	$content = 'excerpt';
}






return $content;
}
add_filter('thematic_content', 'xthematic_content_func');
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
function xthematic_post_func($content) {


/////////////////////////////////////////////////////////////////////////////////////////////	
if (  is_category()  ){


		if (  is_category('especialista-em-moveis') || is_category('especialista-em-arquitetura')   ){
			echo xget_content_template1().$content;				
		}else{
			echo $content;		
		}


}
/////////////////////////////////////////////////////////////////////////////////////////////	
else if ( is_single()    ){


	if (  _get_category_slug() == 'noticias'  ||  _get_category_slug() == 'eventos'     ){












		echo ($content);
		//echo xget_content_template2($content);
	}
	else if (  _get_category_slug() == 'especialista-em-moveis'  ||  _get_category_slug() == 'especialista-em-arquitetura'     ){
		echo xget_content_template1().$content;
	}
	else{
		echo $content;		
	}


}
/////////////////////////////////////////////////////////////////////////////////////////////	
else{

	echo $content;	

}


}

add_filter('thematic_post', 'xthematic_post_func'); 
//mk x fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////









//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//filtra titulo
// Create post title
function xthematic_postheader_posttitle_func() {


   if (is_single() || is_page()) {

    if (   _get_category_slug() == 'especialista-em-arquitetura'   || _get_category_slug() == 'especialista-em-moveis'   || _get_category_slug() == 'noticias'  || _get_category_slug() == 'eventos'  ) {
       	$posttitle = '<h1 class="entry-title entry-title-single">' . get_the_title() . "</h1>\n";
	}else{
       	$posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>\n";
	}





   } elseif (is_404()) {    
       $posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
   } else {


	 if ( is_category('especialistas') ){
       $posttitle = '<div class="entry-title entry-title-especialistas"><a href="';
       $posttitle .= get_permalink();
       $posttitle .= '" title="';
       $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
       $posttitle .= '" rel="bookmark">';
       $posttitle .= get_the_title();   
       $posttitle .= "</a></div>\n";

	 }
	 elseif ( is_category('especialista-em-arquitetura') || is_category('especialista-em-moveis')){
       $posttitle = '<div class="entry-title entry-title-especialistas-especialistas-moveis"><a href="';
       $posttitle .= get_permalink();
       $posttitle .= '" title="';
       $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
       $posttitle .= '" rel="bookmark">';
       $posttitle .= get_the_title();   
       $posttitle .= "</a></div>\n";

	 }
	 elseif ( is_category('imprensa') ){

       $posttitle = '<h2 class="entry-title"><a target="_blank" href="';

//add link
//$posttitle .= get_a_href(get_the_content());








//get pdf ini/////////////////////////////////////////////////////////////////////
$matches_tag_a_href = get_a_href(get_the_content());
if( substr( $matches_tag_a_href , -4   )  == '.pdf'     ){
$posttitle .= $matches_tag_a_href ;
}
//get pdf fim/////////////////////////////////////////////////////////////////////

//get doc ini/////////////////////////////////////////////////////////////////////
$matches_tag_a_href = get_a_href(get_the_content());
if( substr( $matches_tag_a_href , -4   )  == '.doc'  ||  substr( $matches_tag_a_href , -5   )  == '.docx'     ){
$posttitle .= $matches_tag_a_href ;
}
//get doc fim/////////////////////////////////////////////////////////////////////

//get xls ini/////////////////////////////////////////////////////////////////////
$matches_tag_a_href = get_a_href($xcontent);
if( substr( $matches_tag_a_href , -4   )  == '.xls'     ){
$posttitle .= $matches_tag_a_href ;	
}
//get doc fim/////////////////////////////////////////////////////////////////////

//get xls ini/////////////////////////////////////////////////////////////////////
$matches_tag_a_href = get_a_href($xcontent);
if( substr( $matches_tag_a_href , -5   )  == '.docx'     ){
$posttitle .= $matches_tag_a_href ;	
}
//get doc fim/////////////////////////////////////////////////////////////////////



//get youtube ini/////////////////////////////////////////////////////////////////////
$mystring =  get_the_content() ;
$findme1   = '[youtube]';
$findme2   = '[/youtube]';
$pos1 = strpos($mystring, $findme1);
$pos2 = strpos($mystring, $findme2);
$pos3 = $pos2 - $pos1   ;

if(!empty($pos1) && !empty($pos1) ){
$posttitle .= 'http://www.youtube.com/watch?v='.substr( $mystring ,$pos1+strlen($findme1),  $pos3-strlen($findme2)+1 );
//$icon_src = sprintf($xdivTemplate, 'block', '<a  href="'.get_permalink($id).'" ><img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.'http://img.youtube.com/vi/'.substr( $mystring ,$pos1+strlen($findme1),  $pos3-strlen($findme2)+1 )."/0.jpg".'"/></a>'      );
}
//get youtube fim/////////////////////////////////////////////////////////////////////


//get image ini/////////////////////////////////////////////////////////////////////
$xcount_image = preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_the_content()   , $matches_image  );/**/


for ($i = 0; $i <= sizeof($matches_image[1])-1; $i++) {




	if( substr( $matches_image[1][$i] , -15   )  != '_icon_30x23.jpg'  && substr( $matches_image[1][$i] , -4   )  == '.jpg' ){
		$check_process = true;
		$checkimagelink = true;
		$mystring = $matches_image[1][$i];
		////////////////////////
		$findme_image   = $mystring;
		$pos_image = strpos(get_the_content(), $findme_image);

		////////////////////////			
		$findme   = '-';
		$pos = strrpos($mystring, $findme);
		$posttitle .= $matches_image[1][$i] ;
		break;
	}



}//for
//get image fim/////////////////////////////////////////////////////////////////////



//$posttitle .= get_a_href(get_the_content());






















	//echo 'AAA'.$matches_tag_a_href.'BBB';
	//print_r(get_the_content());
	//return;

      // $posttitle .= get_permalink();		
       $posttitle .= '" title="';
       $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
       $posttitle .= '" rel="bookmark">';
       $posttitle .= get_the_title();   
       $posttitle .= "</a></h2>\n";

	 }

	else{
       $posttitle = '<h2 class="entry-title"><a href="';
       $posttitle .= get_permalink();
       $posttitle .= '" title="';
       $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
       $posttitle .= '" rel="bookmark">';
       $posttitle .= get_the_title();   
       $posttitle .= "</a></h2>\n";
	 }
   }


if(!is_page('home')){	
   return $posttitle; 	
   //bkp return apply_filters('thematic_postheader_posttitle',$posttitle); 
}


} // end thematic_postheader_posttitle
add_filter('thematic_postheader_posttitle', 'xthematic_postheader_posttitle_func');
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
// Create post tags
function xthematic_postfooter_posttags_func() {

   if (is_single() || is_category()    ) {
       $tagtext = '';		
       //$tagtext = __(' and tagged', 'thematic');		
       $posttags = get_the_tag_list("<span class=\"tag-links\"> $tagtext ",', ','</span>');
   } elseif ( is_tag() && $tag_ur_it = thematic_tag_ur_it(', ') ) { /* Returns tags other than the one queried */
       $posttags = '<span class="tag-links">' . __(' Also tagged ', 'thematic') . $tag_ur_it . '</span> <span class="meta-sep meta-sep-comments-link">|</span>';
   } else {
       $tagtext = __('Tagged', 'thematic');
       $posttags = get_the_tag_list("<span class=\"tag-links\"> $tagtext ",', ','</span> <span class="meta-sep meta-sep-comments-link">|</span>');
   }

   //echo $posttags; 
return $posttags; 

   //return apply_filters('thematic_postfooter_posttags',$posttags); 

} // end thematic_postfooter_posttags

add_filter('thematic_postfooter_posttags', 'xthematic_postfooter_posttags_func');

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////









//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
// The Search Loop
function xthematic_searchloop_func() {
	while ( have_posts() ) : the_post(); ?>

		<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?> xlinehori-search">
   			<?php thematic_postheader(); ?>
			<div class="entry-content">
<?php thematic_content(); ?>

			</div>
			<?php //thematic_postfooter(); ?>
		</div><!-- .post -->

	<?php endwhile;
}
add_action('thematic_searchloop', 'xthematic_searchloop_func');


//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini


//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini


//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



//LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS LOOPS  FIM








//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//add xnavega
//
function xthematic_navigation_above_func1(){

$xnavegatemplate1 = '

<div class="xnavega0">
<div class="xnavega1"><a href="%s"> %s </a>
</div>
<div class="xnavega2"><a href="%s"> %s </a>
</div>	
</div>

';



$xnavegatemplate2 = '

<div class="xnavega0">
<div class="xnavega1">%s
</div>
<div class="xnavega2"><a href="%s"> %s </a>|<a href="%s"> %s </a>
</div>	
</div>

';


$xnavegatemplate3 = '

<div class="xnavega0">
<div class="xnavega1">%s
</div>
</div>

';



$xcontent = '';


////////////////////////////////////////////////////////////////////////////////////
if ( is_category('noticias')     ) {
$xcontent = sprintf($xnavegatemplate1,get_category_link(_get_category_ID_by_name('noticias')) ,'Notícias',get_category_link(_get_category_ID_by_name('eventos')),'Acesse os Eventos' );
}
////////////////////////////////////////////////////////////////////////////////////
else if ( _get_category_slug() == 'noticias'    ) {
	$xcontent = sprintf($xnavegatemplate1,get_category_link(_get_category_ID_by_name('noticias')) ,'Notícias',get_category_link(_get_category_ID_by_name('eventos')),'Acesse os Eventos' );
}





////////////////////////////////////////////////////////////////////////////////////
else if ( is_category('eventos')     ) {
$xcontent = sprintf($xnavegatemplate1,get_category_link(_get_category_ID_by_name('eventos')), 'Eventos',get_category_link(_get_category_ID_by_name('noticias')),'Acesse as Notícias' );
}
////////////////////////////////////////////////////////////////////////////////////
else if ( _get_category_slug() == 'eventos'    ) {
$xcontent = sprintf($xnavegatemplate1,get_category_link(_get_category_ID_by_name('eventos')), 'Eventos',get_category_link(_get_category_ID_by_name('noticias')),'Acesse as Notícias' );
}



////////////////////////////////////////////////////////////////////////////////////
else if ( is_category('especialistas')     ) {
$xcontent = sprintf($xnavegatemplate2, 'Os Especialistas',get_category_link(_get_category_ID_by_name('especialista-em-arquitetura')),'Especialista em Arquitetura' , get_category_link(_get_category_ID_by_name('especialista-em-moveis')),'Especialista em Móveis' );
}




////////////////////////////////////////////////////////////////////////////////////
else if ( is_category('especialista-em-arquitetura')     ) {
$xcontent = sprintf($xnavegatemplate1,get_category_link(_get_category_ID_by_name('especialista-em-arquitetura')), 'Especialista em Arquitetura',get_category_link(_get_category_ID_by_name('especialista-em-moveis')),'Acesse também o blog do Especialista em Móveis'  );
}
////////////////////////////////////////////////////////////////////////////////////
else if ( _get_category_slug() == 'especialista-em-arquitetura'    ) {
$xcontent = sprintf($xnavegatemplate1,get_category_link(_get_category_ID_by_name('especialista-em-arquitetura')), 'Especialista em Arquitetura',get_category_link(_get_category_ID_by_name('especialista-em-moveis')),'Acesse também o blog do Especialista em Móveis'  );
}



////////////////////////////////////////////////////////////////////////////////////
else if ( is_category('especialista-em-moveis')     ) {
$xcontent = sprintf($xnavegatemplate1,get_category_link(_get_category_ID_by_name('especialista-em-moveis')), 'Especialista em Móveis',get_category_link(_get_category_ID_by_name('especialista-em-arquitetura')),'Acesse também o blog do Especialista em Arquitetura'  );
}
////////////////////////////////////////////////////////////////////////////////////
else if ( _get_category_slug() == 'especialista-em-moveis'    ) {
$xcontent = sprintf($xnavegatemplate1,get_category_link(_get_category_ID_by_name('especialista-em-moveis')), 'Especialista em Móveis',get_category_link(_get_category_ID_by_name('especialista-em-arquitetura')),'Acesse também o blog do Especialista em Arquitetura'  );
}



////////////////////////////////////////////////////////////////////////////////////
else if ( is_category('imprensa')     ) {
$xcontent = sprintf($xnavegatemplate3, 'Imprensa'  );
}
////////////////////////////////////////////////////////////////////////////////////
else if ( is_date()     ) {
$xcontent = sprintf($xnavegatemplate3, 'Arquivo de Notícias e Eventos' );
}
////////////////////////////////////////////////////////////////////////////////////
else if ( is_tag()     ) {
$xcontent = sprintf($xnavegatemplate3, 'Tags');
}

////////////////////////////////////////////////////////////////////////////////////
else if ( is_search()     ) {
$xcontent = sprintf($xnavegatemplate3, 'Busca');
}



//$xcontent = sprintf($xnavegatemplate1, 'Notícias',get_category_link(_get_category_ID_by_name('eventos')),'CHECK: '._get_category_slug('noticias') );


echo  $xcontent;
return;


}

add_action('thematic_navigation_above', 'xthematic_navigation_above_func1',1);/**/	
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////







//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//add slideshow
function xthematic_navigation_above_func2(){
if ( is_category('noticias')     ) {
echo do_shortcode( '[xslideshow_lastpost]' ); 
}
}

add_action('thematic_navigation_above', 'xthematic_navigation_above_func2',2);/**/	
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
function xslideshow_lastpost_func(){

global $post;

$xthe_title_max_lengh = 30;
//$xthe_title_max_lengh = 75;
$xthe_title_str_end = '...';
//$xthe_title_str_end = '...';

?>
<div class="xslide_lastpost0">
 <div class="xslide_lastpost1">
<?php
echo '[kml_flashembed wmode="GPU"  movie="'. get_bloginfo('stylesheet_directory') . '/images/widget_slideshow.swf" width="308" height="340" fversion="9" base="'. get_bloginfo('stylesheet_directory') . '/images/" /]';
?>  
</div>
 <div class="xslide_lastpost2">
   <div class="xslide_lastpost2-1 xslide_lastpost-xsepa">

<?php 
////////////////////////////////////////////////////////////
$xcategoryname = 'noticias';
$xcategoryname2 = 'NOTÍCIAS';
$xcategoryid = _get_category_ID_by_name($xcategoryname);
$categorylink = get_category_link( $xcategoryid );
$postslist = get_posts('numberposts=1&category='.$xcategoryid);
foreach ($postslist as $post) : 
   setup_postdata($post);
?>    
   <div class="xslide_lastpost2-1-1"><span><?php echo '<a  href="'.$categorylink.'" title="'.$xcategoryname.'">'.$xcategoryname2.'</a>'; ?></span></div>
   <div class="xslide_lastpost2-1-2">

	<span class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php  xthe_title_func("", $xthe_title_str_end, true, $xthe_title_max_lengh)  ?></a></span>

   </div>
   <div class="xslide_lastpost2-1-3"><span class="entry-content"><?php the_excerpt(); ?></span></div>
<?php 
////////////////////////////////////////////////////////////
endforeach; ?>    


   </div>
   <div class="xslide_lastpost2-1">

<?php 
////////////////////////////////////////////////////////////
$xcategoryname = 'eventos';
$xcategoryid = _get_category_ID_by_name($xcategoryname);
$categorylink = get_category_link( $xcategoryid );
$postslist = get_posts('numberposts=1&category='.$xcategoryid);
foreach ($postslist as $post) : 
   setup_postdata($post);
?>    
   <div class="xslide_lastpost2-1-1"><span><?php echo '<a  href="'.$categorylink.'" title="'.$xcategoryname.'">'.strtoupper($xcategoryname).'</a>'; ?></span></div>
   <div class="xslide_lastpost2-1-2">

	<span class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>"><?php  xthe_title_func("", $xthe_title_str_end, true, $xthe_title_max_lengh)  ?></a></span>

   </div>
   <div class="xslide_lastpost2-1-3"><span class="entry-content"><?php the_excerpt(); ?></span></div>
<?php 
////////////////////////////////////////////////////////////
endforeach; ?>    


   </div>
 </div>
</div>
<!--xslide_lastpost0-->
<?php

}
add_shortcode('xslideshow_lastpost', 'xslideshow_lastpost_func');

//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini


//mk fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//cria shortcode colunn_links 
function xwidget_links_func() {
/*
extract(shortcode_atts(array(
	'foo' => 'no foo',
	'bar' => 'default bar',
), $atts));
*/





////////////////////////////////////////////////
?>
<?php
include_once(ABSPATH.WPINC.'/rss.php'); // path to include script
$feed = fetch_rss('http://gdata.youtube.com/feeds/base/users/clientebrasil/uploads?orderby=updated&alt=rss&v=2&client=ytapi-youtube-rss-redirect'); // specify feed url
$items = array_slice($feed->items, 0, 1); // specify first and last item
?>

<?php if (!empty($items)) : ?>
<?php foreach ($items as $item) : ?>


<?php 



$content_youtube_embed_title =  $item['title'];

$content_youtube_embed = '

<object width="204" height="174">
 <param name="movie" value="' . str_replace("watch?v=","v/", $item['link']). str_replace("&feature=youtube_gdata","", $item['link']).'&hl=pt_BR&fs=1&rel=0&border=1&">
 </param>
 <param name="allowFullScreen" value="true">
 </param>
 <param name="allowscriptaccess" value="always">
 <param name="wmode" value="transparent">
 </param>
 <embed src="' . str_replace("watch?v=","v/", $item['link']) . str_replace("&feature=youtube_gdata","", $item['link']).'&hl=pt_BR&fs=1&rel=0&border=1&" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" width="204"  height="174"></embed>
</object>

';


?>

<?php endforeach; ?>
<?php endif; ?>


<?php


///////////////////////////////////////////////


$content = '

<div class="bloco_iteiro">
 <div><a href="'. get_bloginfo('url') .'/#/home/newsletter" target="_self" title="Cadastre-se e receba as novidades da Häfele Brasil em seu e-mail."><img src="'. get_bloginfo('stylesheet_directory') .'/images/colunn_links/hbr_email.jpg" width="238" height="99" border="0" /></a></div>
 <div class="espaco"></div>
 <div><a href="http://www.cliente.com.br/publicacoes/biblioteca_revista.asp?utm_source=HafeleDesignStudio&utm_medium=HafeleDesignStudioBlog&utm_content=BannerPDH&utm_campaign=BannerPDHDesignStudio" target="_blank" title="Acesse a revista da Häfele"><img src="'. get_bloginfo('stylesheet_directory') .'/images/colunn_links/acesse_revista.jpg" width="238" height="172" border="0" /></a></div>
 <div class="espaco"></div>
 <div><a href="http://www.cliente.com.br/publicacoes/catonline.asp?utm_source=HafeleDesignStudio&utm_medium=HafeleDesignStudioBlog&utm_content=BannerOGH2010&utm_campaign=BannerOGH2010DesignStudio" target="_blank" title="Faça a reserva e garanta o seu exemplar"><img src="'. get_bloginfo('stylesheet_directory') .'/images/colunn_links/cat10.jpg" width="238" height="172" border="0" /></a></div>
 <div class="espaco"></div>
 <div><img src="'. get_bloginfo('stylesheet_directory') .'/images/colunn_links/cab_twitter.jpg" width="238" height="68" title="A Häfele no Twitter" /></div>
 <div style="background-color: #b7d7e9">

  <script src="'.get_bloginfo('stylesheet_directory').'/images/colunn_links/widget.js"></script>
     <script>
      new TWTR.Widget({
      version: 2,
      type: \'profile\',
      rpp: 2,
      interval: 6000,
      width: 237,
      height: 244,
      theme: {
      shell: {
      background: \'#b7d7e9\',
      color: \'#4489ac\'
      },
      tweets: {
      background: \'#b7d7e9\',
      color: \'#7c837b\',
      links: \'#4489ac\'
      }
      },
      features: {
      scrollbar: false,
      loop: false,
      live: false,
      hashtags: true,
      timestamp: true,
      avatars: false,
      behavior: \'default\'
      }
      }).render().setUser(\'clientebrasil\').start();
      </script>




 </div>
 <div><img src="'. get_bloginfo('stylesheet_directory') .'/images/colunn_links/rod_twitter.jpg" width="238" height="12" /></div>
 <div class="espaco"></div>  
 <div><img src="'. get_bloginfo('stylesheet_directory') .'/images/colunn_links/cab_youtube.jpg" width="238" height="68" title="A Häfele no YouTube" /></div>
 <div style="background-color: #625664">
   <div align="center">
 '.$content_youtube_embed .'
   </div>
 </div>
 <div class="texto01">'.$content_youtube_embed_title.'</div>
 <div class="texto02"><a href="http://www.youtube.com/user/clientebrasil" target="_blank" class="link">Acesse a Häfele no YouTube </a> </div>
 <div><img src="'. get_bloginfo('stylesheet_directory') .'/images/colunn_links/rod_youtube.jpg" width="238" height="12" /></div>
</div>';

//NOTA: LEMBRAR REMOVER COMENTARIO DO OBJECT FLASH YOUTUBE





//return 'CHECK RETURN';

if( !is_page('home') ){

return $content;
}


}


add_shortcode('xwidget_links', 'xwidget_links_func');/**/
//xcolunn_links

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//EMPRESA 007-010 INI

//SUBSTITUE FOOTER

//function childtheme_footer($thm_footertext) {
function xstylize_footer_func() {



$category_id_imprensa   = _get_category_ID_by_name("imprensa");
$category_name_imprensa = _get_category_name_by_ID($category_id_imprensa);
$category_title_imprensa = 'IMPRENSA';
$category_link_imprensa = 'http://www.cliente.com.br/empresa/imprensa.asp';
//$category_link_imprensa = get_category_link( $category_id_imprensa );


$category_title_newsletter = 'RECEBA INFORMAÇÕES DA HÄFELE BRASIL EM SEU E-MAIL';
$category_link_newsletter = get_bloginfo('url').'/#/home/newsletter';

$category_title_indique = 'INDIQUE O SITE';
$category_link_indique = get_bloginfo('url').'/#/home/indique-o-site';


$category_title_termos = 'TERMOS DE USO';
$category_name_termos = 'termos-de-uso';
//$category_id_termos = _get_ID_by_page_name($category_name_termos);
//$category_link_termos = get_page_link( $category_id_termos );
$category_link_termos = get_bloginfo('url').'/#/home/termos-de-uso';

$category_title_privacidade = 'PRIVACIDADE';
$category_name_privacidade = 'privacidade';
//$category_id_privacidade = _get_ID_by_page_name($category_name_privacidade);
//$category_link_privacidade = get_page_link( $category_id_privacidade );
$category_link_privacidade = get_bloginfo('url').'/#/home/privacidade';


$category_title_copyright = 'Copyright © Häfele '.date('Y');
$category_link_copyright = 'copyright';
//$category_link_copyright = get_bloginfo('stylesheet_directory').'/copyright.php?keepThis=true&TB_iframe=true&height=350&width=400';



//get_bloginfo('stylesheet_directory')


$content .= '<div id="xfooter1" ><div id="xfooter1b">Acompanhe a Häfele Brasil no:</div>';


$content .= '<div class="xfooter_youtube_icon">
 <span class="xfooter_youtube_icon_link"><a target="_blank" href="http://www.youtube.com/user/clientebrasil/"><img src="'.get_bloginfo('stylesheet_directory').'/images/pixel_trans.gif" width="50" height="20" border="0"></a></span>
</div>

<div class="xfooter_twetter_icon">
 <span class="xfooter_twetter_icon_link"><a  target="_blank" href="http://twitter.com/clientebrasil/"><img src="'.get_bloginfo('stylesheet_directory').'/images/pixel_trans.gif" width="80" height="20" border="0"></a></span>
</div>';



$content .= '</div><div class="xclear"></div><!--xfooter1 fim-->';




$content .= '<div id="xfooterb" >';




$content .= '<div id="xfooter2" ><a  target="_blank" title="'.$category_title_imprensa.'" href="'. $category_link_imprensa .'">'.$category_title_imprensa.'</a>';
$content .= '  |  ';
$content .= '<a  target="_self" title="'.$category_title_newsletter.'" href="'. $category_link_newsletter .'">'.$category_title_newsletter.'</a>';
$content .= '  |  ';
$content .= '<a  target="_self" title="'.$category_title_indique.'" href="'. $category_link_indique.'">'.$category_title_indique.'</a>';
$content .= '</div><!--xfooter2 fim-->';


$content .= '<div id="xfooter3" ><a title="'.$category_title_termos.'" href="'. $category_link_termos .'">'.$category_title_termos.'</a>';
$content .= '  |  ';
$content .= '<a title="'.$category_title_privacidade.'" href="'. $category_link_privacidade .'">'.$category_title_privacidade.'</a>';
$content .= '</div><!--xfooter3 fim-->';

$content .= '<div id="xfooter4" >'.$category_title_copyright;
$content .= '</div><!--xfooter4 fim-->';



$content .= '</div><!--xfooterb fim-->';


//novo///////////////////////////////////////////////////////////
?>
<script type="text/javascript" src="jquery.sizes.js"></script>

<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(function() {



jQuery(function($) {


function doSomething() {
//$(window).width();   // returns width of browser viewport
//$(document).width(); // returns width of HTML document
  // alert("xx"+$(window).width());
//.xfooter-1-1

var myDiv1 = $('div.xfooter-1-1');
var myDiv1minWidth = 1024;
var myDiv1maxWidth = 1440;
var myDiv1newWidth;		

var myDiv2 = $('div.xfooter-2-1');	
var myDiv2minWidth = 1024;
var myDiv2maxWidth = 1440;	
var myDiv2newWidth;			

var actualWidth = $(window).width();



/////////////////////////////////////
if( actualWidth < myDiv1minWidth ){
	myDiv1newWidth = myDiv1minWidth;		
}else if( actualWidth > myDiv1maxWidth ){
	myDiv1newWidth = myDiv1maxWidth;
	//actualWidth += 'px';	
}else{
	myDiv1newWidth = actualWidth;	
}
myDiv1newWidth += 'px';
$(myDiv1).width(myDiv1newWidth);
/////////////////////////////////////


/////////////////////////////////////
if( actualWidth < myDiv2minWidth ){
	myDiv2newWidth = myDiv2minWidth;		
}else if( actualWidth > myDiv2maxWidth ){
	myDiv2newWidth = myDiv2maxWidth;
	//actualWidth += 'px';	
}else{
	myDiv2newWidth = actualWidth;	
}
myDiv2newWidth += 'px';
$(myDiv2).width(myDiv2newWidth);
/////////////////////////////////////






};

var resizeTimer = null;



<?php 
global $is_IE;	
if($is_IE  && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false ) {
	?>doSomething();<?php	
//}
?>
$(window).bind('resize', function() {
							 // alert('xxxx');
   if (resizeTimer) clearTimeout(resizeTimer);
   resizeTimer = setTimeout(doSomething, 1);
});				

<?php 
}
?>

});



});				
// ]]>								
</script>


<div class="xfooter-0">

<!-- linha1 -->
<div class="xfooter-1">
   	<div class="xfooter-1-1">
       	<div class="xfooter-1-1-1">
           	<div class="xfooter-1-1-1-1">Acompanhe a Häfele Brasil no:</div>
           	<div class="xfooter-1-1-1-2"><a target="_blank" href="http://www.youtube.com/user/clientebrasil/"><img src="<?php echo get_bloginfo('stylesheet_directory') ?>/images/pixel_trans.gif" width="50" height="20" border="0"></a></div>
           	<div class="xfooter-1-1-1-3"><a  target="_blank" href="http://twitter.com/clientebrasil/"><img src="<?php echo get_bloginfo('stylesheet_directory') ?>/images/pixel_trans.gif" width="80" height="20" border="0"></a></div>                
           </div>  
       </div>  
       <div class="xclear"></div>      
   </div>

<div class="xclear"></div> 
<?php ?>

<!-- linha2 -->
<div class="xfooter-2">
   	<div class="xfooter-2-1">

<div class="xfooter-2-1b">  

       	<div class="xfooter-2-1-1">
           <a target="_blank" title="<?php echo $category_title_imprensa; ?>" href="<?php echo $category_link_imprensa; ?>"> <?php echo $category_title_imprensa; ?></a>  |  
           <a  title="<?php echo $category_title_newsletter; ?>" href="<?php echo $category_link_newsletter; ?>"> <?php echo $category_title_newsletter; ?></a>  |  
           <a  title="<?php echo $category_title_indique; ?>" href="<?php echo $category_link_indique; ?>"> <?php echo $category_title_indique; ?></a>

           </div>         
       	<div class="xfooter-2-1-2">
           	<div class="xfooter-2-1-2-1">
               	<a  title="<?php echo $category_title_termos; ?>" href="<?php echo $category_link_termos; ?>"> <?php echo $category_title_termos; ?></a>  |  
                   <a  title="<?php echo $category_title_privacidade; ?>" href="<?php echo $category_link_privacidade; ?>"> <?php echo $category_title_privacidade; ?></a>  |  
                   <?php echo $category_title_copyright ?>

               </div>  
           </div>  


</div>  



       </div>  
       <div class="xclear"></div>      
   </div>



</div>




<?php 

    //return $content;
    }

//add_filter('thematic_footertext', 'xstylize_footer_func');/**/

//EMPRESA 007-010 FIM
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//EMPRESA 007-010 INI

//SUBSTITUE FOOTER

//function childtheme_footer($thm_footertext) {
function xstylize_footer_func3() {

if(is_page('home')){
return;
}

$category_id_imprensa   = _get_category_ID_by_name("imprensa");
$category_name_imprensa = _get_category_name_by_ID($category_id_imprensa);
$category_title_imprensa = 'IMPRENSA';
$category_link_imprensa = 'http://www.cliente.com.br/empresa/imprensa.asp';
//$category_link_imprensa = get_category_link( $category_id_imprensa );


$category_title_newsletter = 'RECEBA INFORMAÇÕES DA HÄFELE BRASIL EM SEU E-MAIL';
$category_link_newsletter = get_bloginfo('url').'/#/home/newsletter';

$category_title_indique = 'INDIQUE O SITE';
$category_link_indique = get_bloginfo('url').'/#/home/indique-o-site';


$category_title_termos = 'TERMOS DE USO';
$category_name_termos = 'termos-de-uso';
//$category_id_termos = _get_ID_by_page_name($category_name_termos);
//$category_link_termos = get_page_link( $category_id_termos );
$category_link_termos = get_bloginfo('url').'/#/home/termos-de-uso';

$category_title_privacidade = 'PRIVACIDADE';
$category_name_privacidade = 'privacidade';
//$category_id_privacidade = _get_ID_by_page_name($category_name_privacidade);
//$category_link_privacidade = get_page_link( $category_id_privacidade );
$category_link_privacidade = get_bloginfo('url').'/#/home/privacidade';


$category_title_copyright = 'Copyright © Häfele '.date('Y');
$category_link_copyright = 'copyright';
//$category_link_copyright = get_bloginfo('stylesheet_directory').'/copyright.php?keepThis=true&TB_iframe=true&height=350&width=400';



//get_bloginfo('stylesheet_directory')


$content .= '<div id="xfooter1" ><div id="xfooter1b">Acompanhe a Häfele Brasil no:</div>';


$content .= '<div class="xfooter_youtube_icon">
 <span class="xfooter_youtube_icon_link"><a target="_blank" href="http://www.youtube.com/user/clientebrasil/"><img src="'.get_bloginfo('stylesheet_directory').'/images/pixel_trans.gif" width="50" height="20" border="0"></a></span>
</div>

<div class="xfooter_twetter_icon">
 <span class="xfooter_twetter_icon_link"><a  target="_blank" href="http://twitter.com/clientebrasil/"><img src="'.get_bloginfo('stylesheet_directory').'/images/pixel_trans.gif" width="80" height="20" border="0"></a></span>
</div>';



$content .= '</div><div class="xclear"></div><!--xfooter1 fim-->';




$content .= '<div id="xfooterb" >';




$content .= '<div id="xfooter2" ><a target="_blank" title="'.$category_title_imprensa.'" href="'. $category_link_imprensa .'">'.$category_title_imprensa.'</a>';
$content .= '  |  ';
$content .= '<a  target="_self" title="'.$category_title_newsletter.'" href="'. $category_link_newsletter .'">'.$category_title_newsletter.'</a>';
$content .= '  |  ';
$content .= '<a  target="_self" title="'.$category_title_indique.'" href="'. $category_link_indique.'">'.$category_title_indique.'</a>';
$content .= '</div><!--xfooter2 fim-->';


$content .= '<div id="xfooter3" ><a title="'.$category_title_termos.'" href="'. $category_link_termos .'">'.$category_title_termos.'</a>';
$content .= '  |  ';
$content .= '<a title="'.$category_title_privacidade.'" href="'. $category_link_privacidade .'">'.$category_title_privacidade.'</a>';
$content .= '</div><!--xfooter3 fim-->';

$content .= '<div id="xfooter4" >'.$category_title_copyright;
$content .= '</div><!--xfooter4 fim-->';



$content .= '</div><!--xfooterb fim-->';


//novo///////////////////////////////////////////////////////////
?>


<div class="xfooter-0">

<!-- linha1 -->
<div class="xfooter-1">
   	<div class="xfooter-1-1">
       	<div class="xfooter-1-1-1">
           	<div class="xfooter-1-1-1-1">Acompanhe a Häfele Brasil no:</div>
           	<div class="xfooter-1-1-1-2"><a target="_blank" href="http://www.youtube.com/user/clientebrasil/"><img src="<?php echo get_bloginfo('stylesheet_directory') ?>/images/pixel_trans.gif" width="50" height="20" border="0"></a></div>
           	<div class="xfooter-1-1-1-3"><a  target="_blank" href="http://twitter.com/clientebrasil/"><img src="<?php echo get_bloginfo('stylesheet_directory') ?>/images/pixel_trans.gif" width="80" height="20" border="0"></a></div>                
           	<div class="xfooter-1-1-1-4"><a  target="_blank" href="http://pt-br.facebook.com/pages/H%C3%A4fele-Brasil/173253496053844"><img src="<?php echo get_bloginfo('stylesheet_directory') ?>/images/pixel_trans.gif" width="80" height="20" border="0"></a></div>                

           </div>  
       </div>  
       <div class="xclear"></div>      
   </div>

<div class="xclear"></div> 
<?php ?>

<!-- linha2 -->
<div class="xfooter-2">
   	<div class="xfooter-2-1">

<div class="xfooter-2-1b">  

       	<div class="xfooter-2-1-1">
           <a target="_blank" title="<?php echo $category_title_imprensa; ?>" href="<?php echo $category_link_imprensa; ?>"> <?php echo $category_title_imprensa; ?></a>  |  
           <a  title="<?php echo $category_title_newsletter; ?>" href="<?php echo $category_link_newsletter; ?>"> <?php echo $category_title_newsletter; ?></a>  |  
           <a  title="<?php echo $category_title_indique; ?>" href="<?php echo $category_link_indique; ?>"> <?php echo $category_title_indique; ?></a>

           </div>         
       	<div class="xfooter-2-1-2">
           	<div class="xfooter-2-1-2-1">
               	<a  title="<?php echo $category_title_termos; ?>" href="<?php echo $category_link_termos; ?>"> <?php echo $category_title_termos; ?></a>  |  
                   <a  title="<?php echo $category_title_privacidade; ?>" href="<?php echo $category_link_privacidade; ?>"> <?php echo $category_title_privacidade; ?></a>  |  
                   <?php echo $category_title_copyright ?>

               </div>  
           </div>  


</div>  






       </div>  
       <div class="xclear"></div>     







<div class="xfooter-2-1c">  

<div class="xfooter-2-1c-1"><a target="_blank" href="http://www.makingnet.com.br/?utm_source=SITE_DESIGN_STUDIO&utm_medium=SITE_DESIGN_STUDIO&utm_content=SITE_DESIGN_STUDIO&utm_campaign=SITE_DESIGN_STUDIO"><img src="<?php echo get_bloginfo('stylesheet_directory') ?>/images/pixel_trans.gif" width="50" height="20" border="0"></a>
</div>

</div>  
<div class="xclear"></div>





   </div>



</div>




<?php 

    //return $content;
    }

add_filter('thematic_footertext', 'xstylize_footer_func3');/**/

//EMPRESA 007-010 FIM
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//EMPRESA 007-010 INI

//SUBSTITUE FOOTER

//function childtheme_footer($thm_footertext) {
function xstylize_footer_func2() {




$xcontent = '

[kml_flashembed    fvars=" siteXML = '.get_bloginfo('stylesheet_directory').'/images/xfooter_swf/xml/site.xml'.'  "        BASE="'.get_bloginfo('stylesheet_directory').'/images/xfooter_swf/' .'" wmode="transparent" ALLOWSCRIPTACCESS="always"  movie="'. get_bloginfo('stylesheet_directory') . '/images/xfooter_swf/main.swf" width="100%" height="50" fversion="9" base="'. get_bloginfo('stylesheet_directory') . '/images/xfooter_swf/" /]

';

//flashcontentXX





if(is_page('home')){
return 'true true true home';
}else{
return 'false false false  home';
}

return $xcontent;

}

//add_filter('thematic_footertext', 'xstylize_footer_func2');/**/

//EMPRESA 007-010 FIM
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////










//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//troca wp-login.php p/ login
//adicionado .htaccess

function xwplogin_filter( $url, $path, $orig_scheme )
{
$old  = array( "/(wp-login\.php)/");
$new  = array( "h-admin");
return preg_replace( $old, $new, $url, 1);
}
//add_filter('site_url',  'xwplogin_filter', 10, 3);
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


















function xget_especialistas_xfoto_key1($xcontent,$id){



$xdivTemplate = '
<div id="xentry-img-especialistas" style="display:%s">
%s
</div>
';	



//get image ini/////////////////////////////////////////////////////////////////////
$xcount_image = preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i',  $xcontent   , $matches_image  );/**/


for ($i = 0; $i <= sizeof($matches_image[1])-1; $i++) {

	//echo $matches_image[1][$i]."<br />";
	//print_r($matches_image[1]);
	//exit();

	if( substr( $matches_image[1][$i] , -15   )  != '_icon_30x23.jpg'  && substr( $matches_image[1][$i] , -4   )  == '.jpg' ){

		//pega primeiro id attachment
		$img_tag_src = $matches_image[1][$i];
		$img_tag_img = $matches_image[0][$i];
		$findme1   = ' wp-image-';
		$pos_wp_image = strrpos($img_tag_img, $findme1);

		if($pos_wp_image > 0 ){		

			$check_process = true;
			$checkimagelink = true;

			$findme2   = '"';
			$pos_wp_image_fim = strpos(substr($img_tag_img,$pos_wp_image ), $findme2);	
			$wp_image_id = substr( $img_tag_img , ($pos_wp_image + strlen($findme1) ) ,  ( $pos_wp_image_fim- strlen($findme1) ) );


			$meta_img = wp_get_attachment_image($wp_image_id, $size='thumbnail', $icon = false);
			$xcount_image = preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i',  $meta_img   , $matches_image2  );/**/

			$src_image = $matches_image2[0][0];

			$src_image = sprintf($xdivTemplate, 'block', '<a  href="'.get_permalink($id).'" >'.$src_image.'</a>'      );

			$pos_img  = strrpos($xcontent, $img_tag_img);
			//echo 'xml_src_image-> '.$src_image.'<br />';

			break;
		}//if


	}//if

}//for

//get image fim/////////////////////////////////////////////////////////////////////



//get youtube ini/////////////////////////////////////////////////////////////////////
$mystring = $xcontent;
$findme1   = '[youtube]';
$findme2   = '[/youtube]';
$pos1 = strpos($mystring, $findme1);
$pos2 = strpos($mystring, $findme2);
$pos3 = $pos2 - $pos1   ;

if(!empty($pos1) && !empty($pos1) ){
$check_process = true;
$checkyoutubelink = true;
$src_youtube = 'http://img.youtube.com/vi/'.substr( $mystring ,$pos1+strlen($findme1),  $pos3-strlen($findme2)+1 )."/0.jpg";

$src_youtube = sprintf($xdivTemplate, 'block', '<a  href="'.get_permalink($id).'" ><img width="165" height="125" border=0 src="'.$src_youtube.'"/></a>'      );


//echo 'CHECK 222 YOUTUBE'.$xml_src."<br />";
}else{
$checkyoutubelink = false;	
}
//get youtube fim/////////////////////////////////////////////////////////////////////




if($checkyoutubelink && $checkimagelink){


if($pos1 >= $pos_img){
	$src = $src_image;
}else{
	$src = $src_youtube;	
}



}
else if($checkyoutubelink){
$src = $src_youtube;	
}
else if($checkimagelink){
$src = $src_image;
}






echo $src;
return ;



}










//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
//complemento function xcustom_thematic_postheader() {

//ini//////////////////


function xget_especialistas_xfoto_key1XXXXXXXXXXXXXX($xcontent,$id){
//more-fields1	
//somente category especialistas 

//echo 'xxx';
//return;


$xdivTemplate = '
<div id="xentry-img-especialistas" style="display:%s">
%s
</div>
';




$miniMediaImgSizeW = '165';
$miniMediaImgSizeH = '125';
$miniMediaImgSize = $miniMediaImgSizeW.'x'.$miniMediaImgSizeH;

$mediumMediaImgSizeW = '295';
$mediumMediaImgSizeH = '215';
$mediumMediaImgSize = $mediumMediaImgSizeW.'x'.$mediumMediaImgSizeH;

$fullMediaImgSizeW = '608';
$fullMediaImgSizeH = '390';
$fullMediaImgSize = $fullMediaImgSizeW.'x'.$fullMediaImgSizeH;



//get youtube ini/////////////////////////////////////////////////////////////////////
$mystring = $xcontent;
$findme1   = '[youtube]';
$findme2   = '[/youtube]';
$pos1 = strpos($mystring, $findme1);
$pos2 = strpos($mystring, $findme2);
$pos3 = $pos2 - $pos1   ;

if(!empty($pos1) && !empty($pos1) ){
$check_process = true;
$checkyoutubelink = true;
//$icon_src = 'http://img.youtube.com/vi/'.substr( $mystring ,$pos1+strlen($findme1),  $pos3-strlen($findme2)+1 )."/0.jpg";
//echo 'CHECK 222 YOUTUBE'.$xml_src."<br />";
$icon_src = sprintf($xdivTemplate, 'block', '<a  href="'.get_permalink($id).'" ><img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.'http://img.youtube.com/vi/'.substr( $mystring ,$pos1+strlen($findme1),  $pos3-strlen($findme2)+1 )."/0.jpg".'"/></a>'      );


}else{
$checkyoutubelink = false;	
}
//get youtube fim/////////////////////////////////////////////////////////////////////



//get image ini/////////////////////////////////////////////////////////////////////
$xcount_image = preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i',  $xcontent   , $matches_image  );/**/


for ($i = 0; $i <= sizeof($matches_image[1])-1; $i++) {




	if( substr( $matches_image[1][$i] , -15   )  != '_icon_30x23.jpg'  && substr( $matches_image[1][$i] , -4   )  == '.jpg' ){
		$check_process = true;
		$checkimagelink = true;
		$mystring = $matches_image[1][$i];
		////////////////////////
		$findme_image   = $mystring;
		$pos_image = strpos(get_the_content(), $findme_image);

		////////////////////////			
		$findme   = '-';
		$pos = strrpos($mystring, $findme);
		//$src_image = substr($mystring,0,$pos+1).$miniMediaImgSize.'.jpg';
		$icon_src = sprintf($xdivTemplate, 'block', '<a  href="'.get_permalink($id).'" ><img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.substr($mystring,0,$pos+1).$miniMediaImgSize.'.jpg'.'"/></a>'      );


		//echo 'CHECK 222 IMAGE'.$xml_src."<br />";
		break;
	}



}//for
//get image fim/////////////////////////////////////////////////////////////////////




//get pdf ini/////////////////////////////////////////////////////////////////////
$matches_tag_a_href = get_a_href($xcontent);
if( substr( $matches_tag_a_href , -4   )  == '.pdf'     ){
//$xml_src_pdf = 'XLS_ICON';
$icon_src = sprintf($xdivTemplate, 'block', '<a  href="'.get_permalink($id).'" ><img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.get_bloginfo('stylesheet_directory').'/images/view_pdf_icon"/></a>'      );

//$xml_src_pdf = '<img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.get_bloginfo('stylesheet_directory').'/images/view_pdf_icon.jpg"/>';
}
//get pdf fim/////////////////////////////////////////////////////////////////////

//get doc ini/////////////////////////////////////////////////////////////////////
$matches_tag_a_href = get_a_href($xcontent);
if( substr( $matches_tag_a_href , -4   )  == '.doc'  ||  substr( $matches_tag_a_href , -5   )  == '.docx'     ){
//$xml_src_pdf = 'XLS_ICON';
$icon_src = sprintf($xdivTemplate, 'block', '<a  href="'.get_permalink($id).'" ><img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.get_bloginfo('stylesheet_directory').'/images/view_msword_icon.jpg"/></a>'      );

//$xml_src_pdf = '<img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.get_bloginfo('stylesheet_directory').'/images/view_pdf_icon.jpg"/>';
}
//get doc fim/////////////////////////////////////////////////////////////////////


//get xls ini/////////////////////////////////////////////////////////////////////
$matches_tag_a_href = get_a_href($xcontent);
if( substr( $matches_tag_a_href , -4   )  == '.xls'     ){
//$xml_src_pdf = 'XLS_ICON';
$icon_src = sprintf($xdivTemplate, 'block', '<a  href="'.get_permalink($id).'" ><img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.get_bloginfo('stylesheet_directory').'/images/view_msexcel_icon.jpg"/></a>'      );

//$xml_src_pdf = '<img width="'.$miniMediaImgSizeW.'" height="'.$miniMediaImgSizeH.'" border=0 src="'.get_bloginfo('stylesheet_directory').'/images/view_pdf_icon.jpg"/>';
}
//get doc fim/////////////////////////////////////////////////////////////////////




/*
view_msword_icon
view_pdf_icon
view_msexcel_icon
*/

echo $icon_src;

return  ;





}

//fim////////////////////

//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////









//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
function xget_content_template2($content){


return	 ('CHECK xget_content_template2'.$content);

$hshffd = preg_match_all( '|<a.*?href=[\'"](.*?)[\'"].*?>|i',  $content  , $patterns );
$hshffd--;
//echo 'xxxxxxxxxxxxxx'.$hshffd ;
//print_r( $patterns);
for ($i = 0; $i <= $hshffd ; $i++) {
//print_r( $patterns);
////  echo 'CHECK 111 '.$patterns[$i][1]."<br />";
echo 'CHECK 222 '.$patterns[1][$i]."<br />";
}

return;	

// retrieve link destinations
$matches_tag_a_href = get_a_href($content);	
$matches_tag_a_content = get_a_content($content);


//gera link youtube shortcode preview
$youtube_link = (str_replace('http://www.youtube.com/watch?v=', "[youtube]", $matches_tag_a_href ));
$youtube_link .= '[/youtube]';
$youtube_link =  do_shortcode($youtube_link);

//subst link por
$content = preg_replace('/<a[^>]+href[^>]+>/', '', $content);
$content = str_replace($matches_tag_a_content, '<br />xxxxxxxxx'.$matches_tag_a_content.'##########################################', $content);

return	 ($content);



}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
function xget_content_template1(){
//more-fields2
//somente single

//return  'CHECK more-fields2 more-fields2 more-fields2 more-fields2 ';

global $post;

//CHECK OK


$miniMediaImgSizeW = '165';
$miniMediaImgSizeH = '125';
$miniMediaImgSize = $miniMediaImgSizeW.'x'.$miniMediaImgSizeH;

$mediumMediaImgSizeW = '295';
$mediumMediaImgSizeH = '215';
$mediumMediaImgSize = $miniMediaImgSizeW.'x'.$miniMediaImgSizeH;

$fullMediaImgSizeW = '608';
$fullMediaImgSizeH = '390';
$fullMediaImgSize = $fullMediaImgSizeW.'x'.$fullMediaImgSizeH;




//com foto
$xdivTemplate1 = '
<div id="xentry-img-noticias" style="display:%s" >
%s
</div>
';


//pega custom field
$xcontent_morefield = get_post_meta($post->ID, 'xfoto_key1', TRUE);	


$xcontent_morefield_Substring = 'http://www.youtube.com/watch?v=';

//remove paragrafo e br
$xcontent_morefield = str_replace('<p>', ' ', $xcontent_morefield);
$xcontent_morefield = str_replace('</p>', ' ', $xcontent_morefield);

// retrieve names of links
$matches_tag_a_content = get_a_content($xcontent_morefield);
// retrieve link destinations
$matches_tag_a_href = get_a_href($xcontent_morefield);
// retrieve images on the site
$matches_tag_img = get_images($xcontent_morefield);



$checkanexo = strpos($matches_tag_a_href, 'attachment_id=');
if( $checkanexo ){
$checkanexo = substr($matches_tag_a_href, ($checkanexo+14) );
$matches_tag_a_href = wp_get_attachment_url($checkanexo);
}

//http://192.168.0.54/cliente/cms/?attachment_id=821 
//echo 'CHECK111=> '.strstr($matches_tag_a_href, 'attachment_id=')."\r\n";
//echo 'CHECK 222 '.wp_get_attachment_url(821)."\r\n";
//echo 'CHECK 333->'.$matches_tag_a_href."<-XXXXXXXXXXX";
//exit();

//identifica tipo jpg ou youtube
////////////////////////////////////////////////////////////////////////////////////////////////////////
if($xcontent_morefield && substr( $matches_tag_img[1][0] , -4   )  == '.jpg'   ||    substr( $matches_tag_img[1][0] , -4   )  == '.gif'     ){



$xcontent =  '<img src="'.$matches_tag_img[1][0] .'" border="0"/>'; 
$xcontent = sprintf($xdivTemplate1, 'block', $xcontent    );


/*	
$matches_tag_img[0][0] = str_replace($fullMediaImgSize, $miniMediaImgSize, $matches_tag_img[0][0]);	
$matches_tag_img[0][0] = str_replace(  'width="'.$mediumMediaImgSizeW.'"' , 'width="'.$fullMediaImgSizeW.'"', $matches_tag_img[0][0]);	
$matches_tag_img[0][0] = str_replace(  'height="'.$mediumMediaImgSizeH.'"' , 'height="'.$fullMediaImgSizeH.'"', $matches_tag_img[0][0]);	
$matches_tag_img[0][0] = str_replace(  'class="alignnone size-large' , 'class="alignnone size-large' , $matches_tag_img[0][0]);	
$xcontent = sprintf($xdivTemplate1,  'block' ,  '<a href="'.get_permalink($id).'" >'.$matches_tag_img[0][0].'</a>'    );
*/
}
//identifica tipo youtube
////////////////////////////////////////////////////////////////////////////////////////////////////////
else if($xcontent_morefield && strpos($matches_tag_a_href, $xcontent_morefield_Substring) !== false    ){
$xcontent = (str_replace('http://www.youtube.com/watch?v=', "[youtube]", $matches_tag_a_href ));
$xcontent .= '[/youtube]';
$xcontent = sprintf($xdivTemplate1, 'block' ,  do_shortcode($xcontent) );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
else if($xcontent_morefield && substr( $matches_tag_a_href , -4   )  == '.pdf'     ){
$xcontent = sprintf($xdivTemplate1,  'block' ,   '<a class="xlinkanexo" target="_blank" href="'.$matches_tag_a_href.'">'.'<img  align="left"  width="30" height="23"  border="0" src="'.get_bloginfo('stylesheet_directory').'/images/view_pdf_icon_30x23.jpg">'.$matches_tag_a_content.'</a>'   );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
else if($xcontent_morefield && substr( $matches_tag_a_href , -4   )  == '.doc'     ){
$xcontent = sprintf($xdivTemplate1,  'block' ,   '<a  class="xlinkanexo" target="_blank" href="'.$matches_tag_a_href.'">'.'<img  align="left"  width="30"  height="23"  border="0" src="'.get_bloginfo('stylesheet_directory').'/images/view_msword_icon_30x23.jpg">'.$matches_tag_a_content.'</a>'   );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
else if($xcontent_morefield && substr( $matches_tag_a_href , -4   )  == '.xls'     ){
$xcontent = sprintf($xdivTemplate1,  'block' ,   '<a  class="xlinkanexo" target="_blank" href="'.$matches_tag_a_href.'">'.'<img  align="left"  width="30"  height="23"  border="0" src="'.get_bloginfo('stylesheet_directory').'/images/view_msexcel_icon_30x23.jpg">'.$matches_tag_a_content.'</a>'   );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
else{
$xcontent = sprintf($xdivTemplate1,  'none' ,   ''   );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////


echo  $xcontent;
//return $xcontent;



}//fim function xget_content_template1(){


//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////














//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
function xthematic_search_form_func() {




$content = ''.'

<div id="xpesquisa_title">Busca</div>
<div class="search-box">
<form method="get" action="'. get_bloginfo('home').'/">
<input type="text" size="15" class="search-field" value="" id="s" name="s" onfocus="if(this.value == \'\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'\';}"/>
<input type="submit"  value="" class="search-go" />
</form></div>';

return $content;

}
//<input type="text" size="15" class="search-field" name="s" id="s" value="" onfocus="if(this\.value == \'\') {this\.value = \'\';}" onblur="if (this.value == \'\') {this\.value = \'\';}"/>

add_action('thematic_search_form', 'xthematic_search_form_func');/**/
//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
//add complemento para plugin more field
function xinsert_custom_field_func2() { ?>

<script type="text/javascript">
// <![CDATA[






var isTinyMCE;
var tmpFocus;
function focusTextArea(id) {
//id = "xfoto_key1";

//alert('333');////////////////////////////////

jQuery(document).ready(function() {

	if ( typeof tinyMCE != "undefined" ) {
		var elm = tinyMCE.get(id);
	}


	if ( ! elm || elm.isHidden() ) {
		elm = document.getElementById(id);
		isTinyMCE = false;
	}else isTinyMCE = true;
	tmpFocus = elm
	elm.focus();
	if (elm.createTextRange) {
		var range = elm.createTextRange();
		range.move("character", elm.value.length);
		range.select();
	} else if (elm.setSelectionRange) {
		elm.setSelectionRange(elm.value.length, elm.value.length);
	}
});
}




function thickbox(link) {

//alert('444');////////////////////////////////	

var t = link.title || link.name || null;
var a = link.href || link.alt;
var g = link.rel || false;
tb_show(t,a,g);
link.blur();
return false;
}

var tinyMCEID = new Array();
// ]]>
</script>

<?php
}


add_action( 'simple_edit_form',  'xinsert_custom_field_func2');
add_action( 'edit_form_advanced', 'xinsert_custom_field_func2');
add_action( 'edit_page_form', 'xinsert_custom_field_func2');

//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
//add complemento para plugin more field
function xinsert_custom_field_func() { ?>

<script type="text/javascript">
// <![CDATA[

jQuery('.xedButtonPreview').css({'background-color':'#E9E9E9' ,'border-bottom-color':'#FF0000','border-color':'#DFDFDF','color':'#333333'});			

function send_to_custom_fieldxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(h) {
if ( tmpFocus ) ed = tmpFocus;
else if ( typeof tinyMCE == "undefined" ) ed = document.getElementById("content");
else { ed = tinyMCE.get("content"); if(ed) {if(!ed.isHidden()) isTinyMCE = true;}}
if ( typeof tinyMCE != "undefined" && isTinyMCE && !ed.isHidden() ) {
	ed.focus();
	//if (tinymce.isIE)
		//ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark);
	if ( h.indexOf("[caption") != -1 )
		h = ed.plugins.wpeditimage._do_shcode(h);
	ed.execCommand("mceInsertContent", false, h);
} else {
	if ( tmpFocus ) edInsertContent(tmpFocus, h);
	else edInsertContent(edCanvas, h);
}
tb_remove();
tmpFocus = undefined;
isTinyMCE = false;
}
jQuery(".thickbox").bind("click", function (e) {
tmpFocus = undefined;
isTinyMCE = false;
});
var isTinyMCE;
var tmpFocus;
function focusTextArea(id) {
jQuery(document).ready(function() {
	if ( typeof tinyMCE != "undefined" ) {
		var elm = tinyMCE.get(id);
	}
	if ( ! elm || elm.isHidden() ) {
		elm = document.getElementById(id);
		isTinyMCE = false;
	}else isTinyMCE = true;
	tmpFocus = elm
	elm.focus();
	if (elm.createTextRange) {
		var range = elm.createTextRange();
		range.move("character", elm.value.length);
		range.select();
	} else if (elm.setSelectionRange) {
		elm.setSelectionRange(elm.value.length, elm.value.length);
	}
});
}
function switchMode(id,class_botton) {
var ed = tinyMCE.get(id);


if ( ! ed || ed.isHidden() && class_botton == 'xedButtonPreview'  ) {
	//alert('111 isHidden');
	//document.getElementById(id).value = switchEditors.wpautop(document.getElementById(id).value);
	if ( ed ) { 
	//alert('SIM Hidden 111');
	jQuery('#xpatch_xedButton').css({'display': 'none' });
jQuery('.xedButtonPreview').css({'background-color':'#E9E9E9' ,'border-bottom-color':'#ff0000','border-color':'#DFDFDF','color':'#333333'});			
jQuery('.xedButtonHTML').css({'background-color':'#F1F1F1' ,'border-bottom-color':'#ff0000','border-color':'#DFDFDF','color':'#999999'});					
	jQuery('#editorcontainer_'+id).prev().hide(); ed.show(); 
	}else {
	//	alert('SIM Hidden 222');
		tinyMCE.execCommand("mceAddControl", false, id);
		}
} else if( class_botton == 'xedButtonHTML' ){

	//alert('NAO Hidden xedButtonHTML: '  );

	jQuery('#xpatch_xedButton').css({'display': 'block' });
	jQuery('.xedButtonHTML').css({'background-color':'#E9E9E9' ,'border-bottom-color':'#ff0000','border-color':'#DFDFDF','color':'#333333'});			
	jQuery('.xedButtonPreview').css({'background-color':'#F1F1F1' ,'border-bottom-color':'#ff0000','border-color':'#DFDFDF','color':'#999999'});					
	ed.hide(); jQuery('#editorcontainer_'+id).prev().show(); document.getElementById(id).style.color="#000000";

	jQuery('textarea.xkey2').cols = '100%';



	cols
}


}
function thickbox(link) {
var t = link.title || link.name || null;
var a = link.href || link.alt;
var g = link.rel || false;
tb_show(t,a,g);
link.blur();
return false;
}

var tinyMCEID = new Array();
// ]]>
</script>

<?php
}


//add_action( 'simple_edit_form',  'xinsert_custom_field_func');
//add_action( 'edit_form_advanced', 'xinsert_custom_field_func');
//add_action( 'edit_page_form', 'xinsert_custom_field_func');

//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
//desativa autosave
function disable_autosave() {
wp_deregister_script('autosave');
}
add_action( 'wp_print_scripts', 'disable_autosave' );
//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
//add novo css login


     function mg_login() {
     $csslocation = get_settings('siteurl')
     . '/wp-content/themes/cliente-noticias/login.css';

     // print the css file
     echo '<link rel="stylesheet" type="text/css" href="'
     . $csslocation . '" />';
     }
     /* H O O K */

     add_action('login_head', 'mg_login');


//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
//SUBSTITUE admin SCHEME COLOR gray

$xline_break1 = "\r\n";
$xline_break2 = "\r\n\r\n";
$xinfo_url = get_bloginfo('stylesheet_directory');
$xinfo_wpurl = get_bloginfo('wpurl');
function xadmin_color_scheme_func2() {



$plugin_url = get_bloginfo('stylesheet_directory');

wp_admin_css_color(
	'fresh',
	__('Gray'),
	$plugin_url . '/admin_css_brazil3.css',
	array(
		'#DA1527',
		'#ff8474',
		'#E0EBF1',
		'green;border-color:#3005eb;background:transparent url('.$plugin_url.'/flag_br.gif) center center no-repeat;'
)


);



}



function xadmin_color_scheme_func() {



$plugin_url = get_option( 'siteurl' ) . '/wp-content/plugins/admin_css_brazil';

	$plugin_url = get_bloginfo('stylesheet_directory');
wp_admin_css_color(
	'fresh',
	__('Gray'),
	$plugin_url . '/wp-admin-brazil3.css',
	array(
		'#DA1527',
		'#ff8474',
		'#E0EBF1',
		'green;border-color:#3005eb;background:transparent url('.$plugin_url.'/flag_br.gif) center center no-repeat;'
)


);



}

add_action('admin_init','xadmin_color_scheme_func');/**/

//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk ini
/* <?php ?> */
//SUBSTITUE ADMIN LOGO
function xadmin_logo_func() { 
echo '
<style type="text/css">
#header-logo{
background:url('. get_bloginfo('stylesheet_directory') .'/images/wphead_logo_cliente.jpg) left center no-repeat;
width:176px;
height:46px;
}
</style>';



}
add_action('admin_head', 'xadmin_logo_func', 11);/**/
//mk fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x ini
//remove o paragrafo do excerpt
remove_filter('the_excerpt', 'wpautop');/**/
remove_filter('the_content', 'wptexturize');
remove_filter('the_content', 'wpautop');//remove_filter('the_content', 'wptexturize');
//mk x fim
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//mk x fim
function frommail_func($email){
return "noreply@clientedesignstudio.com.br";
}
function frommailname_func($name){
return utf8_encode("Nome do Cliente");
}
//add_filter('wp_mail_from','frommail_func');
//add_filter('wp_mail_from_name','frommailname_func');
//mk x fim
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//EMPRESA XXXXXX INI


//filtra email

function handle_wp_mail($atts) {
   /*"Your username and password" is the subject of the Email WordPress send from "function wp_new_user_notification" in file "wp-includes/pluggable.php"*/




$atts['subject'] = str_replace(utf8_encode('[Nome do Cliente]'), ' ', $atts ['subject']);

/*/EMPRESA LOG INI/////////////////////////////////////////////////////////////////////////////////////////////////////////////

$xattsI= implode(",",$atts);
// $xattsE= explode("-",$atts);
xgeralog(
"CHECK 888 handle_wp_mail \r\n
xattsI-> ".$xattsI."\r\n
\r\n"	 
);
//EMPRESA LOG INI////////////////////////////////////////////////////////////////////////////////////////////////////////////*/




/*
//filtra subject e-mail para admin
   if (isset ($atts ['subject']) && substr_count($atts ['subject'], utf8_encode('[Nome do Cliente] Registro de novo usuário') )>0 ) {

if (isset($atts['subject'])) {
 //  $atts['subject'] = utf8_encode('Registro de novo usuário');
}


}

*/




//filtra subject e-mail para usuario
/*
   if (isset ($atts ['subject']) && substr_count($atts ['subject'], utf8_encode('[Nome do Cliente] Seu nome de usuário e senha') )>0 ) {

if (isset($atts['message'])) {
	//$atts['message'] = 'new bady';
}

if (isset($atts['subject'])) {
  // $atts['subject'] = utf8_encode('Seu nome de usuário e senha');
}


   }
*/	

   return ($atts);
}


add_filter('wp_mail','handle_wp_mail');

//EMPRESA XXXXXX FIM
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

















//muda e remove posicoes menu admin
if (!function_exists('change_post_links')) {



function change_post_links() {

return;
	global $menu, $submenu, $wp_taxonomies;



//armazena menu para  uso
	$menu4 = $menu[4];
	$menu5 = $menu[5];
	$menu6 = $menu[6];
	$menu7 = $menu[7];
	$menu8 = $menu[8];
	$menu9 = $menu[9];
	$menu10 = $menu[10];
	$menu11 = $menu[11];
	$menu15 = $menu[15];
	$menu20 = $menu[20];
	$menu25 = $menu[25];


//remove menu
	//unset($menu[4]);//separador			
	unset($menu[5]);//posts
	unset($menu[6]);//arquitetura
	unset($menu[7]);//moveis		
	unset($menu[8]);//noticias				
	unset($menu[9]);//eventos
	unset($menu[10]);//midia		
	unset($menu[11]);//imprensa				

	//unset($menu[15]);//links

	unset($menu[20]);//pages

	//unset($menu[25]);//comentario	



//reorganiza menu
	$menu[5] = $menu8;
	$menu[6] = $menu9;
	$menu[7] = $menu6;
	$menu[8] = $menu7;
	$menu[9] = $menu11;

$menu[10] = $menu4; //substititue page nao usado por separador
	$menu[11] = $menu5;
	//$menu[15] = $menu15;
$menu[20] = $menu10;
	//$menu[25] = $menu25;



	//unset($menu[8]);//noticias	
	//$menu[8] = array(__('Posts'), 'edit_posts', 'edit.php', '', 'menu-top', 'menu-posts', 'div');


	// Change menu order to reflect new positions

	//$menu[20] = array(__('Posts'), 'edit_posts', 'edit.php', '', 'menu-top', 'menu-posts', 'div');
	//$submenu['edit.php'][5]  = array(__('Edit'), 'edit_posts', 'edit.php');
	//$submenu['edit.php'][10]  = array(_c('Add New|post'), 'edit_posts', 'post-new.php');
	//$submenu['edit.php'][50] = array( __('Categories'), 'manage_categories', 'categories.php' );
}






}

add_action('admin_menu', 'change_post_links');













//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//EMPRESA XXXXXX INI

function xgeralog($xcontent){
$fh = fopen("making_log_emails.txt", "a");if($fh==false)die("unable to create file");if($error){}else{}
$dados = $xcontent.'\r\n';
fwrite($fh,$dados);
fclose($fh);
}


//EMPRESA XXXXXX FIM
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//EMPRESA XXXXXX INI
//funcoes para get tag
// retrieve names of links
function get_a_content($file){
   $h1count = preg_match_all("/(<a.*>)(\w.*)(<.*>)/ismU",$file,$patterns);
   return $patterns[2][0];
}

// retrieve link destinations
function get_a_href($file){
   $h1count = preg_match_all('/(href=")(.*?)(")/i',$file,$patterns);
   return $patterns[2][0];
}

// get count of href's
function get_a_href_count($file){
   $h1count = preg_match_all('/<(a.*) href=\"(.*?)\"(.*)<\/a>/',$file,$patterns);
   return count($patterns[0]);
}

//get all additional tags inside a link tag
function get_a_additionaltags($file){
   $h1count = preg_match_all('/<(a.*) href="(.*?)"(.*)>(.*)(<\/a>)/',$file,$patterns);
   return $patterns[3];
}

// retrieve images on the site
function get_images($file){
 preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i',  $file  , $patterns  );/**/

   //$h1count = preg_match_all('/(<img)\s (src="([a-zA-Z0-9\.;:\/\?&=_|\r|\n]{1,})")/isxmU',$file,$patterns);
   //$res = array();
   //array_push($res,$patterns[3]);
   //array_push($res,count($patterns[3]));
   //return $res;
return $patterns;
}

//EMPRESA XXXXXX FIM
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////







?>

 

 

Valeu pela força!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Me parece que é essas linhas finais, a partir daqui:

 

//muda e remove posicoes menu admin

 

sugiro que vai ocultando/mostrando os menus (pois agora de cabeça não lembro o número do código do plugin.php, com isso você descobre qual é o link do menu e mostra novamente!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Amigo você tem certeza que você está como nível máximo de permissão no usuário? O Wordpress não oculta o menu apenas que tenha alterado algo.

Caso contrário, apenas o usuário que criou o Wordpress terá acesso, tem outras formas, criando usuário pelo banco de dados, mas você já sabe por onde procurar. :grin:/>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.