예제 #1
0
<?php

/**
 * The Template for displaying all single posts
 *
 * @package MiEvent
 * @subpackage MiEvent
 * @since MiEvent 1.0
 */
get_header();
global $wp_query;
$layout = MthemeCore::getOption('posts_layout', 'right');
?>

<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $url = '';
        if (has_post_thumbnail()) {
            $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
            $url = $thumb['0'];
        } else {
            $url = CHILD_URI . 'site/img/backgrounds/blog.jpg';
        }
        $post_ID = get_the_ID();
        $type = MthemeCore::getPostMeta($post_ID, "post_type", "type");
        $author_id = get_the_author_meta('ID');
        echo '<div id="home_slider">';
        echo do_shortcode("[post_background post_id='{$post_ID}' type='{$type}' author_id='{$author_id}' background_image='{$url}']");
        echo '</div>';
	</div>
	<!--/HEADER-->

<?php 
    } elseif ($logo_position == 'header' || $logo_position == 'both') {
        ?>
	<!--HEADER-->
	<div class="header header-hide">
		<div class="container">
			<nav class="navbar navbar-default" role="navigation">
				<div class="navbar-header">				
					<a class="navbar-brand" href="<?php 
        echo SITE_URL;
        ?>
"><img src="<?php 
        echo MthemeCore::getOption("site_logo", CHILD_URI . "site/img/logo.png");
        ?>
" alt=""/></a>				
			   </div>
			</nav>
		</div>
	</div>
<!--/HEADER-->
<?php 
    }
    if (!empty($event_slider)) {
        echo '<div id="home_slider">';
        echo do_shortcode('[hero_background logo_position="' . $logo_position . '" slider_id="' . $event_slider . '"]');
        echo '</div>';
    }
    echo mtheme_html($out);
예제 #3
0
<div class="header header-hide">
	<div class="container">
		<nav class="navbar navbar-default" role="navigation">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" 
					 data-target="#example-navbar-collapse">
					 <span class="sr-only">Toggle navigation</span>
					 <span class="icon-bar"></span>
					 <span class="icon-bar"></span>
					 <span class="icon-bar"></span>
				</button>		
				<a class="navbar-brand" href="<?php 
    echo SITE_URL;
    ?>
"><img src="<?php 
    echo MthemeCore::getOption("site_logo", "");
    ?>
" alt=""/></a>
		   </div>
		   <?php 
    $slug = 'main_menu';
    ?>
		   <div class="collapse navbar-collapse" id="example-navbar-collapse">
			  <?php 
    MthemeInterface::renderSiteMenu($slug);
    ?>
		   </div>
		</nav>
	</div>
</div>
<!--/HEADER-->
예제 #4
0
    /**
     * Adds custom fonts
     *
     * @access public
     * @return void
     */
    public static function renderFonts()
    {
        $fonts = array();
        $nice_scrool = MthemeCore::getOption('nice_scrool', 'true');
        $out = '<script type="text/javascript">';
        $out .= 'window.globalNiceScroolVar = "' . esc_js($nice_scrool) . '";';
        $out .= 'window.years = "' . esc_js(__('Years', 'mtheme')) . '";';
        $out .= 'window.months = "' . esc_js(__('Months', 'mtheme')) . '";';
        $out .= 'window.weeks = "' . esc_js(__('Weeks', 'mtheme')) . '";';
        $out .= 'window.days = "' . esc_js(__('Days', 'mtheme')) . '";';
        $out .= 'window.hours = "' . esc_js(__('Hours', 'mtheme')) . '";';
        $out .= 'window.minutes = "' . esc_js(__('Minutes', 'mtheme')) . '";';
        $out .= 'window.seconds = "' . esc_js(__('Seconds', 'mtheme')) . '";';
        $out .= 'window.year = "' . esc_js(__('Year', 'mtheme')) . '";';
        $out .= 'window.month = "' . esc_js(__('Month', 'mtheme')) . '";';
        $out .= 'window.week = "' . esc_js(__('Week', 'mtheme')) . '";';
        $out .= 'window.day = "' . esc_js(__('Day', 'mtheme')) . '";';
        $out .= 'window.hour = "' . esc_js(__('Hour', 'mtheme')) . '";';
        $out .= 'window.minute = "' . esc_js(__('Minute', 'mtheme')) . '";';
        $out .= 'window.second = "' . esc_js(__('Second', 'mtheme')) . '";';
        $out .= '</script>';
        echo mtheme_html($out);
        $out = '';
        $out .= '<script type="text/javascript">';
        $out .= 'window.globalDateVar=[];';
        $out .= 'window.globalSpeakersSlider=[];';
        $out .= 'window.globalSpeakersSliderAutoplay=[];';
        $out .= 'window.globalcbpFWTabs=[];';
        $out .= 'window.globalSponsorGallery=[];';
        $out .= 'window.globalSponsorSlideWidth=[];';
        $out .= 'window.globalSponsorSlideHeight=[];';
        $out .= 'window.globalNLForm=[];';
        $out .= 'window.globalGridGallery=[];';
        $out .= 'window.globalThreeDImageId=[];';
        $out .= 'window.globalEventVideoHoverId=[];';
        $out .= 'window.globalTotalTabs=[];';
        $out .= 'window.globalcbpFWTabsId=[];';
        $out .= 'window.globalThreeDImageHoverOut=[];';
        $out .= 'window.globalThreeDImageHoverColor=[];';
        $out .= 'window.globalEventVideoHoverColor=[];';
        $out .= 'window.globalEventVideoHoverOut=[];';
        $out .= '</script>';
        echo mtheme_html($out);
        $out = '';
        foreach (MthemeCore::$options as $option) {
            if ($option['type'] == 'select_font') {
                $font = MthemeCore::getOption($option['id'], $option['default']);
                if ($font == 'Open Sans') {
                    $font .= ':300italic,400italic,600italic,700italic,800italic,400,300,600,700,800';
                } else {
                    $font .= ':400,700,600,500,300,200,100,800,900';
                }
                if ($font == 'Crete Round') {
                    $out .= '<style type="text/css">@font-face {
						font-family: "Crete Round";
						src: url("' . THEME_URI . 'site/fonts/creteround-regular-webfont.eot");
						src: url("' . THEME_URI . 'site/fonts/creteround-regular-webfont.eot?#iefix") format("embedded-opentype"),
							 url("' . THEME_URI . 'site/fonts/creteround-regular-webfont.woff") format("woff"),
							 url("' . THEME_URI . 'site/fonts/creteround-regular-webfont.ttf") format("truetype"),
							 url("' . THEME_URI . 'site/fonts/creteround-regular-webfont.svg#crete_roundregular") format("svg");
						font-weight: normal;
						font-style: normal;
					}</style>';
                } else {
                    $fonts[] = $font;
                }
            }
        }
        $fonts = array_unique($fonts);
        if (!empty($fonts)) {
            $out .= '<script type="text/javascript">
			WebFontConfig = {google: { families: [ "' . implode($fonts, '","') . '" ] } };
			(function() {
				var wf = document.createElement("script");
				wf.src = ("https:" == document.location.protocol ? "https" : "http") + "://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";
				wf.type = "text/javascript";
				wf.async = "true";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(wf, s);
			})();
			</script>';
            echo mtheme_html($out);
        }
    }
예제 #5
0
<html <?php 
language_attributes();
?>
>
<head>		
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="author" content="<?php 
echo MthemeCore::getOption('meta_author', 'multia.in');
?>
">
	<meta name="description" content="<?php 
echo MthemeCore::getOption('meta_description', 'multia.in');
?>
">
	<meta name="keywords" content="<?php 
echo MthemeCore::getOption('meta_keywords', 'multia.in');
?>
">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
			
	<!-- PAGE TITLE -->
	<meta charset="<?php 
bloginfo('charset');
?>
">
    <title><?php 
wp_title('|', true, 'right');
?>
</title>
			
	<?php 
예제 #6
0
 /**
  * Refreshes module data
  *
  * @access public
  * @return void
  */
 public static function refresh()
 {
     self::$data = (array) MthemeCore::getOption(__CLASS__);
 }
예제 #7
0
		<div class="row">
			<div class="align-center">
				<ul class="legals">
					<?php 
        if (!empty($declaration_title)) {
            ?>
					<li><?php 
            echo do_shortcode("[modal title='{$declaration_title}']" . $declaration_content . "[/modal]");
            ?>
</li>
					<?php 
        }
        if (!empty($made_in_title)) {
            ?>
					<li><a href="<?php 
            echo esc_url(MthemeCore::getOption("made_in_link", "#"));
            ?>
" target="_blank">
					<?php 
            echo esc_html($made_in_title);
            ?>
</a></li>
					<?php 
        }
        ?>
				</ul>
			</div>			
		</div>
	</div>
</footer>
<?php 
예제 #8
0
 /**
  * Submits form data
  *
  * @access public
  * @return void
  */
 public static function submitData()
 {
     self::refresh();
     parse_str($_POST['data'], $data);
     /*var_dump($data);die();*/
     if (isset($data['slug']) && self::isActive($data['slug'])) {
         foreach (self::$data[$data['slug']]['fields'] as $field) {
             $ID = mtheme_sanitize_key($field['name']);
             $field['name'] = mtheme_get_string($ID, 'name', $field['name']);
             $field['optional'] = mtheme_get_string($ID, 'options', $field['options']);
             if (empty($data[$ID]) && $field['required'] == 'yes' && $field['type'] != 'select') {
                 MthemeInterface::$messages[] = $field['name'] . ' ' . __('is required', 'mtheme');
             } else {
                 if ($field['type'] == 'number' && !is_numeric($data[$ID])) {
                     MthemeInterface::$messages[] = $field['name'] . ' ' . __('can only contain numbers', 'mtheme');
                 }
                 if ($field['type'] == 'email' && !is_email($data[$ID])) {
                     MthemeInterface::$messages[] = __('You have entered an invalid email address', 'mtheme');
                 }
             }
         }
         if (isset(self::$data[$data['slug']]['captcha'])) {
             session_start();
             $posted_code = md5($data['captcha']);
             $session_code = $_SESSION['captcha'];
             if ($session_code != $posted_code) {
                 MthemeInterface::$messages[] = __('The verification code is incorrect', 'mtheme');
             }
         }
         if (!empty(MthemeInterface::$messages)) {
             MthemeInterface::renderMessages();
         } else {
             $admin_email = MthemeCore::getOption('reg_admin_email');
             if (empty($admin_email)) {
                 $admin_email = get_option('admin_email');
             }
             $subject = __('Contact', 'mtheme');
             $message = 'Dear Admin,<br/>';
             foreach (self::$data[$data['slug']]['fields'] as $field) {
                 $ID = mtheme_sanitize_key($field['name']);
                 $field['name'] = mtheme_get_string($ID, 'name', $field['name']);
                 if ($field['type'] == 'select') {
                     $field['options'] = mtheme_get_string($ID, 'options', $field['options']);
                     $items = explode(',', $field['options']);
                     if (isset($items[$data[$ID] - 1])) {
                         $data[$ID] = $items[$data[$ID] - 1];
                     } else {
                         $data[$ID] = '&ndash;';
                     }
                 }
                 $message .= $field['name'] . ': ' . $data[$ID] . '<br />';
             }
             if (mtheme_mail($admin_email, $subject, $message) && isset(self::$data[$data['slug']]['message'])) {
                 $message = mtheme_get_string($data['slug'], 'message', self::$data[$data['slug']]['message']);
                 if (empty($message)) {
                     MthemeInterface::$messages[] = 'Your message has been sent.';
                 } else {
                     MthemeInterface::$messages[] = $message;
                 }
                 MthemeInterface::renderMessages(true);
             } else {
                 MthemeInterface::$messages[] = "Email could not send.";
                 MthemeInterface::renderMessages();
             }
         }
     }
     die;
 }