static function admin()
    {
        wp_enqueue_style('mythemes-google-fonts', 'http://fonts.googleapis.com/css?family=Montserrat:400,700|Noto+Sans:400,700,400italic,700italic');
        wp_enqueue_style('mythemes-effects', get_template_directory_uri() . '/media/css/effects.css');
        wp_enqueue_style('mythemes-header', get_template_directory_uri() . '/media/css/header.css');
        ?>
            <style>
                div.mythemes-header .valign-cell h1{
                    color: <?php 
        echo get_header_textcolor();
        ?>
;
                }
                div.mythemes-header .valign-cell p{
                    color: rgba(<?php 
        echo mythemes_hex2rgb(get_header_textcolor());
        ?>
 , 0.65 );
                }
                div.mythemes-header .valign-cell p.buttons a.btn{
                    background: <?php 
        echo myThemes::get('first-color');
        ?>
                }
                div.mythemes-header .valign-cell p.buttons a.btn.second-button{
                    background: <?php 
        echo myThemes::get('second-color');
        ?>
                }
            </style>
        <?php 
    }
예제 #2
0
    function _get( $setting, $template, $itemId ) {
        
        /* ONLYR FOR CATEGORY TEMPLATE */
        $rett = '';
        $id = $itemId;
        $temp = $template;
			
        switch( $template ){
	
            case 'front-page':
            case 'single':
            case 'page':
                $rett = meta::get( $itemId , 'post-' . $setting );
                
                if( $rett ) break;
                $rett = myThemes::get( $template . '-' . $setting  );
                
                if( $rett ) break;
                $rett = myThemes::get( $setting  );
                break;
            default: {		
                $rett = myThemes::get( $setting  );
                break;
            }
        }
		
        return $rett;
    }
예제 #3
0
function my_box_post_layout($post)
{
    $layouts = array('right' => get_template_directory_uri() . '/media/admin/images/left.layout.png', 'left' => get_template_directory_uri() . '/media/admin/images/right.layout.png', 'full' => get_template_directory_uri() . '/media/admin/images/full.layout.png');
    $sidebars = myThemes::get('sidebars-list');
    if (!is_array($sidebars)) {
        $sidebars = array();
    }
    $values = array('main-sidebar' => __('Main Sidebar', 'myThemes'), 'front-page-sidebar' => __('Front Page Sidebar', 'myThemes'), 'page-sidebar' => __('Page Sidebar', 'myThemes'), 'single-sidebar' => __('Single Sidebar', 'myThemes'), 'additional-sidebar' => __('Additional Sidebar', 'myThemes'));
    /* LAYOUT */
    echo ahtml::template(array('type' => array('template' => 'inline', 'input' => 'logic'), 'label' => __('Use custom layout', 'myThemes'), 'fieldName' => 'use-post-layout', 'action' => "{'t' : '.mythemes-post-layout' , 'f' : '-' }", 'value' => meta::get($post->ID, 'use-post-layout')));
    $use_post_layout = meta::get($post->ID, 'use-post-layout');
    if (strlen($use_post_layout) == 0 || $use_post_layout === "0") {
        $classes = 'mythemes-post-layout hidden';
    } else {
        $classes = 'mythemes-post-layout';
    }
    if ($post->post_type == 'post') {
        $type = 'single';
    } else {
        $type = $post->post_type;
    }
    $rett = ahtml::template(array('type' => array('template' => 'inline', 'input' => 'imageSelect'), 'values' => $layouts, 'coll' => 2, 'label' => __('Select Layout', 'myThemes'), 'fieldName' => 'post-layout', 'value' => meta::dget($post->ID, 'post-layout', myThemes::get($type . '-layout')), 'action' => "[ 'hs' , { 'full' : '.mythemes-layout-sidebar' } ]"));
    if (meta::get($post->ID, 'post-layout') == 'full') {
        $sidebarClass = 'mythemes-layout-sidebar hidden';
    } else {
        $sidebarClass = 'mythemes-layout-sidebar';
    }
    $rett .= ahtml::template(array('type' => array('template' => 'inline', 'input' => 'select'), 'values' => $values, 'label' => __('Select sidebar', 'myThemes'), 'fieldName' => 'post-sidebar', 'templateClass' => $sidebarClass, 'value' => meta::dget($post->ID, 'post-sidebar', myThemes::get($type . '-sidebar'))));
    echo ahtml::template(array('type' => array('template' => 'code'), 'content' => $rett, 'templateClass' => $classes));
}
예제 #4
0
 static function pageHeader($pageSlug)
 {
     echo '<div class="mytheme-admin-header">';
     echo '<span class="theme"><strong>' . myThemes::name() . '</strong> ' . __('Version', 'myThemes') . ': ' . myThemes::version() . '</span>';
     echo '<a href="http://mythem.es" target="_blank" title="Affordable WordPress Themes For Your Website or Blog"><img src="' . MYTHEMES_DEV_LOGO . '" /></a>';
     echo '<p><a href="http://mythem.es" target="_blank" title="Affordable WordPress Themes For Your Website or Blog">Affordable WordPress Themes For Your Website or Blog</a></p>';
     echo '</div>';
     echo '<table class="admin-body">';
     echo '<tr>';
 }
예제 #5
0
include $themeDir . '/fw/deb.class.php';
include $themeDir . '/fw/tools.class.php';
include $themeDir . '/fw/header.class.php';
/* READ OPTIONS | META */
include $themeDir . '/fw/sett.class.php';
include $themeDir . '/fw/meta.class.php';
include $themeDir . '/fw/cfg.php';
include $themeDir . '/fw/mythemes.class.php';
include $themeDir . '/fw/layout.class.php';
/* CUSTOM POSTS */
include $themeDir . '/cfg/admin/resources/boxes.php';
include $themeDir . '/cfg/admin/resources/posts.php';
include $themeDir . '/cfg/admin/resources/taxonomy.php';
/* SET DEFAULT VALUES FOR SETTINGS FROM PAGES */
include $themeDir . '/cfg/admin/default.php';
/* LOAD THEME ADMIN DATA */
if (is_admin()) {
    include $themeDir . '/fw/admin/ahtml.class.php';
    /* REGISTER PAGES */
    include $themeDir . '/cfg/admin/pages.php';
    include $themeDir . '/fw/admin/main.php';
}
/* load plugins */
include $themeDir . '/fw/plg.php';
/* INIT ACTIONS, SHORTCODES, AJAX */
myThemes::init_actions();
myThemes::init_filters();
/* REGISTER ( MENUS | SIDEBARS ) */
myThemes::reg_menus();
myThemes::reg_sidebars();
 function echoSidebar($position)
 {
     $sidebar = $this->_get('sidebar', $this->template, $this->itemid);
     if ($this->layout == $position) {
         echo '<aside class="col-sm-4 col-md-3 col-lg-3 sidebar-to-' . $position . '">';
         if (dynamic_sidebar($sidebar)) {
         } else {
             if (myThemes::get('default-content')) {
                 if (is_singular('post')) {
                     global $post;
                     /* FOR SINGLE */
                     /* META DETAILS */
                     echo '<div class="widget widget_post_meta">';
                     $name = get_the_author_meta('display_name', $post->post_author);
                     echo '<div>';
                     echo '<ul>';
                     edit_post_link('<i class="icon-pencil"></i>' . __('Edit', 'myThemes'), '<li>', '</li>');
                     echo '<li><a href="' . get_day_link(get_post_time('Y', false, $post->ID), get_post_time('m', false, $post->ID), get_post_time('d', false, $post->ID)) . '">';
                     echo '<time datetime="' . get_post_time('Y-m-d', false, $post->ID) . '"><i class="icon-calendar"></i>' . get_post_time(get_option('date_format'), false, $post->ID) . '</time></a></li>';
                     echo '<li><a href="' . get_author_posts_url($post->post_author) . '" title="' . __('Writed by ', 'myThemes') . ' ' . $name . '"><i class="icon-user-5"></i>' . $name . '</a></li>';
                     if ($post->comment_status == 'open') {
                         $nr = get_comments_number($post->ID);
                         if ($nr == 1) {
                             $comments = $nr . ' ' . __('Comment', 'myThemes');
                         } else {
                             $comments = $nr . ' ' . __('Comments', 'myThemes');
                         }
                         echo '<li><a href="' . get_comments_link($post->ID) . '"><i class="icon-comment"></i>' . $comments . '</a></li>';
                     }
                     echo '</ul>';
                     echo '</div>';
                     echo '</div>';
                     /* NEWSLETTER */
                     echo '<div class="widget widget_newsletter">';
                     echo '<h4 class="widget-title"><i></i>' . __('Newsletter', 'myThemes') . '</h4>';
                     echo '<span class="description">' . __('subscribe with FeedBurner', 'myThemes') . '</span>';
                     echo '<form class="subscribe" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="javascript:utils.feedburner( \'mythem_es\' );">';
                     echo '<p>';
                     echo '<input type="text" class="text" name="email" value="E-mail" onfocus="if (this.value == \'E-mail\') {this.value = \'\';}" onblur="if (this.value == \'\' ) { this.value = \'E-mail\';}"><span class="email"></span>';
                     echo '<input type="hidden" value="mythem_es" name="uri">';
                     echo '<input type="hidden" name="loc" value="en_US">';
                     echo '<button type="submit" value=""><i class="icon-right-open-big"></i></button>';
                     echo '</p>';
                     echo '</form>';
                     echo '</div>';
                     /* ARTICLE CATEGORIES */
                     if (has_category()) {
                         echo '<div class="widget widget_post_categories">';
                         echo '<h4 class="widget-title"><i></i>' . __('Article Categories', 'myThemes') . '</h4>';
                         echo '<div>';
                         echo '<ul>';
                         echo '<li>';
                         the_category('</li><li>');
                         echo '</li>';
                         echo '</ul>';
                         echo '</div>';
                         echo '</div>';
                     }
                     /* ARTICLE TAGS */
                     if (has_tag()) {
                         echo '<div class="widget widget_post_tags">';
                         echo '<h4 class="widget-title"><i></i>' . __('Article Tags', 'myThemes') . '</h4>';
                         echo '<div class="tagcloud">';
                         $tags = wp_get_post_tags($post->ID);
                         foreach ($tags as $t => $tag) {
                             echo '<a href="' . get_tag_link($tag->term_id) . '" title="' . $tag->count . ' topic">';
                             echo $tag->name;
                             echo '</a>';
                         }
                         echo '<div class="clear"></div>';
                         echo '</div>';
                         echo '</div>';
                     }
                 } else {
                     /* FOR OTHERS CASE */
                     /* SEARCH */
                     echo '<div class="widget widget_search">';
                     get_template_part('searchform');
                     echo '</div>';
                     /* TAGS */
                     $tags = get_tags();
                     if (!empty($tags)) {
                         echo '<div id="tag_cloud" class="widget widget_tag_cloud">';
                         echo '<h4 class="widget-title"><i></i>' . __('Tags', 'myThemes') . '</h4>';
                         echo '<div class="tagcloud">';
                         foreach ($tags as $tag) {
                             echo '<a href="' . get_tag_link($tag->term_id) . '" title="' . $tag->count . ' ' . __('Topic', 'myThemes') . '" class="tag-link-' . $tag->term_id . '">';
                             echo $tag->name . '</a>';
                         }
                         echo '</div>';
                         echo '</div>';
                     }
                     /* CATEGORIES */
                     $categories = get_categories();
                     if (!empty($categories)) {
                         echo '<div id="categories" class="widget widget_categories">';
                         echo '<h4 class="widget-title"><i></i>' . __('Categories', 'myThemes') . '</h4>';
                         echo '<ul>';
                         foreach ($categories as $c) {
                             echo '<li class="cat-item cat-item-' . $c->term_id . '">';
                             echo '<a href="' . get_category_link($c->term_id) . '" title="' . __('View all posts filed under', 'myThemes') . ' ' . $c->name . '">' . $c->name . '</a>';
                             echo '</li>';
                         }
                         echo '</ul>';
                         echo '</div>';
                     }
                 }
             }
         }
         echo '<div class="clearfix"></div>';
         echo '</aside>';
         return;
     }
 }
예제 #7
0
                            }

                            the_content();
                        }
                        else{ /* SHOW DEFAULT CONTENT ON FRONT PAGE */ 
                            echo do_shortcode( myThemes::get( 'under-construction-default-text' , true ) );
                        }
                        echo '<div class="clear"></div>';    
                        echo '</div>';
                    ?>
                </div>
            </div>
        </div>	
        <div id="home-footer">
            <div class="menu">
                <nav class="inline linet">
                    <?php
                        $location = get_nav_menu_locations();
                        if( isset( $location[ 'under-construction-menu' ] ) && $location[ 'under-construction-menu' ] > 0 ) {
                            wp_nav_menu( array( 'theme_location' => 'under-construction-menu' ) );
                        }
                    ?>
                </nav>
            </div>    
            <p class="home-footer"> 
                <?php echo myThemes::cfg( 'copyright' ); ?>
            </p>
            <?php wp_footer(); ?>
        </div>
    </body>
</html>
예제 #8
0
$instagram = myThemes::get('instagram');
$vkontakte = myThemes::get('vkontakte');
$facebook = myThemes::get('facebook');
$evernote = myThemes::get('evernote');
$flattr = myThemes::get('flattr');
$picasa = myThemes::get('picasa');
$dribbble = myThemes::get('dribbble');
$soundcloud = myThemes::get('soundcloud');
$mixi = myThemes::get('mixi');
$stumbl = myThemes::get('stumbl');
$lastfm = myThemes::get('lastfm');
$gplus = myThemes::get('gplus');
$pinterest = myThemes::get('pinterest');
$smashing = myThemes::get('smashing');
$rdio = myThemes::get('rdio');
$rss = myThemes::get('rss');
?>

                        <div class="col-sm-6 col-md-6 col-lg-6">
                            <div class="mythemes-social">
                                <?php 
if (!empty($github)) {
    echo '<a href="' . $github . '" class="icon-github" target="_blank"></a>';
}
if (!empty($vimeo)) {
    echo '<a href="' . $vimeo . '" class="icon-vimeo" target="_blank"></a>';
}
if (!empty($twitter)) {
    echo '<a href="' . $twitter . '" class="icon-twitter" target="_blank"></a>';
}
if (!empty($renren)) {
예제 #9
0
        echo myThemes::get('first-button-label');
        ?>
</a> 
                                        <?php 
    }
    /* SECOND BUTTON */
    if (myThemes::get('show-second-button')) {
        ?>
                                                <a href="<?php 
        echo myThemes::get('second-button-url');
        ?>
" class="btn second-button" title="<?php 
        echo myThemes::get('second-button-desc');
        ?>
"><?php 
        echo myThemes::get('second-button-label');
        ?>
</a> 
                                        <?php 
    }
    ?>
                                    </p>
                            <?php 
}
?>
                        </div>
                    </div>
                </div>
            
        </div>
    </div>
 static function favicon()
 {
     if (myThemes::get('favicon')) {
         echo '<link rel="shortcut icon" href="' . myThemes::get('favicon') . '"/>';
     } else {
         if (file_exists(get_template_directory() . '/favicon.ico')) {
             echo '<link rel="shortcut icon" href="' . get_template_directory_uri() . '/favicon.ico"/>';
         }
     }
 }
 function my_wdg_newsletter()
 {
     /* INIT CONSTRUCTOR */
     $widget_ops = array('classname' => 'widget_newsletter', 'description' => __('Google FeedBurner Newsletter', 'myThemes'));
     $this->WP_Widget('my_wdg_newsletter', myThemes::group() . ' : ' . __('Newsletter', 'myThemes'), $widget_ops);
 }
예제 #12
0
<?php

if (!myThemes::get('show-bottom-meta')) {
    return;
}
if (is_singular('post') && (has_category() || has_tag())) {
    ?>
        <div class="post-meta-terms">
            <?php 
    if (is_singular('post') && has_category()) {
        echo '<div class="post-meta-categories">';
        echo '<strong><i class="icon-list"></i> ' . __('Categories', 'myThemes') . '</strong>: ';
        the_category(' ');
        echo '</div>';
    }
    if (is_singular('post') && has_tag()) {
        echo '<div class="post-meta-tags">';
        echo '<strong><i class="icon-tags"></i> ' . __('Post Tags', 'myThemes') . '</strong>: ';
        the_tags(' ', ' ', ' ');
        echo '</div>';
    }
    ?>
        </div>
<?php 
}
예제 #13
0
<?php

global $wpdb;
$cfg = array('editor' => array(), 'pages' => array('projects' => array('pageID' => myThemes::get('projects-page'), 'content' => array('location' => get_template_directory() . '/cfg/templates/page/projects.php'))), 'menus' => array('header-first' => __('Header first menu', 'myThemes')), 'sidebars' => array(array('name' => __('Main Sidebar', 'myThemes'), 'id' => 'main-sidebar', 'description' => __('Main Sidebar - is used by default for next templates: 404, Archive, Author, Category, Search and Tag.', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title"><i></i>', 'after_title' => '</h4>'), array('name' => __('Single Sidebar', 'myThemes'), 'id' => 'single-sidebar', 'description' => __('Single Sidebar - is used by default for single post.', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title"><i></i>', 'after_title' => '</h4>'), array('name' => __('Page Sidebar', 'myThemes'), 'id' => 'page-sidebar', 'description' => __('Single Sidebar - is used by default for page.', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title"><i></i>', 'after_title' => '</h4>'), array('name' => __('Front Page Sidebar', 'myThemes'), 'id' => 'front-page-sidebar', 'description' => __('Front Page Sidebar - is used by default for Front Page.', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title"><i></i>', 'after_title' => '</h4>'), array('name' => __('Additional Sidebar', 'myThemes'), 'id' => 'additional-sidebar', 'description' => __('Additional Sidebar - is used for additional cases.', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title"><i></i>', 'after_title' => '</h4>'), array('name' => __('Header - First Front Page Sidebar', 'myThemes'), 'id' => 'front-page-header-first', 'description' => __('Content for left front page header Sidebar', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'), array('name' => __('Header - Second Front Page Sidebar', 'myThemes'), 'id' => 'front-page-header-second', 'description' => __('Content for middle front page header Sidebar', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'), array('name' => __('Header - Third Front Page Sidebar', 'myThemes'), 'id' => 'front-page-header-third', 'description' => __('Content for right front page header Sidebar', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>'), array('name' => __('Footer - First Sidebar', 'myThemes'), 'id' => 'footer-first', 'description' => __('Content for first footer Sidebar', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h5>', 'after_title' => '</h5>'), array('name' => __('Footer - Second Sidebar', 'myThemes'), 'id' => 'footer-second', 'description' => __('Content for second footer Sidebar', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h5>', 'after_title' => '</h5>'), array('name' => __('Footer - Third Sidebar', 'myThemes'), 'id' => 'footer-third', 'description' => __('Content for third footer Sidebar', 'myThemes'), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h5>', 'after_title' => '</h5>')), 'custom-sidebars' => 'sidebars-list', 'actions' => array('wp_ajax_attach_to_post' => array('myThemes', 'attach_to_post')));
예제 #14
0
                                <div class="clear"></div>
                            </div>
                        </div><!-- end post -->

                    <?php endwhile; ?><!-- end loop post -->

                    <!-- Navigation-->
                    <div class="navigation">
                      <span class="previous-posts"><?php next_posts_link('&laquo; ' . __( 'Previous' , "mythemes" ) ) ?></span> <span class="next-posts"><?php previous_posts_link( __( 'Next' , "mythemes" ) . ' &raquo;') ?></span>
                    </div><!-- end navigation-->

                <?php else : ?>

                    <h2><?php _e( 'Not Found' , "mythemes" ); ?></h2>
                    <p><?php _e( 'We apologize but this page, post or resource does not exist or can not be found. Perhaps it is necessary to change the call method to this page, post or resource.' , "mythemes" ) ?></p>

            <?php endif; ?>
        </div>
        <?php
            if( myThemes::get( 'general-sidebar' ) == 'right' ) {
        ?>	
                <aside>
                    <?php get_sidebar(); ?>
                </aside>
        <?php		
                }
        ?>
        <div class="content-bottom"></div>
    </div>
<?php get_footer(); ?>
예제 #15
0
define('MYTHEMES_SHORT_PATH', true);
/* USED FOR DEBUG */
$themeDir = get_template_directory();
include $themeDir . '/fw/deb.class.php';
include $themeDir . '/fw/tools.class.php';
include $themeDir . '/fw/header.class.php';
/* READ OPTIONS | META */
include $themeDir . '/fw/sett.class.php';
include $themeDir . '/fw/meta.class.php';
include $themeDir . '/fw/cfg.php';
include $themeDir . '/fw/mythemes.class.php';
include $themeDir . '/fw/mythemes_layout.class.php';
/* CUSTOM POSTS */
include $themeDir . '/cfg/admin/resources/boxes.php';
/* SET DEFAULT VALUES FOR SETTINGS FROM PAGES */
include $themeDir . '/cfg/admin/default.php';
/* LOAD THEME ADMIN DATA */
if (is_admin()) {
    include $themeDir . '/fw/admin/ahtml.class.php';
    /* REGISTER PAGES */
    include $themeDir . '/cfg/admin/pages.php';
    include $themeDir . '/fw/admin/main.php';
}
/* load plugins */
include $themeDir . '/fw/plg.php';
/* INIT ACTIONS, SHORTCODES, AJAX */
myThemes::init_actions();
myThemes::init_filters();
/* REGISTER ( MENUS ) */
myThemes::reg_menus();
예제 #16
0
bloginfo('description');
?>
">
                        <?php 
bloginfo('name');
?>
                    </a>
                    </h2>
                    <p><?php 
bloginfo('description');
?>
 </p>
                    <?php 
get_template_part('searchform');
?>
                </div>
                <nav class="mythemes-nav-menu">
                    <?php 
$args = array('theme_location' => 'header', 'container_class' => 'mythemes-nav-wrapper', 'menu_class' => 'mythemes-list-menu');
$location = get_nav_menu_locations();
if (isset($location['header']) && $location['header'] > 0) {
    wp_nav_menu($args);
} else {
    $pages = get_posts(array('numberposts' => 4, 'post_type' => 'page', 'order' => 'ASC'));
    if (!empty($pages)) {
        echo '<div class="mythemes-nav-wrapper">';
        echo '<ul class="mythemes-list-menu">';
        foreach ($pages as $p => $item) {
            $classes = '';
            if (is_page($item->ID)) {
                $classes = 'current-menu-item';
 function my_wdg_website_description()
 {
     /* INIT CONSTRUCTOR */
     $widget_ops = array('classname' => 'website-description', 'description' => __('Website description', 'myThemes'));
     $this->WP_Widget('my_wdg_website_description', myThemes::group() . ' : ' . __('Website Description', 'myThemes'), $widget_ops);
 }
예제 #18
0
    }
}
?>

                            </nav>

                        </div>

                    </div>


                    <?php 
$show_header = myThemes::get('show-header');
$show_header_blog = $show_header && myThemes::get('show-header-blog');
$show_header_all = $show_header && myThemes::get('show-header-all');
$show_header_single = $show_header && myThemes::get('show-header-single');
$is_enb_front_page = get_option('show_on_front') == 'page';
$is_front_page = $is_enb_front_page && is_front_page();
if ($is_enb_front_page) {
    $is_blog_page = is_home();
} else {
    $is_blog_page = is_front_page();
}
$show_header_tmp = false;
if ($is_front_page && $show_header) {
    $show_header_tmp = true;
} else {
    if ($is_blog_page && $show_header_blog) {
        $show_header_tmp = true;
    } else {
        if (is_singular('post') && $show_header_single) {
    if (esc_attr($commenter['comment_author'])) {
        $name = esc_attr($commenter['comment_author']);
    } else {
        $name = __('Nickname ( required )', 'myThemes');
    }
    if (esc_attr($commenter['comment_author_email'])) {
        $email = esc_attr($commenter['comment_author_email']);
    } else {
        $email = __('E-mail ( required )', 'myThemes');
    }
    if (esc_attr($commenter['comment_author_url'])) {
        $web = esc_attr($commenter['comment_author_url']);
    } else {
        $web = __('Website', 'myThemes');
    }
    /* FIELDS */
    $fields = array('author' => '<div class="field">' . '<p class="comment-form-author input">' . '<input class="required span7" value="' . $name . '" onfocus="if (this.value == \'' . __('Nickname ( required )', 'myThemes') . '\') {this.value = \'\';}" onblur="if (this.value == \'\' ) { this.value = \'' . __('Nickname ( required )', 'myThemes') . '\';}" id="author" name="author" type="text" size="30"  />' . '</p>', 'email' => '<p class="comment-form-email input">' . '<input class="required span7" value="' . $email . '" onfocus="if (this.value == \'' . __('E-mail ( required )', 'myThemes') . '\') {this.value = \'\';}" onblur="if (this.value == \'\' ) { this.value = \'' . __('E-mail ( required )', 'myThemes') . '\';}" id="email" name="email" type="text" size="30" />' . '</p>', 'url' => '<p class="comment-form-url input">' . '<input class="span7" value="' . $web . '" onfocus="if (this.value == \'' . __('Website', 'myThemes') . '\') {this.value = \'\';}" onblur="if (this.value == \'\' ) { this.value = \'' . __('Website', 'myThemes') . '\';}" id="url" name="url" type="text" size="30" />' . '</p></div>');
    $rett = '<div class="textarea row-fluid"><p class="comment-form-comment textarea user-not-logged-in">';
    $rett .= '<textarea id="comment" name="comment" cols="45" rows="10" class="span12" aria-required="true"></textarea>';
    $rett .= '</p></div>';
    if (!myThemes::get('html-suggestions')) {
        $rett .= '<p class="comment-notes">' . __('You may use these HTML tags and attributes', 'myThemes') . ':</p>';
        $rett .= '<pre>';
        $rett .= htmlspecialchars('<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>');
        $rett .= '</pre>';
    }
    $args = array('title_reply' => __("Leave a reply", 'myThemes'), 'comment_notes_after' => '', 'comment_notes_before' => '<button type="submit" class="submit-comment">' . __('Comment', 'myThemes') . '</button><p class="comment-notes">' . __('Your email address will not be published.', 'myThemes') . '</p>', 'logged_in_as' => '<button type="submit" class="submit-comment">' . __('Comment', 'myThemes') . '</button><p class="logged-in-as">' . __('Logged in as', 'myThemes') . ' <a href="' . esc_url(home_url('/wp-admin/profile.php')) . '">' . get_the_author_meta('nickname', get_current_user_id()) . '</a>. <a href="' . wp_logout_url(get_permalink($post->ID)) . '" title="' . __('Log out of this account', 'myThemes') . '">' . __('Log out?', 'myThemes') . ' </a></p>', 'fields' => apply_filters('comment_form_default_fields', $fields), 'comment_field' => $rett, 'label_submit' => __('Comment', 'myThemes'));
    comment_form($args);
    echo '<div class="clearfix"></div>';
    echo '</div>';
}
<?php

if (dynamic_sidebar('footer-first')) {
    /* IF NOT EMPTY */
} else {
    /* IF EMPTY */
    if (myThemes::get('default-content')) {
        echo '<div class="widget website-description">';
        echo '<h1>';
        echo '<a href="' . esc_url(home_url('/')) . '" title="Verbo - premium wordpress theme">Verbo</a>';
        echo '</h1>';
        echo '<p>Verbo is clean white multipurpose WordPress theme with creative design.<br>';
        echo 'Theme comes with nice flat design concept and responsive layout.</p>';
        echo '</div>';
    }
}
예제 #21
0
?>
                            </nav>

                        </div>

                    </div>


                    <?php 
if (is_single() || (is_home() || is_front_page()) && !myThemes::get('show-header')) {
    ?>
                            <!-- SINGLE POST DELIMITER -->
                            <div class="row mythemes-delimiter no-padding">
                                <div class="col-lg-12">
                                    <div class="delimiter-item"></div>
                                </div>
                            </div>
                    <?php 
}
?>

                </div>
            </div>

            <?php 
if ((is_home() || is_front_page()) && myThemes::get('show-header')) {
    get_template_part('cfg/templates/header');
}
?>

        </header>
 function my_wdg_post_categories()
 {
     /* INIT CONSTRUCTOR */
     $widget_ops = array('classname' => 'widget_post_categories', 'description' => __('Use only for single template', 'myThemes'));
     $this->WP_Widget('my_wdg_post_categories', myThemes::group() . ' : ' . __('Post Categories', 'myThemes'), $widget_ops);
 }
?>
;
    }

    .btn.second-button,
    .button.second-button,
    .btn.hover-invert:hover,
    .button.hover-invert:hover,
    div.widget_post_tags div.tagcloud a,
    div.widget_tag_cloud div.tagcloud a,
    .content-border article div.post-meta-tags a,
    .content-border article div.post-meta-categories a:hover,
    div.comment-respond h3.comment-reply-title small a:hover{
        border-bottom: 1px solid <?php 
echo mythemes_adjustBrightness(myThemes::get('second-color'), -30);
?>
;
    }

    div.mythemes-header .valign-cell p.buttons a.btn:hover{
        box-shadow: 0px 0px 20px rgba( 0,0,0, <?php 
echo (int) myThemes::get('button-shadow-opacity') / 100;
?>
 );
    }

    <?php 
echo myThemes::get('css');
?>

</style>
예제 #24
0
    static function admin()
    {
        wp_enqueue_style('mythemes-google-fonts', 'http://fonts.googleapis.com/css?family=Quicksand:300,400,700|Roboto:400,300,100,500,700&subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese');
        wp_enqueue_style('mythemes-effects', get_template_directory_uri() . '/media/css/effects.css');
        wp_enqueue_style('mythemes-header', get_template_directory_uri() . '/media/css/header.css');
        $first_color = myThemes::get('first-color');
        $second_color = myThemes::get('second-color');
        ?>
                <style>
                    div.mythemes-header div.overflow-wrapper,
                    div.mythemes-header div.overflow-wrapper:after,
                    div.mythemes-header div.overflow-wrapper::before,
                    div.mythemes-header div.overflow-wrapper:before{
                        -moz-box-sizing: border-box;
                             box-sizing: border-box;
                    }
                    div.mythemes-header div.overflow-wrapper{
                        margin: 0px;
                    }
                    .mythemes-header-animation .mythemes-logo{
                        color: #<?php 
        echo get_header_textcolor();
        ?>
;
                    }
                    .mythemes-header-animation .mythemes-description{
                        color: rgba(<?php 
        echo mythemes_tools::hex2rgb(get_header_textcolor());
        ?>
 , 0.65 );
                    }
                    div.mythemes-header .valign-cell p.buttons a.btn{
                        background: <?php 
        echo myThemes::get('first-color');
        ?>
                    }
                    div.mythemes-header .valign-cell p.buttons a.btn.second-button{
                        background: <?php 
        echo myThemes::get('second-color');
        ?>
                    }
                    /* DARK BORDER BOTTOM */
                    .btn{
                        font-family: Quicksand, sans-serif, Arial, serif;
                        font-size: 13px;

                        padding: 12px 25px;
                        border-bottom: 2px solid <?php 
        echo mythemes_tools::brightness($first_color, -40);
        ?>
;
                    }

                    .btn.second-button{
                        border-bottom: 2px solid <?php 
        echo mythemes_tools::brightness($second_color, -40);
        ?>
;
                    }
                </style>
            <?php 
    }
예제 #25
0
<?php

if (!myThemes::get('show-top-meta')) {
    return;
}
?>
<div class="meta">
    <div class="row">
        <?php 
global $post;
?>
        <div class="col-xs-4  col-sm-4 col-md-4 col-lg-4">
        <time datetime="<?php 
echo get_post_time('Y-m-d', false, $post->ID);
?>
"><i class="icon-calendar"></i><?php 
echo get_post_time(get_option('date_format'), false, $post->ID);
?>
</time>
        </div>
        <?php 
if ($post->comment_status == 'open') {
    $nr = get_comments_number($post->ID);
    if ($nr == 1) {
        $comments = $nr . ' ' . __('Comment', 'myThemes');
    } else {
        $comments = $nr . ' ' . __('Comments', 'myThemes');
    }
    ?>
                <div class="col-xs-4  col-sm-4 col-md-4 col-lg-4">
                    <a class="comments" href="<?php 
예제 #26
0
     ),
     'label' => __( 'Upload logo' , "mythemes" ),
     'hint' => __( 'This logo will be used only for under construction side' , "mythemes" )
 );
 
 $sett[ 'activate' ] = array(
     'type' => array(
         'template' => 'inline',
         'input' => 'logic'
     ),
     'action' => "{'t' : '.mytheme-used-page' , 'f' : '-' }",
     'label' => __( 'Activate under construction template' , "mythemes" ),
     'hint' => __( 'It will activate only on front page' , 'mythemes' )
 );
 
 if( (boolean)myThemes::pget( 'under-construction-activate' ) ){
     $pageClass = 'mytheme-used-page';
 }
 else{
     $pageClass = 'mytheme-used-page hidden';
 }
 
 $sett[ 'default-text' ] = array(
     'type' => array(
         'template' => 'inline',
         'input' => 'textarea',
         'validator' => 'noesc'
     ),
     'templateClass' => $pageClass,
     'label' => __( 'Default under construction description' , "mythemes" )
 );
예제 #27
0
    $sidebarClass = 'front-page-sidebar';
}
$sett['front-page-sidebar'] = array('type' => array('template' => 'inline', 'input' => 'select'), 'templateClass' => $sidebarClass, 'values' => $values, 'label' => __('Front page sidebar', 'myThemes'));
/* PAGES LAYOUT */
$sett['page-title'] = array('type' => array('template' => 'code'), 'title' => __('Page Layout', 'myThemes'));
$sett['page-layout'] = array('type' => array('template' => 'inline', 'input' => 'imageSelect'), 'values' => $layouts, 'coll' => 3, 'label' => __('Pages layout', 'myThemes'), 'hint' => __('If not is set custom layout, will be used default layout.', 'myThemes'), 'action' => "[ 'hs' , { 'full' : '.page-sidebar' } ]");
if (myThemes::pget('page-layout') == 'full') {
    $sidebarClass = 'page-sidebar hidden';
} else {
    $sidebarClass = 'page-sidebar';
}
$sett['page-sidebar'] = array('type' => array('template' => 'inline', 'input' => 'select'), 'templateClass' => $sidebarClass, 'values' => $values, 'label' => __('Pages sidebar', 'myThemes'));
/* SINGLE POSTS */
$sett['single-title'] = array('type' => array('template' => 'code'), 'title' => __('Single Posts Layout', 'myThemes'));
$sett['single-layout'] = array('type' => array('template' => 'inline', 'input' => 'imageSelect'), 'values' => $layouts, 'coll' => 3, 'label' => __('Single posts layout', 'myThemes'), 'hint' => __('If not is set single post layout, will be used default layout.', 'myThemes'), 'action' => "[ 'hs' , { 'full' : '.single-sidebar' } ]");
if (myThemes::pget('single-layout') == 'full') {
    $sidebarClass = 'single-sidebar hidden';
} else {
    $sidebarClass = 'single-sidebar';
}
$sett['single-sidebar'] = array('type' => array('template' => 'inline', 'input' => 'select'), 'templateClass' => $sidebarClass, 'values' => $values, 'label' => __('Single posts sidebar', 'myThemes'));
/////////////////////////////////////////
/* SOCIAL SETTINGS */
$sett['social-settings-title'] = array('type' => array('template' => 'none'), 'content' => '<div style="padding-top: 80px;" class="title"><h2>' . __('Social', 'myThemes') . '</h2></div>');
$sett['github'] = array('type' => array('template' => 'inline', 'input' => 'text'), 'label' => __('Github URL profile', 'myThemes'));
$sett['vimeo'] = array('type' => array('template' => 'inline', 'input' => 'text'), 'label' => __('Vimeo URL profile', 'myThemes'));
$sett['twitter'] = array('type' => array('template' => 'inline', 'input' => 'text'), 'label' => __('Twitter URL profile', 'myThemes'));
$sett['renren'] = array('type' => array('template' => 'inline', 'input' => 'text'), 'label' => __('Renren URL profile', 'myThemes'));
$sett['skype'] = array('type' => array('template' => 'inline', 'input' => 'text'), 'label' => __('Skype URL profile', 'myThemes'));
$sett['linkedin'] = array('type' => array('template' => 'inline', 'input' => 'text'), 'label' => __('Linkedin URL profile', 'myThemes'));
$sett['behance'] = array('type' => array('template' => 'inline', 'input' => 'text'), 'label' => __('Behance URL profile', 'myThemes'));
예제 #28
0
        function comment( $comment, $args, $depth )
        {
            $GLOBALS['comment'] = $comment;
            switch ( $comment -> comment_type ) {
                case '' : {
                    echo '<li '; comment_class(); echo' id="li-comment-'; comment_ID(); echo '">';
                    echo '<div id="comment-'; comment_ID(); echo '" class="comment-box">';
                    echo '<header>';
                    echo '<span class="arrow"></span>';
                    echo myThemes::gravatar( $comment -> comment_author_email , 50 );
                    echo '<span class="comment-meta">';
                    echo '<time class="comment-time"><i class="icon-date"></i> ';
                    printf( '%1$s ' , get_comment_date() );
                    echo '</time>';
                    comment_reply_link( array_merge( $args , array( 
                        'reply_text' => __( 'Reply', 'mythemes' ),
                        'before' => '<span class="comment-replay">',
                        'after' => '</span>',
                        'depth' => $depth,
                        'max_depth' => $args['max_depth'] )
                    ) );
                    echo '</span>';
                    echo '<cite>';
                    echo get_comment_author_link( $comment -> comment_ID );
                    echo '</cite>';
                    echo '<div class="clear"></div>';
                    echo '</header>';

                    echo '<p class="comment-quote">';
                    if ( $comment -> comment_approved == '0' ) {
                        echo '<em class="comment-awaiting-moderation">';
                        _e( 'Your comment is awaiting moderation.' , 'mythemes' );
                        echo '</em>';
                    }
                    echo get_comment_text();            
                    echo '</p>';

                    echo '</div>';
                    echo '</li>';
                    break;
                }	
                case 'pingback'  :{
                }
                case 'trackback' : {
                    break;
                }
            }
        }
<?php

get_header();
?>

    <?php 
$title = myThemes::get('blog-title');
?>

    <div class="mythemes-page-header">
      <div class="container">
        	<div class="row">
				<div class="col-lg-12">
					<h1><?php 
echo $title;
?>
</h1>
					<nav class="mythemes-nav-inline">
				  	<ul class="mythemes-menu">
				    	<li><a href="<?php 
echo esc_attr(home_url('/'));
?>
" title="<?php 
_e('go home', 'myThemes');
?>
"><i class="icon-home"></i> <?php 
_e('Home', 'myThemes');
?>
</a></li>
				    	<li><?php 
echo $title;
예제 #30
0
            <?php
                }
                
                if( strlen( esc_url( myThemes::get( 'social-facebook' ) ) ) ){ 
                        echo '<a href="' . esc_url( myThemes::get( 'social-facebook' ) ) . '" class="facebook" title="' . esc_attr__( 'facebook profile : ' , "mythemes" ) . esc_url( myThemes::get( 'social-facebook' ) ) . '"><img src="' . get_template_directory_uri() . '/resource/images/_facebook-hover.png" width="1" height="1" alt="" /></a>';
                }

                if( strlen( esc_attr( myThemes::get( 'social-twitter' ) ) ) ){ 
                        echo '<a href="http://twitter.com/' . esc_attr( myThemes::get( 'social-twitter' ) ) . '" class ="twitter" title="' . esc_attr__( 'twitter account : ', "mythemes" ) . esc_attr( myThemes::get( 'social-twitter' ) ) . '"><img src="' . get_template_directory_uri( ) . '/resource/images/_twitter-hover.png" width="1" height="1" alt="" /></a>';
                }  
            ?>				
        </div>
		
        <div id="blog-info">
            <?php
                $logo = myThemes::get( 'general-logo' );

                if( strlen( $logo ) ){
                    echo '<a href="' . home_url() . '" title="' . get_option( 'blogname' ) . ' - ' . get_option( 'blogdescription' ) .  '"><img src="' . $logo . '" alt="' . get_option( 'blogname' ) . ' - ' . get_option( 'blogdescription' ) .  '" /></a>';
                }else{
                    echo '<h1><a href="' . home_url() . '" title="' . get_option( 'blogname' ) . ' - ' . get_option( 'blogdescription' ) .  '">' . get_option( 'blogname' ) . '</a></h1>';
                    echo '<p class="description">' . get_option( 'blogdescription' ) . '</p>';
                }
            ?>
        </div>
		
        <div class="menu" id="my-header-menu">
            <nav class="line inline">
                <?php wp_nav_menu( array( 'theme_location' => 'base-menu' ) ); ?>
            </nav>
        </div>