/**
 * portfolio_register()
 * 
 * @return
 */
function portfolio_register()
{
    $labels = array('name' => _x('Portfolio Items', 'post type general name', 'themeple'), 'singular_name' => _x('Portfolio Entry', 'post type singular name', 'themeple'), 'add_new' => _x('Add New', 'portfolio', 'themeple'), 'add_new_item' => __('Add New Portfolio Entry', 'themeple'), 'edit_item' => __('Edit Portfolio Entry', 'themeple'), 'new_item' => __('New Portfolio Entry', 'themeple'), 'view_item' => __('View Portfolio Entry', 'themeple'), 'search_items' => __('Search Portfolio Entries', 'themeple'), 'not_found' => __('No Portfolio Entries found', 'themeple'), 'not_found_in_trash' => __('No Portfolio Entries found in Trash', 'themeple'), 'parent_item_colon' => '');
    $slugRule = themeple_get_option("portfolio_slug");
    $args = array('labels' => $labels, 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => $slugRule, 'with_front' => true), 'query_var' => true, 'show_in_nav_menus' => false, 'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'comments'));
    register_post_type('portfolio', $args);
    register_taxonomy("portfolio_entries", array("portfolio"), array("hierarchical" => true, "label" => "Portfolio Categories", "singular_label" => "Portfolio Categories", "rewrite" => true, "query_var" => true));
}
 /**
  * themeple_routing_template()
  * 
  * @return
  */
 function themeple_routing_template($current_template = false)
 {
     global $themeple_config, $post;
     $dynamic_id = "";
     if (isset($post)) {
         $dynamic_id = $post->ID;
     }
     $frontpage = themeple_get_option('frontpage');
     $blogpage = themeple_get_option('blogpage');
     if ($frontpage && isset($themeple_config['new_query']) && $themeple_config['new_query']['page_id'] == $frontpage) {
         $dynamic_id = $frontpage;
     }
     if (themeple_check_dynamic_template($dynamic_id)) {
         get_template_part('template', 'dynamic');
         exit;
     }
     if (isset($post) && $blogpage == $post->ID && !isset($themeple_config['new_query'])) {
         $themeple_config['new_query'] = array('paged' => get_query_var('paged'), 'posts_per_page' => get_option('posts_per_page'));
         get_template_part('template', 'blog');
         exit;
     }
     $portfolios = themeple_get_option('portfolio');
     $c_portfolio = 0;
     if (is_array($portfolios)) {
         $c_portfolio = count($portfolios);
         foreach ($portfolios as $portfolio) {
             if (!empty($portfolio['portfolio_page'])) {
                 $themeple_config['conditionals'][$portfolio['portfolio_page']]['is_portfolio'] = true;
             }
         }
     }
     if (isset($post)) {
         $themeple_config['current_portfolio'] = themeple_get_option_array('portfolio', 'portfolio_page', get_the_ID());
     }
     if (isset($themeple_config['current_portfolio']['portfolio_page'])) {
         $themeple_config['conditionals']['is_portfolio'] = true;
         if (!session_id() && $c_portfolio > 1) {
             if ($c_portfolio > 1) {
                 $_SESSION['themeple_portfolio_page'] = get_the_ID();
             }
         }
         themeple_set_portfolio_query();
         get_template_part('template', 'portfolio');
         exit;
     }
 }
 /**
  * themeple_slideshow::themeple_slideshow()
  * 
  * @return
  */
 function themeple_slideshow($post_id = false, $slide_type = "")
 {
     global $themeple_config;
     if (!$post_id) {
         $post_id = themeple_get_post_id();
     }
     if (!$post_id) {
         return false;
     }
     if (isset($themeple_config['conditionals']) && isset($themeple_config['conditionals']['routed_frontpage'])) {
         if ($themeple_config['conditionals']['routed_frontpage']) {
             if (themeple_get_option('frontpage') == get_the_ID()) {
                 $post_id = themeple_get_option('frontpage');
             }
         }
     }
     $this->post_id = $post_id;
     $this->slides = themeple_post_meta($this->post_id, 'slideshow');
     $this->slide_type = themeple_post_meta($this->post_id, '_slideshow_type');
     if ($slide_type != "") {
         $this->slide_type = $slide_type;
     }
     $this->options['shadow'] = themeple_post_meta($this->post_id, '_slideshow_shadow');
     $this->options['slideshow_layout'] = themeple_post_meta($this->post_id, '_slideshow_layout');
     $this->slide_number = $this->slidecount();
     if ($this->slide_number) {
         $this->media_img_data = array_fill(0, $this->slide_number + 1, "");
     }
     if ($this->slide_type == "") {
         return false;
     }
     if ($this->slide_type != 'layer_slider' && $this->slide_type != 'revolution') {
         $this->{$this->slide_type}();
     } else {
         $this->options['layer_slider_id'] = themeple_post_meta($this->post_id, '_slideshow_layer_slider') + 1;
         $this->slide_number = 5;
         $this->options['revolution_alias'] = themeple_post_meta($this->post_id, '_slideshow_revolution');
     }
     if ($this->slide_number == 0) {
         return false;
     }
     return true;
 }
Example #4
0
                                    <nav>
                                    <?php 
    $args = array("theme_location" => "main", "container" => false, "fallback_cb" => 'themeple_fallback_menu');
    wp_nav_menu($args);
    ?>
                                    </nav>
                                </div></div></div></div><!-- #navigation -->
                         
                <?php 
}
?>
        <?php 
if (!(themeple_post_meta(themeple_get_post_id(), 'padding_slide') == 'yes' && themeple_post_meta(themeple_get_post_id(), 'section_or_no') == 'no') && themeple_get_option('header_shadow') != 'shadow_none') {
    ?>
        <div class="header_shadow"><span class="<?php 
    echo themeple_get_option('header_shadow');
    ?>
"></span></div>
        <?php 
}
?>
        <!-- Responsive Menu -->
        <?php 
get_template_part('template_inc/menu', 'small');
?>
        <!-- End Responsive Menu -->
    </div>
    <div class="top_wrapper">
    <?php 
if (themeple_post_meta(themeple_get_post_id(), 'page_creative_bool') == 'yes' && themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'no') {
    ?>
                                                  <li><?php 
        echo $count;
        ?>
 <?php 
        _e('Comments', 'themeple');
        ?>
</li>

                                                  <li><?php 
        echo get_the_date();
        ?>
</li>

                                                  <?php 
        if ($grid_blog_columns != 4 && ($grid_blog_columns != 3 && themeple_get_option('blog_sidebar_position') != 'fullsize')) {
            ?>

                                                  <li><a href="<?php 
            echo get_permalink();
            ?>
"><?php 
            _e('Leave a comment', 'themeple');
            ?>
</a></li> 

                                                  <?php 
        }
        ?>

                                                </ul>
                <?php 
    $args = array("theme_location" => "main", "container" => false, "fallback_cb" => 'themeple_fallback_menu');
    wp_nav_menu($args);
    ?>
                </nav>
            </div><!-- #navigation -->
            <?php 
    if (class_exists('Woocommerce')) {
        get_template_part('template_inc/woocommerce', 'cart');
    }
    ?>

             <!-- Search -->

            <?php 
    $right_search = themeple_get_option('right_search');
    if ($right_search == 'yes') {
        ?>

                    <div class="header_search">
                        <div class="right_search">
                            <i class="moon-search-2"></i>
                        </div>
                        <div class="right_search_container"><?php 
        get_search_form();
        ?>
 </div> 
                    </div>
                            <?php 
    }
    ?>
 /**
  * themeple_portfolio_custom_field()
  * 
  * @param bool $id
  * @param bool $portfolio_keys
  * @return
  */
 function themeple_portfolio_custom_field($id = false, $portfolio_keys = false)
 {
     if (!$id) {
         $id = get_the_ID();
     }
     if (!$id) {
         return false;
     }
     $output = "";
     $metas = themeple_post_meta($id);
     if (!$portfolio_keys) {
         $portfolio_keys = themeple_get_option('portfolio-meta', array(array('meta' => 'Skills Needed'), array('meta' => 'Client'), array('meta' => 'Project URL')));
     }
     if (empty($metas)) {
         return;
     }
     $p_metas = array();
     foreach ($metas as $key => $meta) {
         if (strpos($key, 'portfolio-meta-') !== false) {
             $newkey = str_replace("portfolio-meta-", "", $key);
             $p_metas[$newkey - 1] = $meta;
         }
     }
     $data = array();
     $counter = 0;
     foreach ($portfolio_keys as $key) {
         if (!empty($p_metas[$counter])) {
             if (themeple_portfolio_url($p_metas[$counter])) {
                 $linktext = $p_metas[$counter];
                 if (strlen($linktext) > 50) {
                     $linktext = "Link";
                 }
                 $p_metas[$counter] = "<a href='" . $p_metas[$counter] . "'>" . $linktext . "</a>";
                 $data[$counter] = array('meta' => "Link", 'value' => $p_metas[$counter]);
             }
             $data[$counter] = array('meta' => $key['meta'], 'value' => $p_metas[$counter]);
         }
         $counter++;
     }
     return $data;
 }
$cookie_sidebar = 'fullsize';
if (isset($_COOKIE['themeple_blog']) && $_COOKIE['themeple_blog'] != '') {
    $cookie_blog = $_COOKIE['themeple_blog'];
}
if (isset($_COOKIE['themeple_sidebar']) && $_COOKIE['themeple_sidebar'] != '') {
    $cookie_sidebar = $_COOKIE['themeple_sidebar'];
    if ($cookie_sidebar == 'none') {
        $spancontent = 12;
    }
}
get_header();
?>
 <?php 
$title = get_the_title();
$page_parents = page_parents();
$blog_style = themeple_get_option('blog_style');
$subtitle = themeple_post_meta(themeple_get_post_id(), 'page_header_desc');
?>
   
    <?php 
if (themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'yes') {
    $extra_class = '';
    $extra_style = '';
    if (themeple_post_meta(themeple_get_post_id(), 'header_type') == 'image') {
        $extra_style .= 'background-image:url(' . themeple_post_meta(themeple_get_post_id(), 'background_image') . ');background-repeat: no-repeat;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover; ';
        $extra_class .= ' background_image';
    } else {
        if (themeple_post_meta(themeple_get_post_id(), 'header_type') == 'color') {
            $extra_class .= ' colored_bg';
            $extra_style .= ' background:' . themeple_post_meta(themeple_get_post_id(), 'color_pick') . ';';
        }
Example #9
0
function add_page_header_class($classes = '')
{
    if (themeple_post_meta(themeple_get_post_id(), 'page_header_bool') == 'yes' || themeple_post_meta(themeple_get_option('blogpage'), 'page_header_bool') == 'yes' && is_single() || is_404() || is_search() || is_archive()) {
        $classes[] = 'page_header_yes';
    }
    return $classes;
}
Example #10
0
$themeple_config['multi_entry_page'] = false;
$themeple_config['current_sidebar'] = themeple_get_option('single_post_sidebar_pos');
$spancontent = 12;
if ($themeple_config['current_sidebar'] == 'fullsize') {
    $spancontent = 12;
} else {
    $spancontent = 9;
}
get_header();
$themeple_config['current_view'] = 'blog';
$highlight = themeple_post_meta(themeple_get_option('blogpage'), 'page_highlight');
$title = get_the_title(themeple_get_option('blogpage'));
$page_parents = page_parents();
$blog_style = themeple_get_option('blog_style');
$subtitle = themeple_post_meta(themeple_get_option('blogpage'), 'page_header_desc');
$id = themeple_get_option('blogpage');
?>

    
   
    <!-- Page Head -->
    
   
   <?php 
if (themeple_post_meta($id, 'page_header_bool') == 'yes') {
    $extra_class = '';
    $extra_style = '';
    if (themeple_post_meta($id, 'header_type') == 'image') {
        $extra_style .= 'background-image:url(' . themeple_post_meta($id, 'background_image') . ');background-repeat: no-repeat;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover; ';
        $extra_class .= ' background_image';
    } else {
 function services_steps($element)
 {
     extract($element['saved'][0]);
     $output = '<div class="span' . $dynamic_size . ' services_steps steps_nr_' . count($steps) . '">';
     $offset = 1 / count($steps);
     $i = 0;
     $base = themeple_get_option('base_color');
     $output .= '<div class="first_desc">';
     $output .= '<div class="header">';
     if (!empty($title)) {
         $output .= '<h1>' . $title . '</h1>';
     }
     if (!empty($little)) {
         $output .= '<h2>' . $little . '</h2>';
     }
     $output .= '</div>';
     $output .= '<p>' . $desc . '</p>';
     $output .= '</div>';
     foreach ($steps as $s) {
         $i++;
         $output .= '<div class="step">';
         $output .= '<i class="' . $s['icon'] . '"></i>';
         $output .= '<h2>' . $s['title'] . '</h2>';
         $output .= '<p>' . $s['desc'] . '</p>';
         $output .= '</div>';
     }
     $output .= '</div>';
     return $output;
 }
Example #12
0
    function widget($atts, $instance)
    {
        extract($atts, EXTR_SKIP);
        echo $before_widget;
        $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
        $text_description = empty($instance['text_description']) ? '' : $instance['text_description'];
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        $social_icons = themeple_get_option('social_icons');
        echo '<div class="row-fluid social_">';
        echo '<div class="span12">' . $text_description . '</div>';
        echo '</div>';
        echo '<div class="row-fluid social_ mail_sub">';
        /*	echo '<div class="span12"><input type="text" class="subscribe" id="appendedInputButton" value="Enter Your Email Address" /><a class="btn" href="">Send</a></div>';*/
        mailchimpSF_signup_form();
        echo '</div>';
        echo '<div class="row-fluid social_row">';
        echo '<div class="span12">';
        echo '<ul class="footer_social_icons">';
        foreach ($social_icons as $icon) {
            echo '<li class="' . $icon['social'] . '"><a href="' . $icon['link'] . '"><i class="moon-' . $icon['social'] . '"></i></a></li>';
        }
        echo '</ul>';
        echo '</div>';
        echo '</div>';
        ?>


        <?php 
        echo $after_widget;
    }
$elements[] = array("type" => "input_text", "id" => "biggest_title", "name" => __("Biggest Title", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v1"));
$elements[] = array("type" => "input_text", "id" => "second_title", "name" => __("Second Title", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v1"));
$elements[] = array("type" => "textarea", "id" => "right_description", "name" => __("Right Description", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v1"));
$elements[] = array("type" => "input_text", "id" => "link_title", "name" => __("Link Title", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v1"));
$elements[] = array("type" => "input_text", "id" => "link_href", "name" => __("Link", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v1"));
$elements[] = array("type" => "input_text", "id" => "title_1", "name" => __("Title 1", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v2"));
$elements[] = array("type" => "iconset", "id" => "icon_1", "name" => __("Icon 1", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v2"));
$elements[] = array("type" => "input_text", "id" => "title_2", "name" => __("Title 2", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v2"));
$elements[] = array("type" => "iconset", "id" => "icon_2", "name" => __("Icon 2", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v2"));
$elements[] = array("type" => "input_text", "id" => "title_3", "name" => __("Title 3", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v2"));
$elements[] = array("type" => "iconset", "id" => "icon_3", "name" => __("Icon 3", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v2"));
$elements[] = array("type" => "input_text", "id" => "title_4", "name" => __("Title 4", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v2"));
$elements[] = array("type" => "iconset", "id" => "icon_4", "name" => __("Icon 4", 'themeple'), "slug" => "header_options", "required" => array("header_type", "v2"));
$elements[] = array("type" => "switchbutton", "id" => "big_title_bool", "std" => "no", "name" => __("Do you want Big Title on Top ?", 'themeple'), "slug" => "big_title_op");
$elements[] = array("type" => "textarea", "id" => "big_title", "std" => "", "name" => __("Text", 'themeple'), "slug" => "big_title_op", "required" => array('big_title_bool', 'yes'));
$elements[] = array("type" => "switchbutton", "id" => "page_header_bool", "std" => "yes", "name" => __("Do you want page Header?", 'themeple'), "slug" => "page_header");
$elements[] = array("type" => "switchbutton", "id" => "page_header_animated", "std" => "no", "name" => __("Animated?", 'themeple'), "slug" => "page_header", "required" => array('page_header_bool', 'yes'));
$elements[] = array("type" => "select", "id" => "header_type", "std" => "color", "no_first" => true, "name" => __("Background Color or Background Image ?", 'themeple'), "subtype" => array('Background Color' => 'color', 'Background Image' => 'image'), "required" => array('page_header_bool', 'yes'), "slug" => "page_header");
$elements[] = array("type" => "colorpicker", "id" => "color_pick", "std" => "#f7f7f7", "name" => __("Select the color", 'themeple'), "required" => array('header_type', 'color'), "slug" => "page_header");
$elements[] = array("type" => "upload", "btn_text" => "Upload", "id" => "background_image", "std" => THEMEPLE_BASE_URL . "img/default_header.jpg", "name" => __("Upload The Background", 'themeple'), "required" => array('header_type', 'image'), "slug" => "page_header");
$elements[] = array("type" => "select", "subtype" => array("Centered" => 'centered', 'Full' => 'full'), "id" => "centered", "std" => "full", "name" => __("Centered or full?", 'themeple'), "required" => array('header_type', 'image'), "slug" => "page_header");
$elements[] = array("type" => "input_text", "id" => "author_project", "std" => "", "name" => __("Project Author", 'themeple'), "slug" => "project_info");
$portfolio_metas = themeple_get_option('portfolio-meta', array(array('meta' => 'Client'), array('meta' => 'Skills'), array('meta' => 'URL')));
$counter = 0;
foreach ($portfolio_metas as $p_meta) {
    if (!empty($p_meta['meta'])) {
        $counter++;
        $elements[] = array("name" => $p_meta['meta'], "slug" => "portfolio-meta", "desc" => "", "id" => "meta_{$counter}", "std" => "", "type" => "textarea");
    }
}
$boxes[] = array('title' => __('Portfolio Meta Information', 'themeple'), 'id' => 'portfolio-meta', 'page' => array('portfolio'), 'context' => 'normal', 'priority' => 'high');
<?php

global $themeple_config;
do_action('themeple_excecute_query_var_action', 'loop-index');
$avatar_bool = themeple_get_option('avatar_bool');
if (isset($_COOKIE['authimg']) && !empty($_COOKIE['authimg'])) {
    $avatar_bool = $_COOKIE['authimg'];
}
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $post_id = get_the_ID();
        $title = get_the_title();
        $content = get_the_content();
        $content = str_replace(']]>', ']]&gt;', apply_filters('the_content', $content));
        $post_format = get_post_format($post_id);
        if (strlen($post_format) == 0) {
            $post_format = 'standart';
        }
        $count = 0;
        $comment_entries = get_comments(array('type' => 'comment', 'post_id' => $post->ID));
        if (count($comment_entries) > 0) {
            foreach ($comment_entries as $comment) {
                if ($comment->comment_approved) {
                    $count++;
                }
            }
        }
        ?>

        
   <?php 
$new_color = colourBrightness($base_color, 0.6);
$new = HexToRGB($new_color);
$new_color2 = colourBrightness($base_color, 0.03);
?>

</style>


 		<?php 
$font = themeple_get_option('font_page');
?>

        <?php 
$font_head = themeple_get_option('font_headings');
?>



        <?php 
if ($font != 'standart') {
    ?>

        <link href='http://fonts.googleapis.com/css?family=<?php 
    echo str_replace(" ", "+", $font);
    ?>
:100,400,300,500,600,300italic' rel='stylesheet' type='text/css' />

        <?php 
}
if (count($categories) > 0) {
    echo '<!-- Portfolio Filter --><nav id="blog-filter" class="">';
    echo '<ul class="">';
    echo '<li class="active" data-category="cat-all">' . __('View All', 'themeple') . '</li>';
    foreach ($categories as $cat) {
        echo '<li class="" data-category="' . $cat->category_nicename . '">' . $cat->cat_name . '</li>';
    }
    echo '</ul>';
    echo '</nav>';
}
echo '<div class="blog_masonry">';
if (have_posts()) {
    $i = 0;
    while (have_posts()) {
        the_post();
        $grid_blog_columns = themeple_get_option('grid_blog_columns');
        $post_id = get_the_ID();
        $title = get_the_title();
        $content = get_the_content();
        $content = str_replace(']]>', ']]&gt;', apply_filters('the_content', $content));
        $post_format = get_post_format($post_id);
        if (strlen($post_format) == 0) {
            $post_format = 'standart';
        }
        $count = 0;
        $comment_entries = get_comments(array('type' => 'comment', 'post_id' => $post->ID));
        if (count($comment_entries) > 0) {
            foreach ($comment_entries as $comment) {
                if ($comment->comment_approved) {
                    $count++;
                }
Example #17
0
<?php

global $themeple_config;
do_action('themeple_routing_template', 'page');
$themeple_config['current_view'] = 'page';
$meta = themeple_get_option('bbpress_sidebar_position');
if (isset($meta)) {
    $themeple_config['current_sidebar'] = $meta;
}
$spancontent = 12;
if (isset($themeple_config['current_sidebar']) && $themeple_config['current_sidebar'] == 'fullsize') {
    $spancontent = 12;
} elseif (isset($themeple_config['current_sidebar']) && ($themeple_config['current_sidebar'] == 'sidebar_left' || $themeple_config['current_sidebar'] == 'sidebar_right')) {
    $spancontent = 9;
}
get_header();
?>



    



        <?php 
$title = get_the_title();
$page_parents = page_parents();
$subtitle = themeple_post_meta(themeple_get_post_id(), 'page_header_desc');
?>

Example #18
0
                                                    <?php 
                $google_plus_shares = '<a href="https://plus.google.com/share?url=' . get_permalink() . '" target="_blank">';
                $facebook_shares = '<a href="http://www.facebook.com/sharer.php?u=' . get_permalink() . '" target="_blank">';
                $twitter_shares = '<a href="http://twitter.com/home?status=' . get_the_title() . ' ' . get_permalink() . '" target="_blank">';
                $linkedin_shares = '<a href="http://linkedin.com/shareArticle?mini=true&amp;url=' . get_permalink() . '&title=' . get_the_title() . '" target="_blank">';
                $reddit_shares = '<a href="http://reddit.com/submit?url=' . get_permalink() . '&title=' . get_the_title() . '" target="_blank">';
                $tumblr_shares = '<a href="http://www.tumblr.com/share/link?url=' . get_permalink() . '&name=' . get_the_title() . '&description=' . get_the_content() . '" target="_blank">';
                $pinterest_shares = '<a href="http://pinterest.com/pin/create/button/?url=' . get_permalink() . '&description=' . get_the_title() . '&media=' . wp_get_attachment_url(get_post_thumbnail_id()) . '" target="_blank">';
                $digg_shares = '<a href="http://www.digg.com/submit?url=' . get_permalink() . ' " target="_blank">';
                $mail_shares = '<a href="mailto:?subject=' . get_the_title() . '&body=' . get_permalink() . '">';
                ?>

                                                    <ul class="shares">
                                                        
                                                        <?php 
                $social_icons = themeple_get_option('social_icons');
                ?>
       
                                                        <?php 
                $i = 0;
                if (!empty($social_icons)) {
                    foreach ($social_icons as $icon) {
                        if (isset($icon['social']) && $icon['sharebutton'] == 'yes') {
                            $i++;
                            ?>
                                                                
                                                            <?php 
                            $link_shares = ${$icon['social'] . '_shares'};
                            ?>

                                                             <li class="<?php 
 /**
  * themeple_check_custom_widget()
  * 
  * @param mixed $area
  * @param string $return
  * @return
  */
 function themeple_check_custom_widget($area, $return = 'title')
 {
     $special_id_string = "";
     if ($area == 'page') {
         $id_array = themeple_get_option('widget_pages');
     } else {
         if ($area == 'cat') {
             $id_array = themeple_get_option('widget_categories');
         } else {
             if ($area == 'dynamic_template') {
                 global $controller;
                 $dynamic_widgets = array();
                 foreach ($controller->options as $option_parent) {
                     foreach ($option_parent as $key => $element_data) {
                         if (isset($element_data[0]) && is_array($element_data) && strpos($key, 'widget') !== false) {
                             if (!empty($element_data[0]['dynamic_sidebar'])) {
                                 $dynamic_widgets[] = $element_data[0]['dynamic_sidebar'];
                             }
                         }
                     }
                 }
                 return $dynamic_widgets;
             }
         }
     }
     if (is_array($id_array)) {
         foreach ($id_array as $special) {
             if (isset($special['widget_' . $area]) && $special['widget_' . $area] != "") {
                 $special_id_string .= $special['widget_' . $area] . ",";
             }
         }
     }
     $special_id_string = trim($special_id_string, ',');
     $clean_id_array = explode(',', $special_id_string);
     if ($return != 'title') {
         return $clean_id_array;
     }
     if (is_page($clean_id_array)) {
         return get_the_title();
     } else {
         if (is_category($clean_id_array)) {
             return single_cat_title("", false);
         }
     }
 }
 function themeple_list_simple_li($atts, $content = null, $shortcodename = "")
 {
     extract(shortcode_atts(array('title' => '', 'desc' => '', 'social' => 'no'), $atts));
     $output = '<li class="">';
     $output .= '<span class="title">' . $title . '</span>';
     if (!empty($desc)) {
         $output .= '<span class="desc">' . $desc . '</span>';
     }
     if ($social == 'yes') {
         $social_icons = themeple_get_option('social_icons');
         $output .= '<ul class="social_icons">';
         foreach ($social_icons as $icon) {
             $output .= '<li class="' . $icon['social'] . '"><a href="' . $icon['link'] . '"><i class="moon-' . $icon['social'] . '"></i></a></li>';
         }
         $output .= '</ul>';
     }
     $output .= '</span>';
     return $output;
 }
Example #21
0
echo themeple_get_option('copyright_logo');
?>
" class="copyright_logo" /><?php 
echo themeple_get_option('footer_cp');
?>
                        <div class="pull-right">
                           <?php 
dynamic_sidebar('Copyright Footer Sidebar');
?>
                        </div>
                    </div>
                    
                </div>
            </div>
        </div><!-- #copyright -->

    </footer><!-- #footer -->
</div>

<?php 
$layout = themeple_get_option('overall_layout');
if ($layout == 'boxed') {
    ?>
</div>

<?php 
}
wp_footer();
?>
</body>
</html>
<?php

if (function_exists('register_sidebar')) {
    register_sidebar(array('name' => __('Sidebar Blog', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>'));
    register_sidebar(array('name' => __('Sidebar Pages', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>'));
    register_sidebar(array('name' => __('Sidebar Portfolio', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>'));
    if (class_exists('woocommerce')) {
        register_sidebar(array('name' => __('Sidebar Woocommerce', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>'));
    }
    register_sidebar(array('name' => __('Top Header Left', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '', 'after_title' => ''));
    register_sidebar(array('name' => __('Top Header Right', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '', 'after_title' => ''));
    register_sidebar(array('name' => __('Header Right Widgetized', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '', 'after_title' => ''));
    register_sidebar(array('name' => __('Bbpress Sidebar', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>'));
    $footer_columns = themeple_get_option('footer_number_columns', '2');
    for ($i = 1; $i <= $footer_columns; $i++) {
        register_sidebar(array('name' => 'Footer - column' . $i, 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>'));
    }
    register_sidebar(array('name' => __('Copyright Footer Sidebar', 'themeple'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '', 'after_title' => ''));
    $id_array = themeple_check_custom_widget('page', 'ids');
    if (isset($id_array[0])) {
        foreach ($id_array as $page_id) {
            if ($page_id != "") {
                register_sidebar(array('name' => __('Page', 'themeple') . ': ' . get_the_title($page_id) . '', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>'));
            }
        }
    }
    $id_array = themeple_check_custom_widget('cat', 'ids');
    if (isset($id_array[0])) {
        foreach ($id_array as $cat_id) {
            if ($cat_id != "") {
                register_sidebar(array('name' => __('Category', 'themeple') . ': ' . get_the_category_by_ID($cat_id) . '', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h6 class="widget-title">', 'after_title' => '</h6>'));
<?php

global $themeple_config;
get_header();
$themeple_config['current_sidebar'] = themeple_get_option('single_portfolio_sidebar_pos');
$title = get_the_title();
$metas = themeple_portfolio_custom_field(get_the_ID());
$cats = wp_get_object_terms(get_the_ID(), 'portfolio_entries');
$used_template = themeple_get_option_array('portfolio', 'portfolio_cats', $cats[0]->term_id, true);
$title = get_the_title();
$page_parents = page_parents();
$subtitle = themeple_post_meta(get_the_ID(), 'desc');
?>

   
    <!-- Page Head -->
    
    
    <!-- Page Head -->

    <!-- Page Head -->
    
    <?php 
if (themeple_post_meta($used_template['portfolio_page'], 'page_header_bool') == 'yes') {
    $extra_class = '';
    $extra_style = '';
    if (themeple_post_meta($used_template['portfolio_page'], 'header_type') == 'image') {
        $extra_style .= 'background-image:url(' . themeple_post_meta($used_template['portfolio_page'], 'background_image') . ');background-repeat: no-repeat;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover; ';
        $extra_class .= ' background_image';
    } else {
        if (themeple_post_meta($used_template['portfolio_page'], 'header_type') == 'color') {
</h5><p class="content"><?php 
echo get_the_content();
?>
</p>
                       
                    </div>
                </div>
                <div class="row-fluid row-dynamic-el">
                   <div class="span12">
                    <h5><?php 
_e('Project Details', 'themeple');
?>
</h5>
                    <div class="accordion style_1" id="project_details">
                        <?php 
$op_metas = themeple_get_option('portfolio-meta');
$nr_metas = count($op_metas);
for ($i = 0; $i < $nr_metas; $i++) {
    ?>
                        <div class="accordion-group">
                            <div class="accordion-heading <?php 
    if ($i == 0) {
        echo 'in_head';
    }
    ?>
">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#project_details" href="#project<?php 
    echo $i + 5000;
    ?>
"><?php 
    echo $op_metas[$i]['meta'];
Example #25
0
                 <div class="container">

                      <div class="row-fluid">

                         <div class="row-fluid row-dynamic-el " style="">

                                 <div class="container">

                                       <div class="row-fluid">
                                                
                                          <div class="span12 dynamic_page_header not_found_error">

                                                    
                                                          <h1><?php 
$error_msg = themeple_get_option('404_error_message');
echo $error_msg;
?>
</h1>
                                                          <div class="right_search_container">
                                                            <?php 
get_search_form();
?>
                                                          </div>

                                                   
                                         </div>
                                  </div>
                              </div>
                          </div>
                      </div>