예제 #1
0
 /**
  * Inits modules and components, adds edit actions
  *
  * @access public
  * @param array $config
  * @return void
  */
 public function __construct($config)
 {
     //set modules
     self::$modules = $config['modules'];
     //set components
     self::$components = $config['components'];
     //set options
     self::$options = $config['options'];
     //init modules
     $this->initModules();
     //init components
     $this->initComponents();
     //save options action
     add_action('wp_ajax_mtheme_save_options', array(__CLASS__, 'saveOptions'));
     //reset options action
     add_action('wp_ajax_mtheme_reset_options', array(__CLASS__, 'resetOptions'));
     //save post action
     add_action('save_post', array(__CLASS__, 'savePost'));
     //add editor styles
     add_filter('tiny_mce_before_init', array($this, 'addEditorStyles'));
     //filter user relations
     add_filter('comments_clauses', array($this, 'filterUserRelations'));
     //activation hook
     add_action('init', array(__CLASS__, 'activate'));
 }
예제 #2
0
"><?php 
the_title();
?>
</a></h3>	
				<p class="author-title"><span>by </span><a href="<?php 
echo esc_url(get_author_posts_url(get_the_author_meta('ID')));
?>
"><?php 
the_author();
?>
</a></p>		
			</div>			
		</div>				
		<p class="blog-text">
		<?php 
echo mtheme_html_content(MthemeCore::getPostMeta(get_the_ID(), $prePost . "overview", $post_content));
?>
</p>
		<a class="learn-more-btn text-center btn-effect wow animated fadeIn animated" href="<?php 
echo esc_url(get_permalink());
?>
">read more</a>
		<div class="post-footer clearfix">
			<span class="date"><?php 
echo esc_attr(get_the_date('M j, Y'));
?>
</span>
			<span class="category">
			<?php 
if (has_category()) {
    the_category(', ');
예제 #3
0
$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 class="main-content content-wrapper">
<div class="container">
	<?php 
        if ($layout == 'left') {
            ?>
			<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
				<div class="sidebar "><?php 
            get_sidebar();
            ?>
예제 #4
0
<?php

$max_depth = MthemeCore::getOptionValue('thread_comments_depth', '5');
if ($GLOBALS['depth'] == 1) {
    ?>
<div class="comment topborder clearfix">
<?php 
} else {
    ?>
<div class="comment clearfix">
<?php 
}
?>
	<div class="col-lg-1 col-md-2 col-sm-2 col-xs-12">
		<div class="comment-img">
			<?php 
echo get_avatar(get_comment_author_email(), 90);
?>
		</div>										
	</div>
	<div class="col-lg-11 col-md-10 col-sm-10 col-xs-12 comment-details clearfix">
		<div class="text-left clearfix">			
			<span class="profile-name-discussion"><?php 
esc_attr(comment_author());
?>
</span>
			<span class="time-last-comment"><?php 
esc_attr(comment_time('M j, Y'));
?>
</span>
		</div>
예제 #5
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-->
예제 #6
0
파일: tag.php 프로젝트: jaychow/sdmardigras
<?php

/**
 * The template for displaying Tag pages
 *
 * Used to display archive-type pages for posts in a tag.
 *
 * @package Volta
 * @subpackage Volta
 * @since Volta 1.0
 */
get_header();
$layout = MthemeCore::getOption('posts_layout', 'right');
$columns = MthemeCore::getOptionValue('posts_per_page', '10');
?>
<div class="main-content content-wrapper">
	<div class="container">
		<div class="row">
		<!-- Heading -->
		<section class="page-heading col-lg-12">
			<h1><?php 
printf(__('Tag Archives: %s', 'volta'), single_tag_title('', false));
?>
</h1>
		</section>
		<!-- /Heading -->
				
		<?php 
if ($layout == 'left') {
    ?>
				<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
	</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);
예제 #8
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);
        }
    }
예제 #9
0
<?php

get_header();
global $wp_query;
$layout = MthemeCore::getOption('posts_layout', 'right');
?>
<div class="main-content content-wrapper">
	<div class="container">
		<div class="row">
			<section class="page-heading">
				<h1 class="h1-72"><?php 
esc_html_e("Search Result for : ", 'mtheme');
?>
 <?php 
echo get_search_query();
?>
</h1>
			</section>
			<?php 
if ($layout == 'left') {
    ?>
					<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
						<div class="sidebar "><?php 
    get_sidebar();
    ?>
</div>
					</div>
					<div class="posts-listing col-lg-9 col-md-9 col-sm-12 col-xs-12">
			<?php 
} elseif ($layout == 'right') {
    ?>
예제 #10
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 
예제 #11
0
 /**
  * Renders Site Menu
  *
  * @access public
  * @param string $slug
  * @return void
  */
 public static function renderSiteMenu($slug)
 {
     $locations = get_nav_menu_locations();
     if (isset($locations[$slug])) {
         $menu = wp_get_nav_menu_object($locations[$slug]);
         if (isset($menu->term_id)) {
             $menu_items = wp_get_nav_menu_items($menu->term_id);
             $isFirstMenu = true;
             $parentMenuTemp = 0;
             $isSubMenu = false;
             $subMenuC = 0;
             $hasChildMenu = false;
             $out = '<ul class="nav navbar-nav"><li>';
             foreach ((array) $menu_items as $key => $menu_item) {
                 $hasChildMenu = MthemeCore::hasPostIdByMetaKeyAndMetaValue('menu_item_menu_item_parent', $menu_item->ID);
                 $parentMenu = MthemeCore::getPostMeta($menu_item->ID, 'menu_item_menu_item_parent', 0);
                 if ($parentMenu != 0) {
                     if ($parentMenuTemp != $parentMenu) {
                         if ($isSubMenu) {
                             $subMenuC++;
                         }
                         if ($hasChildMenu) {
                             $out .= '<ul class="dropdown-menu level-' . ($subMenuC + 1) . '"><li class="dropdown-submenu">';
                         } else {
                             $out .= '<ul class="dropdown-menu level-' . ($subMenuC + 1) . '"><li>';
                         }
                     } else {
                         if ($hasChildMenu) {
                             $out .= '</li><li class="dropdown-submenu">';
                         } else {
                             $out .= '</li><li>';
                         }
                     }
                     $parentMenuTemp = $parentMenu;
                     $isSubMenu = true;
                 } else {
                     if ($isSubMenu) {
                         while ($subMenuC--) {
                             $out .= '</li></ul>';
                         }
                         $out .= '</li></ul></li><li>';
                         $isSubMenu = false;
                         $subMenuC = 0;
                     } elseif (!$isFirstMenu) {
                         $out .= '</li><li>';
                     }
                 }
                 /*var_dump($menu_item);*/
                 $class_names = '';
                 global $post;
                 $pageId = $post->ID;
                 if ($menu_item->object_id == $pageId) {
                     $class_names = 'active ';
                 }
                 $class_names .= implode(' ', $menu_item->classes);
                 if (!$isSubMenu && $hasChildMenu) {
                     $out .= '<a href="' . $menu_item->url . '" class="' . $class_names . '">' . $menu_item->title . '<span class="caret"></span></a>';
                 } else {
                     $out .= '<a href="' . $menu_item->url . '" class="' . $class_names . '">' . $menu_item->title . '</a>';
                 }
                 $isFirstMenu = false;
             }
             if ($isSubMenu) {
                 /* last menu is sub menu */
                 $out .= '</li></ul>';
             }
             $out .= '</li></ul>';
             echo mtheme_html($out);
         } else {
             wp_dropdown_pages();
         }
     } else {
         wp_dropdown_pages();
     }
 }
예제 #12
0
<?php

/*
Template Name: Events template
*/
the_post();
$post_pre = 'event_';
$homeSectionC = 0;
$menu = $heading = '';
$out = $category = '';
$img_gal_active = $video_active = 'hide';
$event_slider = intval(MthemeCore::getPostMeta(get_the_ID(), 'page_event_slider'));
$category = intval(MthemeCore::getPostMeta(get_the_ID(), 'page_event_category'));
if (!empty($event_slider)) {
    $menu .= '<li class="hidden"><a href="#home_slider">Home</a></li>';
}
get_header('banner-logo');
if (!empty($event_slider)) {
    echo '<div id="home_slider">';
    echo do_shortcode('[hero_background height="650px" logo_position="banner" slider_id="' . $event_slider . '"]');
    echo '</div>';
}
?>
<div id="events" class="section-padding">
	<div class="col-lg-12 align-center nopadding">
		<?php 
echo do_shortcode('[events category="' . $category . '" columns="4"]');
?>
		
	</div>
</div>
예제 #13
0
 * @package WordPress
 * @subpackage Mtheme
 * @since Mtheme 1.0
 */
get_header();
the_post();
$content_wrapper = " content-wrapper";
$pageId = get_the_ID();
$event_slider = intval(MthemeCore::getPostMeta($pageId, 'page_event_slider'));
if (!empty($event_slider)) {
    $content_wrapper = "";
    echo '<div id="home_slider">';
    echo do_shortcode('[hero_background slider_id="' . $event_slider . '"]');
    echo '</div>';
}
$page_title = MthemeCore::getPostMeta($pageId, 'page_title', 'true');
$content_post = get_post($pageId);
$content = $content_post->post_content;
?>

<div class="main-content<?php 
echo $content_wrapper;
?>
">		
	<?php 
echo do_shortcode($content);
?>
	
</div><!-- #main-content -->

<?php 
예제 #14
0
 /**
  * Refreshes module data
  *
  * @access public
  * @return void
  */
 public static function refresh()
 {
     self::$data = (array) MthemeCore::getOption(__CLASS__);
 }
예제 #15
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 
예제 #16
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;
 }