Exemplo n.º 1
0
 static function project()
 {
     if (self::$project === null) {
         self::$project = new Smart_Project_Base();
         return self::$project;
     } else {
         return self::$project;
     }
 }
Exemplo n.º 2
0
<footer id="main-footer" class="main-footer">
    <?php 
if (!is_404()) {
    get_sidebar('footer');
}
//Add footer sidebar
?>

    <div id="footer-bottom">
        <div class="row">
            <div class="large-4 columns">
               <?php 
echo __MAXFLAT::option('title_tagline_footer');
?>

            </div>
            <div class="large-12 columns footer-navigation">
                <?php 
wp_nav_menu(array('theme_location' => 'footer_pages', 'container' => false, 'depth' => 1));
?>

            </div>
        </div>
    </div>
</footer>
    <?php 
wp_footer();
?>

</body>
</html>
Exemplo n.º 3
0
/**
 * Display format (gallery, video) icon
 *
 * @param $key_class
 */
function maxflat_get_format_ico($key_class)
{
    $class_name = __MAXFLAT::layout()->get_awesome_icon_class($key_class);
    $formats_array = __MAXFLAT::layout()->get_promoted_formats();
    if (in_array($key_class, $formats_array)) {
        ?>

		<span class="smartlib-format-ico"><i class="<?php 
        echo $class_name;
        ?>
"></i></span>
	<?php 
    }
}
Exemplo n.º 4
0
</head>

<body <?php 
body_class();
?>
>
<?php 
maxflat_lt_ie7_info();
//display info if IE lower than 7
?>

<div class="top-bar-outer">
	<?php 
//fixed top bar option
$fixed = __MAXFLAT::option('project_fixed_topbar');
?>


<div id="top-bar" class="top-bar home-border<?php 
get_header_fixed_class();
?>
">

	<div class="row">
		<div class="columns large-4 medium-3  small-6">
            <?php 
/**
 * Add Theme logo : template_tags
 */
maxflat_logo();
    function widget($args, $instance)
    {
        $title = apply_filters('widget_title', $instance['title']);
        $limit = is_int($instance['gallery_limit']) ? $instance['gallery_limit'] : 4;
        extract($args);
        echo $before_widget;
        ?>

	<?php 
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        $query = new WP_Query(array('posts_per_page' => $limit, 'tax_query' => array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array('post-format-gallery')))));
        if ($query->have_posts()) {
            ?>



			<ul class="small-block-grid-2">
				<?php 
            while ($query->have_posts()) {
                $query->the_post();
                ?>


							<?php 
                $featured_image = __MAXFLAT::layout()->get_featured_image('medium-square');
                if ('' != get_the_post_thumbnail()) {
                    ?>

								<li>
					<a href="<?php 
                    the_permalink();
                    ?>
" class="smartlib-thumbnail-outer"><?php 
                    maxflat_get_format_ico('gallery');
                    the_post_thumbnail('medium-square');
                    ?>
</a>
								</li>
								<?php 
                } else {
                    if (!empty($featured_image)) {
                        ?>

									<li>
						<a href="<?php 
                        the_permalink();
                        ?>
" class="smartlib-thumbnail-outer"><?php 
                        maxflat_get_format_ico('gallery');
                        echo $featured_image;
                        ?>
</a></li>
								<?php 
                    }
                }
                ?>


					<?php 
            }
            wp_reset_postdata();
            ?>

			</ul>

		<?php 
            echo $after_widget;
            ?>

		<?php 
        }
    }
Exemplo n.º 6
0
 *
 * MaxFlat functions and definitions.
 *
 * The functions file is used to initialize everything in the theme.
 * It sets up the supported features, default actions  and filters.
 *
 *
 * 
 * @since      MaxFlat 1.0
 */
// Load Smart Library
require get_template_directory() . '/smart-lib/load.php';
/**
 * Initialize smart lib project object
 */
__MAXFLAT::init();
/**
 * Sets up theme defaults and registers the various WordPress features
 */
if (!function_exists('maxflat_setup')) {
    function maxflat_setup()
    {
        global $content_width;
        /*
         * Load textdomain.
         */
        load_theme_textdomain('maxflat', get_template_directory() . '/languages');
        // This theme styles the visual editor with editor-style.css to match the theme style.
        add_editor_style();
        // Adds RSS feed links to <head> for posts and comments.
        add_theme_support('automatic-feed-links');
Exemplo n.º 7
0
echo get_class_of_component('menu');
?>
">
<nav id="site-navigation" class="main-navigation hide-for-small" role="navigation">

<a class="assistive-text" href="#content"
		title="<?php 
esc_attr_e('Skip to content', 'maxflat');
?>
"><?php 
_e('Skip to content', 'maxflat');
?>
</a>
	<?php 
//fixed menu option
$fixed = __MAXFLAT::option('maxflat_menu_fixed');
?>

<div class="maxflat-nav-menu <?php 
echo $fixed == '1' ? ' fixed-menu' : '';
?>
">
	<?php 
wp_nav_menu(array('theme_location' => 'categories', 'container' => false));
?>

</div>
</nav>

<!-- #site-navigation -->