Exemplo n.º 1
0
 public static function is_blog()
 {
     global $is_blog;
     if ($is_blog == true) {
         return true;
     }
     $blog_page_id = theme_get_option('blog', 'blog_page');
     if (empty($blog_page_id)) {
         return false;
     }
     if (wpml_get_object_id($blog_page_id, 'page') == get_queried_object_id()) {
         $is_blog = true;
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
<?php

get_header();
$page = theme_get_option('homepage', 'home_page');
if ($page) {
    $page_date = get_page(wpml_get_object_id($page, 'page'));
    $content = $page_date->post_content;
} else {
    $content = theme_get_option('homepage', 'content');
}
$layout = theme_get_option('homepage', 'layout');
theme_generator('SlideShow');
?>
<div id="page" class="home">
	<div class="inner <?php 
if ($layout == 'right') {
    ?>
right_sidebar<?php 
}
if ($layout == 'left') {
    ?>
left_sidebar<?php 
}
?>
">
		<div id="main">
			<div class="content">
				<?php 
echo apply_filters('the_content', stripslashes($content));
?>
				<div class="clearboth"></div>
Exemplo n.º 3
0
function is_blog()
{
    global $post;
    global $is_blog;
    if ($is_blog == true) {
        return true;
    }
    $blog_page_id = theme_get_option('blog', 'blog_page');
    if (isset($post->ID)) {
        if (wpml_get_object_id($blog_page_id, 'page') == $post->ID) {
            $is_blog = true;
            return true;
        }
    }
    return false;
}
Exemplo n.º 4
0
function suffusion_get_wpml_lang_object_ids($ids_array, $type)
{
    if (function_exists('icl_object_id')) {
        $res = array();
        foreach ($ids_array as $id) {
            $trans = wpml_get_object_id($id, $type, false);
            if (!is_null($trans) && !in_array($trans, $res)) {
                $res[] = $trans;
            }
        }
        return $res;
    }
    return $ids_array;
}