Example #1
0
    public function widget($args, $instance)
    {
        $logo = m_wedding_get_options('logo');
        echo $args['before_widget'];
        ?>
		<!-- Logo -->
		<div class="logo">
			<a href="<?php 
        echo esc_url(home_url());
        ?>
">
				<?php 
        if (isset($logo) && !empty($logo)) {
            ?>
					<img alt="" src="<?php 
            echo $logo;
            ?>
">
				<?php 
        } else {
            echo bloginfo('name');
        }
        ?>
			</a>
		</div>
		<?php 
        echo $args['after_widget'];
    }
Example #2
0
function m_wedding_loop_shop_columns($columns)
{
    return m_wedding_get_options('shop_columns', '3');
}
Example #3
0
<?php

get_header();
//woocommerce_content()
$container = m_wedding_container();
if (is_singular('product')) {
    $shop_layout = m_wedding_get_options('shop_single_layout', 'full-width');
    $shop_sidebar = m_wedding_get_options('shop_single_sidebar');
    $shop_sidebar_width = m_wedding_get_options('shop_single_sidebar_width');
    $shop_sidebar_el_class = m_wedding_get_options('shop_single_sidebar_el_class');
} else {
    $shop_layout = m_wedding_get_options('shop_layout', 'full-width');
    $shop_sidebar = m_wedding_get_options('shop_sidebar');
    $shop_sidebar_width = m_wedding_get_options('shop_sidebar_width');
    $shop_sidebar_el_class = m_wedding_get_options('shop_sidebar_el_class');
}
$view = isset($_GET['view']) && $_GET['view'] == 'list' ? 'list' : '';
$col_content = $col_sidebar = array();
if ($shop_layout == 'full-width') {
    $col_content[] = 'col-sm-12';
} else {
    $col_content[] = 'col-sm-' . (12 - $shop_sidebar_width);
    $col_sidebar[] = 'col-sm-' . $shop_sidebar_width;
    $col_sidebar[] = $shop_sidebar_el_class;
    if ($shop_layout == 'left-sidebar') {
        $col_content[] = 'col-sm-push-' . $shop_sidebar_width;
        $col_sidebar[] = 'col-sm-pull-' . (12 - $shop_sidebar_width);
    }
}
?>
	
Example #4
0
function m_wedding_social_shares()
{
    $social = m_wedding_get_options('blog_social', array(array('title' => 'Facebook', 'icons' => 'fa-facebook'), array('title' => 'Twitter', 'icons' => 'fa-twitter'), array('title' => 'Google', 'icons' => 'fa-google-plus')));
    if (isset($social) && is_array($social)) {
        $currentUrl = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
        if (!empty($_SERVER['HTTPS'])) {
            $currentUrl = "https://" . $currentUrl;
        } else {
            $currentUrl = "http://" . $currentUrl;
        }
        echo '<div class="social-shares">';
        echo '<ul>';
        foreach ($social as $sl) {
            if ($sl['icons'] == 'fa-facebook') {
                ?>
				<li>
					<a href="http://www.facebook.com/share.php?u=<?php 
                echo $currentUrl;
                ?>
" target="_blank"><i class="fa <?php 
                echo esc_attr($sl['icons']);
                ?>
"></i></a>
				</li>
				<?php 
            }
            if ($sl['icons'] == 'fa-twitter') {
                ?>
				<li>
					<a href="http://twitter.com/share?url=<?php 
                echo $currentUrl;
                ?>
" target="_blank"><i class="fa <?php 
                echo esc_attr($sl['icons']);
                ?>
"></i></a>
				</li>
				<?php 
            }
            if ($sl['icons'] == 'fa-stumbleupon') {
                ?>
				<li>
					<a href="http://www.stumbleupon.com/submit?url=<?php 
                echo $currentUrl;
                ?>
&#038;title=<?php 
                echo m_wedding_social_share_title();
                ?>
" target="_blank"><i class="fa <?php 
                echo esc_attr($sl['icons']);
                ?>
"></i></a>
				</li>
				<?php 
            }
            if ($sl['icons'] == 'fa-linkedin') {
                ?>
				<li>
					<a href="http://www.linkedin.com/shareArticle?mini=true&#038;url=<?php 
                echo $currentUrl;
                ?>
&#038;title=<?php 
                echo m_wedding_social_share_title();
                ?>
" target="_blank"><i class="fa <?php 
                echo esc_attr($sl['icons']);
                ?>
"></i></a>
				</li>
				<?php 
            }
            if ($sl['icons'] == 'fa-google-plus') {
                ?>
				<li>		
					<a href="https://plus.google.com/share?url=<?php 
                echo $currentUrl;
                ?>
" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"><i class="fa <?php 
                echo esc_attr($sl['icons']);
                ?>
"></i></a>					
				</li>
				<?php 
            }
            if ($sl['icons'] == 'fa-pinterest') {
                $thumbnail_id = get_post_thumbnail_id(get_the_ID());
                $thumbnail = wp_get_attachment_image_src($thumbnail_id, 'full');
                ?>
				<li>
					<a href="http://pinterest.com/pin/create/button/?url=<?php 
                echo $currentUrl;
                ?>
&media=<?php 
                echo $thumbnail[0];
                ?>
" class="pin-it-button" count-layout="horizontal" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"><i class="fa <?php 
                echo esc_attr($sl['icons']);
                ?>
"></i></a>	
				</li>
				<?php 
            }
        }
        echo '</ul>';
        echo '</div>';
    }
}
Example #5
0
<?php

$sidebar_footer_top = m_wedding_get_options('sidebar_footer_top');
$sidebar_footer = m_wedding_get_options('sidebar_footer');
$copyright = m_wedding_get_options('copyright', '');
$container = m_wedding_container();
?>
		
		</div> <!-- End Main Content -->
		
		<!-- Footer -->
		<footer id="footer" class="footer">
		
			<?php 
if (isset($sidebar_footer_top) && is_array($sidebar_footer_top) && count($sidebar_footer_top) > 0) {
    ?>
      		<div class="footer-top">
				<div class="<?php 
    echo apply_filters('container', $container);
    ?>
">
					<div class="row">
      				<?php 
    foreach ($sidebar_footer_top as $sidebar) {
        ?>
	      				<?php 
        if (is_active_sidebar($sidebar['sidebar'])) {
            ?>
	      				<div class="col-sm-<?php 
            echo $sidebar['width'];
            ?>
Example #6
0
">
<meta name="viewport" content="width=device-width">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
">

<?php 
wp_head();
$boxed = m_wedding_get_options('main_boxed', 'off');
$container = m_wedding_container();
$style = m_wedding_get_options('header_styles');
$header_top_sidebar = m_wedding_get_options('header_top_sidebar');
$header_middle_sidebar = m_wedding_get_options('header_middle_sidebar');
$header_bottom_sidebar = m_wedding_get_options('header_bottom_sidebar');
/*
	if ( $style == 'style-v2' ) {
		$container = 'container-fluid';
	}*/
?>
</head>

<body <?php 
body_class();
?>
>
	<!--[if lt IE 9]>
            <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
    <?php 
Example #7
0
<?php

get_header();
$container = m_wedding_container();
$blog_layout = m_wedding_get_options('blog_layout', 'full-width');
$blog_sidebar = m_wedding_get_options('blog_sidebar');
$blog_sidebar_width = m_wedding_get_options('blog_sidebar_width');
$blog_sidebar_el_class = m_wedding_get_options('blog_sidebar_el_class');
$col_content = $col_sidebar = array();
if ($blog_layout == 'full-width') {
    $col_content[] = 'col-sm-12';
} else {
    $col_content[] = 'col-sm-' . (12 - $blog_sidebar_width);
    $col_sidebar[] = 'col-sm-' . $blog_sidebar_width;
    $col_sidebar[] = $blog_sidebar_el_class;
    if ($blog_layout == 'left-sidebar') {
        $col_content[] = 'col-sm-push-' . $blog_sidebar_width;
        $col_sidebar[] = 'col-sm-pull-' . (12 - $blog_sidebar_width);
    }
}
?>
	
<?php 
if (!is_front_page()) {
    ?>
<div class="page-header">
	<h1 class="title"><span class="line-title">
		<?php 
    if (is_singular() || is_home()) {
        single_post_title();
    } elseif (is_category()) {
Example #8
0
function m_wedding_style()
{
    $style = '';
    /**
     * MAIN
     * */
    // Background Body
    $__background_body = m_wedding_get_options('background_body');
    if (isset($__background_body) && is_array($__background_body) && count($__background_body) > 0) {
        $background_body = array();
        foreach ($__background_body as $k => $val) {
            if ($k == 'background-image') {
                $background_body[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_body[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_body) > 0) {
            $style .= 'body {';
            $style .= implode(';', $background_body);
            $style .= '}';
        }
    }
    // Background Boxed
    $__background_boxed = m_wedding_get_options('background_boxed');
    $boxed = m_wedding_get_options('main_boxed', 'on');
    if ($boxed == 'on' && isset($__background_boxed) && is_array($__background_boxed) && count($__background_boxed) > 0) {
        $background_boxed = array();
        foreach ($__background_boxed as $k => $val) {
            if ($k == 'background-image') {
                $background_boxed[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_boxed[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_boxed) > 0) {
            $style .= '#wrap.container {';
            $style .= implode(';', $background_boxed);
            $style .= '}';
        }
    }
    // Background Main
    $__background_main = m_wedding_get_options('background_main');
    if (isset($__background_main) && is_array($__background_main) && count($__background_main) > 0) {
        $background_main = array();
        foreach ($__background_main as $k => $val) {
            if ($k == 'background-image') {
                $background_main[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_main[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_main) > 0) {
            $style .= '#main-content {';
            $style .= implode(';', $background_main);
            $style .= '}';
        }
    }
    /**
     * HEADER
     * */
    // Background Header
    $__background_header = m_wedding_get_options('background_header');
    if (isset($__background_header) && is_array($__background_header) && count($__background_header) > 0) {
        $background_header = array();
        foreach ($__background_header as $k => $val) {
            if ($k == 'background-image') {
                $background_header[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_header[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_header) > 0) {
            $style .= '.header {';
            $style .= implode(';', $background_header);
            $style .= '}';
        }
    }
    // Background Top
    $__background_header_top = m_wedding_get_options('background_header_top');
    if (isset($__background_header_top) && is_array($__background_header_top) && count($__background_header_top) > 0) {
        $background_header_top = array();
        foreach ($__background_header_top as $k => $val) {
            if ($k == 'background-image') {
                $background_header_top[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_header_top[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_header_top) > 0) {
            $style .= '.header .header-top {';
            $style .= implode(';', $background_header_top);
            $style .= '}';
        }
    }
    // Background Header Middle
    $__background_header_middle = m_wedding_get_options('background_header_middle');
    if (isset($__background_header_middle) && is_array($__background_header_middle) && count($__background_header_middle) > 0) {
        $background_header_middle = array();
        foreach ($__background_header_middle as $k => $val) {
            if ($k == 'background-image') {
                $background_header_middle[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_header_middle[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_header_middle) > 0) {
            $style .= '.header .header-middle {';
            $style .= implode(';', $background_header_middle);
            $style .= '}';
        }
    }
    // Background Header Bottom
    $__background_header_bottom = m_wedding_get_options('background_header_bottom');
    if (isset($__background_header_bottom) && is_array($__background_header_bottom) && count($__background_header_bottom) > 0) {
        $background_header_bottom = array();
        foreach ($__background_header_bottom as $k => $val) {
            if ($k == 'background-image') {
                $background_header_bottom[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_header_bottom[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_header_bottom) > 0) {
            $style .= '.header .header-bottom {';
            $style .= implode(';', $background_header_bottom);
            $style .= '}';
        }
    }
    /**
     * FOOTER
     * */
    // Background Footer
    $__background_footer = m_wedding_get_options('background_footer');
    if (isset($__background_footer) && is_array($__background_footer) && count($__background_footer) > 0) {
        $background_footer = array();
        foreach ($__background_footer as $k => $val) {
            if ($k == 'background-image') {
                $background_footer[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_footer[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_footer) > 0) {
            $style .= '.footer {';
            $style .= implode(';', $background_footer);
            $style .= '}';
        }
    }
    // Background Footer Top
    $__background_footer_top = m_wedding_get_options('background_footer_top');
    if (isset($__background_footer_top) && is_array($__background_footer_top) && count($__background_footer_top) > 0) {
        $background_footer_top = array();
        foreach ($__background_footer_top as $k => $val) {
            if ($k == 'background-image') {
                $background_footer_top[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_footer_top[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_footer_top) > 0) {
            $style .= '.footer {';
            $style .= implode(';', $background_footer_top);
            $style .= '}';
        }
    }
    // Background Footer Middle
    $__background_footer_middle = m_wedding_get_options('background_footer_middle');
    if (isset($__background_footer_middle) && is_array($__background_footer_middle) && count($__background_footer_middle) > 0) {
        $background_footer_middle = array();
        foreach ($__background_footer_middle as $k => $val) {
            if ($k == 'background-image') {
                $background_footer_middle[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_footer_middle[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_footer_middle) > 0) {
            $style .= '.footer {';
            $style .= implode(';', $background_footer_middle);
            $style .= '}';
        }
    }
    /**
     * TYPOGRAPHY
     * */
    // Typography Body
    $typography = m_wedding_get_options('typography_body');
    if (isset($typography) && is_array($typography) && count($typography) > 0) {
        $typography_body = array();
        if (isset($typography['font-family']) && !empty($typography['font-family'])) {
            $google_font = m_wedding_ot_google_font_stack(array(), $typography['font-family']);
            $typography['font-family'] = $google_font[$typography['font-family']];
        }
        if (isset($typography['font-color']) && !empty($typography['font-color'])) {
            $typography_body[] = 'color' . ':' . $typography['font-color'];
            unset($typography['font-color']);
        }
        foreach ($typography as $k => $val) {
            if (!empty($val)) {
                $typography_body[] = $k . ':' . $val;
            }
        }
        if (count($typography_body) > 0) {
            $style .= 'body {';
            $style .= implode(';', $typography_body);
            $style .= '}';
        }
    }
    // Typography Heading
    $heading = m_wedding_get_options('typography_heading');
    if (isset($heading) && is_array($heading) && count($heading) > 0) {
        $heading_css = array();
        if (isset($heading['font-family']) && !empty($heading['font-family'])) {
            $google_font = m_wedding_ot_google_font_stack(array(), $heading['font-family']);
            $heading['font-family'] = $google_font[$heading['font-family']];
        }
        if (isset($heading['font-color']) && !empty($heading['font-color'])) {
            $heading_css[] = 'color' . ':' . $heading['font-color'];
            unset($heading['font-color']);
        }
        foreach ($heading as $k => $val) {
            if (!empty($val)) {
                $heading_css[] = $k . ':' . $val;
            }
        }
        if (count($heading_css) > 0) {
            $style .= 'nav.navbar,h1,h2,h3,h4,h5,h6 {';
            $style .= implode(';', $heading_css);
            $style .= '}';
        }
    }
    /**
     * PAGE HEADER
     * */
    //Background Page Title
    $__background_page_title = array();
    if (function_exists('is_woocommerce') && is_woocommerce()) {
        $__background_page_title = m_wedding_get_options('shop_background_title');
    } elseif (is_page()) {
        $__background_page_title = get_post_meta(get_the_ID(), '__background_title', true);
    } else {
        $__background_page_title = m_wedding_get_options('blog_background_title');
    }
    if (isset($__background_page_title) && is_array($__background_page_title) && count($__background_page_title) > 0) {
        $background_page_title = array();
        foreach ($__background_page_title as $k => $val) {
            if ($k == 'background-image') {
                $background_page_title[] = $k . ': url(' . $val . ')' . '!important';
            } else {
                $background_page_title[] = $k . ':' . $val . '!important';
            }
        }
        if (count($background_page_title) > 0) {
            $style .= '.main-content .page-header {';
            $style .= implode(';', $background_page_title);
            $style .= '}';
        }
    }
    echo "<style type='text/css'>{$style}</style>";
}
Example #9
0
<?php

get_header();
$header_image = m_wedding_get_options('blog_image', 'http://placehold.it/1920x478/333');
$title = m_wedding_get_options('blog_title', 'News &amp; Events');
?>
<div class="page-header">
	<?php 
if (isset($header_image)) {
    ?>
	<figure class="post-thumbnail">
		<img alt="" src="<?php 
    echo esc_attr($header_image);
    ?>
">
	</figure>
	<?php 
}
?>
	<h1 class="title"><span class="line-title"><?php 
echo esc_html($title);
?>
<i class="fa">&#xf111;</i></span></h1>
</div>
<div class="page-content">
	<div class="container">
		<div class="row">
			<div class="col-sm-<?php 
echo is_active_sidebar('widget-area') ? '8' : '12';
?>
">