public static function register()
 {
     TMM_Event::init();
     //TMM_GoogleCalendar::init();
     $args = array('labels' => array('name' => __('Events', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'singular_name' => __('Event', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'add_new' => __('Add New', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'add_new_item' => __('Add New Event', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'edit_item' => __('Edit Event', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'new_item' => __('New Event', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'view_item' => __('View Event', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'search_items' => __('Search In Events', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'not_found' => __('Nothing found', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'not_found_in_trash' => __('Nothing found in Trash', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'parent_item_colon' => ''), 'public' => true, 'archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => true, 'menu_position' => null, 'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'tags', 'comments'), 'rewrite' => array('slug' => 'event'), 'show_in_admin_bar' => true, 'taxonomies' => array('events-categories'), 'menu_icon' => 'dashicons-calendar');
     register_post_type('event', $args);
     //*** taxonomies ****
     register_taxonomy("events-categories", array("event"), array("hierarchical" => true, "labels" => array('name' => __('Events Categories', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'singular_name' => __('Event category', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'add_new' => __('Add New', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'add_new_item' => __('Add New Event category', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'edit_item' => __('Edit Event category', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'new_item' => __('New Event category', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'view_item' => __('View Event category', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'search_items' => __('Search Events categories', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'not_found' => __('No Events categories found', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'not_found_in_trash' => __('No Events categories found in Trash', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'parent_item_colon' => ''), "singular_label" => __("Events", TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'public' => true, "show_tagcloud" => true, 'query_var' => true, "rewrite" => true, 'show_in_nav_menus' => true, 'capabilities' => array('manage_terms'), 'show_ui' => true));
     add_filter("manage_event_posts_columns", array('TMM_Event', "show_edit_columns"));
     add_action("manage_event_posts_custom_column", array('TMM_Event', "show_edit_columns_content"));
     //***
     add_filter("manage_edit-event_sortable_columns", array('TMM_Event', "event_sortable_columns"));
     add_action('pre_get_posts', array('TMM_Event', "event_column_orderby"));
     if (class_exists('TMM')) {
         $events_set_old_ev_to_draft = TMM::get_option("events_set_old_ev_to_draft");
         if ($events_set_old_ev_to_draft) {
             //set crone
             add_action('old_events_shedules', array(__CLASS__, 'old_events_shedules'));
             if (!wp_next_scheduled('old_events_shedules')) {
                 wp_schedule_event(time(), 'hourly', 'old_events_shedules');
             }
         } else {
             wp_clear_scheduled_hook('old_events_shedules');
         }
     }
 }
Ejemplo n.º 2
0
 public static function get_cat_head_seo_data($cat)
 {
     $data = array();
     $data['meta_title'] = "";
     $data['meta_keywords'] = "";
     $data['meta_description'] = "";
     if (!$cat) {
         return $data;
     }
     $seo_groups = TMM::get_option("seo_groups");
     if (!empty($seo_groups)) {
         foreach ($seo_groups as $key => $group) {
             if (!empty($group['cat'])) {
                 foreach ($group['cat'] as $category) {
                     if ($category == $cat) {
                         $data['meta_title'] = $group['title'];
                         $data['meta_keywords'] = $group['keywords'];
                         $data['meta_description'] = $group['description'];
                         return $data;
                     }
                 }
             }
         }
     }
     return $data;
 }
Ejemplo n.º 3
0
 private static function get_saved_google_fonts()
 {
     $saved_google_fonts = TMM::get_option('saved_google_fonts');
     if (isset($saved_google_fonts['saved_google_fonts'])) {
         return $saved_google_fonts['saved_google_fonts'];
     }
 }
Ejemplo n.º 4
0
    public static function wp_head()
    {
        if (TMM::get_option('hide_layout_front_popup')) {
            return;
        }
        wp_enqueue_script('tmm_ext_demo_js', TMM_EXT_URI . '/demo/js/front.js', array('jquery'));
        wp_enqueue_style('tmm_ext_demo_css', TMM_EXT_URI . '/demo/css/styles.css');
        ?>
		<script type="text/javascript">
		<?php 
        $data = self::get_theme_schemes();
        ?>

			var tmm_demo_styles_list = {
		<?php 
        if (!empty($data)) {
            ?>
			<?php 
            foreach ($data as $key => $value) {
                ?>
				<?php 
                if ($key > 0) {
                    echo ',';
                }
                ?>
				<?php 
                echo $key;
                ?>
 : {
					className:'style_<?php 
                echo $key;
                ?>
',
					css_file_link : '<?php 
                echo TMM_Helper::get_upload_folder_uri() . 'almera' . '/' . 'theme_schemes/' . strtolower($value['key']) . '.css';
                ?>
',
                                        icon_type : 'color',
					color : '<?php 
                echo $value['color'];
                ?>
',
					image_file : '',
					}
			<?php 
            }
            ?>
		<?php 
        }
        ?>
			};
		</script>

		<?php 
    }
Ejemplo n.º 5
0
 public static function get_forms_names()
 {
     $contact_forms = TMM::get_option('contact_form');
     $result = array();
     if (!empty($contact_forms)) {
         //after import
         if (!empty($contact_forms) and is_string($contact_forms)) {
             $contact_forms = unserialize($contact_forms);
         }
         foreach ($contact_forms as $form) {
             $result[@$form['title']] = @$form['title'];
         }
     }
     return $result;
 }
Ejemplo n.º 6
0
 public static function addthis_shortcode($atts, $content = '')
 {
     if (!isset($atts['buttons_type'])) {
         $atts['buttons_type'] = TMM::get_option('buttons_type');
     }
     if (!isset($atts['add_buttons'])) {
         $atts['add_buttons'] = TMM::get_option('add_buttons');
     }
     $show_buttons = TMM::get_option('show_buttons');
     $post_type = get_post_type();
     if ($post_type === 'post') {
         if (isset($show_buttons['single_blog']) && $show_buttons['single_blog'] === '0') {
             return '';
         }
     }
     if (class_exists('TMM_Ext_PostType_Car') && $post_type === TMM_Ext_PostType_Car::$slug) {
         if (isset($show_buttons['single_car']) && $show_buttons['single_car'] === '0') {
             return '';
         }
     }
     echo TMM_AddThis_Controller::draw_free_page(TMM_AddThis_Controller::get_application_path() . '/views/output.php', $atts);
 }
Ejemplo n.º 7
0
    public static function draw_theme_option($data, $prefix = TMM_THEME_PREFIX)
    {
        $value = "";
        //sometimes I have value or cant get in by TMM::get_option
        if (isset($data['value'])) {
            $value = $data['value'];
        } else {
            $value = TMM::get_option($data['name'], $prefix);
        }
        if (empty($value) && '0' != $value) {
            $value = @$data['default_value'];
        }
        $pl = $value;
        if ($data['name'] == 'admin_social_links[twitter]' || $data['name'] == 'admin_social_links[facebook]' || $data['name'] == 'admin_social_links[dribbble]' || $data['name'] == 'admin_social_links[vimeo]' || $data['name'] == 'admin_social_links[youtube]' || $data['name'] == 'admin_social_links[pinterest]' || $data['name'] == 'admin_social_links[instagram]' || $data['name'] == 'admin_social_links[linkedin]' || $data['name'] == 'admin_social_links[flickr]' || $data['name'] == 'admin_social_links[gplus]' || $data['name'] == 'admin_social_links[behance]' || $data['name'] == 'admin_social_links[rss]') {
            $value_name = explode('[', $data['name']);
            $value_name = $value_name['1'];
            $value_name = explode(']', $value_name);
            $value_name = $value_name['0'];
            $value = TMM::get_option('admin_social_links');
            $value = $value[$value_name];
            $pl = @$data['default_value'];
        }
        switch ($data['type']) {
            case 'slider':
                ?>
				<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
					<div class="clearfix ">
						<div class="admin-one-half">
							<p>
							<?php 
                }
                ?>
							<input data-default-value="<?php 
                echo @$data['default_value'];
                ?>
" type="text" name="<?php 
                echo $data['name'];
                ?>
" value="<?php 
                echo $value;
                ?>
" min-value="<?php 
                echo $data['min'];
                ?>
" max-value="<?php 
                echo $data['max'];
                ?>
" class="ui_slider_item" />
							<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
							</p>
						</div>

						<div class="admin-one-half last">
              
							<p class="admin-info">
								<?php 
                    echo $data['description'];
                    ?>
							</p>
						</div>
					</div>
				<?php 
                }
                ?>
				<?php 
                break;
            case 'text':
                ?>
				<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
					<div class="clearfix ">
						<div class="admin-one-half">
							<p>
							<?php 
                }
                ?>
                                                            <input placeholder="<?php 
                echo $pl;
                ?>
" data-default-value="<?php 
                echo @$data['default_value'];
                ?>
" type="text" class="<?php 
                echo @$data['css_class'];
                ?>
" name="<?php 
                echo $data['name'];
                ?>
" value="<?php 
                echo $value;
                ?>
">
							<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
							</p>
						</div>

						<div class="admin-one-half last">
                                                    <p class="admin-info">
								<?php 
                    echo $data['description'];
                    ?>
                                                    </p>
                                                    <?php 
                    if ($data['name'] == 'admin_social_links[twitter]' || $data['name'] == 'admin_social_links[facebook]' || $data['name'] == 'admin_social_links[dribbble]' || $data['name'] == 'admin_social_links[vimeo]' || $data['name'] == 'admin_social_links[youtube]' || $data['name'] == 'admin_social_links[pinterest]' || $data['name'] == 'admin_social_links[instagram]' || $data['name'] == 'admin_social_links[linkedin]' || $data['name'] == 'admin_social_links[flickr]' || $data['name'] == 'admin_social_links[google]' || $data['name'] == 'admin_social_links[behance]' || $data['name'] == 'admin_social_links[rss]') {
                        ?>
                                                            <div class="row-mover"></div>
                                                            <?php 
                    }
                    ?>
							
						</div>
					</div>
				<?php 
                }
                ?>
				<?php 
                break;
            case 'textarea':
                ?>
				<?php 
                if (!@$data['hide_item_html']) {
                    ?>
					<div class="clearfix ">
						<div class="admin-one-half">
							<p>
							<?php 
                }
                ?>
							<textarea data-default-value="<?php 
                echo @$data['default_value'];
                ?>
" name="<?php 
                echo $data['name'];
                ?>
" class="<?php 
                echo $data['css_class'];
                ?>
"><?php 
                echo $value;
                ?>
</textarea>
							<?php 
                if (!@$data['hide_item_html']) {
                    ?>
							</p>
						</div>
						<div class="admin-one-half last">
							<p class="admin-info">
								<?php 
                    echo $data['description'];
                    ?>
							</p>
						</div>
					</div>
				<?php 
                }
                ?>
				<?php 
                break;
            case 'select':
                ?>
				<?php 
                if (!@$data['hide_item_html']) {
                    ?>
					<div class="clearfix ">
						<div class="admin-one-half">
						<?php 
                }
                ?>
						<select data-default-value="<?php 
                echo @$data['default_value'];
                ?>
" name="<?php 
                echo $data['name'];
                ?>
" class="<?php 
                echo $data['css_class'];
                ?>
">
							<?php 
                if (!empty($data['values'])) {
                    ?>
								<?php 
                    foreach ($data['values'] as $key => $option_text) {
                        ?>
									<option value="<?php 
                        echo $key;
                        ?>
" <?php 
                        echo $value == $key ? 'selected=""' : "";
                        ?>
><?php 
                        echo $option_text;
                        ?>
</option>
								<?php 
                    }
                    ?>
							<?php 
                }
                ?>
						</select>
						<?php 
                if (!@$data['hide_item_html']) {
                    ?>
						</div>
						<div class="admin-one-half last">
							<p class="admin-info">
								<?php 
                    echo $data['description'];
                    ?>
							</p>
						</div>
					</div>
				<?php 
                }
                ?>
				<?php 
                break;
            case 'checkbox':
                ?>
				<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
					<div class="clearfix">
						<div class="admin-one-half">
							<p>
							<?php 
                }
                ?>
							<input data-default-value="<?php 
                echo @$data['default_value'];
                ?>
" type="hidden" value="<?php 
                echo $value == 1 ? "1" : "0";
                ?>
" name="<?php 
                echo $data['name'];
                ?>
">
							<input type="checkbox" id="<?php 
                echo $data['name'];
                ?>
" class="option_checkbox <?php 
                echo $data['css_class'];
                ?>
" <?php 
                echo $value == 1 ? "checked" : "";
                ?>
 />
							<label for="<?php 
                echo $data['name'];
                ?>
"><span></span><?php 
                echo $data['title'];
                ?>
</label>

							<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
							</p>
						</div>
						<div class="admin-one-half last">
							<p class="admin-info">
								<?php 
                    echo $data['description'];
                    ?>
							</p>
						</div>
					</div>
				<?php 
                }
                ?>
				<?php 
                break;
            case 'color':
                ?>
				<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
					<div class="clearfix ">
						<div class="admin-one-half">
						<?php 
                }
                ?>
						<input data-default-value="<?php 
                echo @$data['default_value'];
                ?>
" value-index="0" type="text" class="bg_hex_color text small <?php 
                echo @$data['css_class'];
                ?>
" value="<?php 
                echo $value;
                ?>
" name="<?php 
                echo $data['name'];
                ?>
">
						<div class="bgpicker" style="background-color: <?php 
                echo $value;
                ?>
"></div>
						<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>

							<?php 
                    if (@$_GET['page'] == 'tmm_theme_options') {
                        ?>
								<a href="javascript:void(0);" class="js_picker_val_back" title="Back">back</a>&nbsp;
								<a href="javascript:void(0);" class="js_picker_val_ahead" title="Forward">forward</a>&nbsp;
								<a href="javascript:void(0);" class="js_picker_val_reset" title="Reset">reset</a>
							<?php 
                    }
                    ?>

						</div>
						<div class="admin-one-half last">
							<p class="admin-info">
								<?php 
                    echo $data['description'];
                    ?>
							</p>
						</div>
					</div>
				<?php 
                }
                ?>
				<?php 
                break;
            case 'google_font_select':
                ?>
				<select data-default-value="" name="<?php 
                echo $data['name'];
                ?>
" class="google_font_select">
					<?php 
                foreach ($data['fonts'] as $font_name) {
                    ?>
						<?php 
                    $font_clean_name = explode(":", $font_name);
                    $font_clean_name = $font_clean_name[0];
                    ?>
						<option <?php 
                    echo $font_clean_name == $value ? "selected" : "";
                    ?>
 value="<?php 
                    echo $font_clean_name;
                    ?>
"><?php 
                    echo $font_name;
                    ?>
</option>
					<?php 
                }
                ?>
				</select>&nbsp;<a title="" class="admin-button button-gray button-medium" href="javascript:add_google_font();void(0);"><?php 
                _e('Browse', 'almera');
                ?>
</a>

				<?php 
                break;
            case 'upload':
                ?>
				<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
					<div class="clearfix ">
						<div class="admin-one-half">
						<?php 
                }
                ?>
						<input data-default-value="" id="<?php 
                echo @$data['id'];
                ?>
" class="middle" type="text" name="<?php 
                echo $data['name'];
                ?>
" value="<?php 
                echo $value;
                ?>
">
						<a class="admin-button button-gray button-medium button_upload" href="#"><?php 
                _e('Browse', 'almera');
                ?>
</a>

						<?php 
                if (@(!$data['hide_item_html'])) {
                    ?>
						</div>
						<div class="admin-one-half last">
							<p class="admin-info">
								<?php 
                    echo $data['description'];
                    ?>
							</p>
						</div>
					</div>
				<?php 
                }
                ?>
				<?php 
                break;
            default:
                _e('Option type does not exist!', 'almera');
                break;
        }
    }
Ejemplo n.º 8
0
echo TMM::get_option("copyright_text");
?>
				</div><!--/ .copyright-->

			</div><!--/ .columns-->

			<div class="eight columns omega">
				
				<?php 
if (!TMM::get_option('hide_social_links')) {
    ?>

					<ul class="social-icons">
                                            
                                             <?php 
    $social_links = TMM::get_option('admin_social_links');
    foreach ($social_links as $key => $value) {
        if (!empty($value)) {
            ?>
                                                <li class="<?php 
            echo $key;
            ?>
"><a target="_blank" href="<?php 
            echo $value;
            ?>
"><span><?php 
            echo $key;
            ?>
</span></a></li>
                                            <?php 
        }
Ejemplo n.º 9
0
 public static function draw_wrapper_bg()
 {
     $disable_body_bg = TMM::get_option('disable_body_bg');
     if (!$disable_body_bg) {
         $body_pattern = TMM::get_option('body_pattern');
         $body_pattern_custom_color = TMM::get_option('body_pattern_custom_color');
         $body_pattern_selected = (int) TMM::get_option('body_pattern_selected');
         $body_bg_color_selected = TMM::get_option('body_bg_color');
         if ($body_pattern_selected == 0 or $body_pattern_selected == 1) {
             if (!empty($body_pattern)) {
                 return "background: url(" . $body_pattern . ") repeat 0 0 " . $body_bg_color_selected . ";";
             } else {
                 return "";
             }
         } else {
             if (!empty($body_pattern_custom_color)) {
                 return "background: " . $body_pattern_custom_color;
             } else {
                 return '';
             }
         }
     }
 }
    <label for="<?php 
echo $widget->get_field_id('form');
?>
"><?php 
_e('Form', 'almera');
?>
:</label>
    <select id="<?php 
echo $widget->get_field_id('form');
?>
" name="<?php 
echo $widget->get_field_name('form');
?>
" class="widefat">
		<?php 
$contact_forms = TMM::get_option('contact_form');
$current_form = $instance['form'];
?>
		<?php 
if (!empty($contact_forms)) {
    ?>
			<?php 
    foreach ($contact_forms as $contact_form) {
        ?>
				<option <?php 
        echo $current_form == $contact_form['title'] ? "selected" : "";
        ?>
 value="<?php 
        echo $contact_form['title'];
        ?>
"><?php 
Ejemplo n.º 11
0
	<div class="entry-meta">
		
		<?php 
    if (TMM::get_option("blog_listing_show_date")) {
        ?>
			<span class="date"><a href="#"><?php 
        echo mysql2date(get_option('date_format'), $post->post_date, false);
        ?>
</a></span>
		<?php 
    }
    ?>
	
			
		<?php 
    if (!TMM::get_option("blog_listing_show_comments")) {
        ?>
	
			<span class="comments"><a href="<?php 
        echo $post_link;
        ?>
#comments"><?php 
        echo get_comments_number($post->ID);
        ?>
</a>&nbsp;<?php 
        _e('Comments', 'tmm_shortcodes');
        ?>
</span>
		<?php 
    }
    ?>
Ejemplo n.º 12
0
add_action('wp_ajax_nopriv_contact_form_request', array('TMM_Contact_Form', 'contact_form_request'));
add_action('wp_ajax_nopriv_add_comment', array('TMM_Helper', 'add_comment'));
add_action('wp_ajax_nopriv_get_google_fonts', array('TMM_HelperFonts', 'get_google_fonts_ajax'));
add_action('wp_ajax_nopriv_get_new_google_fonts', array('TMM_HelperFonts', 'get_new_google_fonts'));
add_action('wp_ajax_nopriv_folio_get_by_folio_id', array('TMM_Portfolio', 'get_by_folio_id'));
add_action('wp_ajax_folio_get_masonry_piece', array('TMM_Portfolio', 'get_masonry_piece'));
add_action('wp_ajax_nopriv_folio_get_masonry_piece', array('TMM_Portfolio', 'get_masonry_piece'));
//--------------------------------------------------------------------------
add_action('admin_menu', 'tmm_theme_add_admin');
add_action('admin_enqueue_scripts', 'tmm_theme_admin_head');
add_action('admin_bar_menu', 'tmm_theme_admin_bar_menu', 89);
//*****
global $pagenow;
if (is_admin() and 'themes.php' == $pagenow and isset($_GET['activated'])) {
    //***** set default options
    $theme_was_activated = TMM::get_option('theme_was_activated');
    if (!$theme_was_activated) {
        //*****
        $menu_id = wp_update_nav_menu_object(0, array('menu-name' => 'Primary Menu'));
        $theme_mods = get_option('theme_mods_' . 'almera');
        $theme_mods['nav_menu_locations']['primary'] = $menu_id;
        update_option('theme_mods_' . 'almera', $theme_mods);
        if (class_exists('TMM_Ext_Shortcodes')) {
            $shortcodes = TMM_Ext_Shortcodes::get_shortcodes_array();
            if (!empty($shortcodes)) {
                foreach ($shortcodes as $shortcode) {
                    TMM::update_option('show_shortcode_' . $shortcode, 1);
                }
            }
        }
        TMM::update_option('theme_was_activated', 1);
            </div><!--/ .bordered-->
            
            <?php 
        }
        ?>

			<?php 
        $event_allday = get_post_meta($post->ID, 'event_allday', true);
        $hide_event_place = get_post_meta($post->ID, 'hide_event_place', true);
        $event_place_address = get_post_meta($post->ID, 'event_place_address', true);
        $ev_mktime = (int) get_post_meta($post->ID, 'ev_mktime', true);
        $event_date = TMM_Event::get_event_date($ev_mktime);
        $ev_end_mktime = (int) get_post_meta($post->ID, 'ev_end_mktime', true);
        $event_end_date = TMM_Event::get_event_date($ev_end_mktime);
        $repeats_every = get_post_meta($post->ID, 'event_repeating', true);
        $events_show_duration = TMM::get_option('events_show_duration');
        if ($events_show_duration) {
            $event_duration_sec = TMM_Event::get_event_duration($ev_mktime, $ev_end_mktime);
            $duration_hh = $event_duration_sec[0];
            $duration_mm = $event_duration_sec[1];
        }
        if ($event_allday == 1) {
            $event_start_time = '';
            $event_end_time = '';
        } else {
            $event_start_time = TMM_Event::get_event_time($ev_mktime);
            $event_end_time = TMM_Event::get_event_time($ev_end_mktime);
        }
        $e_category = get_the_term_list($post->ID, 'events-categories', '', ', ', '');
        ?>
Ejemplo n.º 14
0
    public static function show_custom_sidebars()
    {
        //set areas
        $sidebars = TMM::get_option('sidebars');
        //get current page id
        $type = "page";
        $current_id = 0;
        wp_reset_query();
        global $post;
        if (is_category()) {
            $type = 'cat';
            $current_id = get_query_var('cat');
        } else {
            if (is_page()) {
                $type = 'page';
                $current_id = $post->ID;
            }
        }
        //open wigitised areas
        $show_default_sidebar = true;
        if (is_array($sidebars)) {
            //show custom sidebar
            foreach ($sidebars as $area) {
                if ($type == "cat") {
                    $cat_id = $current_id;
                    if (in_array($cat_id, $area['cat'])) {
                        if ($cat_id != 0) {
                            $show_default_sidebar = false;
                            dynamic_sidebar($area['name']);
                        }
                    }
                } else {
                    $post_id = $current_id;
                    if (in_array($post_id, $area['page'])) {
                        if ($post_id != 0) {
                            $show_default_sidebar = false;
                            dynamic_sidebar($area['name']);
                        }
                    }
                }
            }
        }
        //show default sidebar
        if ($show_default_sidebar) {
            if (function_exists('dynamic_sidebar') and dynamic_sidebar('Thememakers Default Sidebar')) {
            } else {
                ?>
				<div class="widget widget_categories">
					<h3 class="widget-title"><?php 
                _e('Categories', 'almera');
                ?>
</h3>
					<ul class="categories">
						<?php 
                wp_list_categories('sort_column=name&optioncount=1&hierarchical=0&title_li=0');
                ?>
					</ul>                    
				</div>
				<div class="widget widget_calendar">
					<h3 class="widget-title"><?php 
                _e('Calendar', 'almera');
                ?>
</h3>
					<?php 
                get_calendar();
                ?>
				</div>

				<div class="widget widget_meta">
					<h3 class="widget-title"><?php 
                _e('Meta', 'almera');
                ?>
</h3>
					<ul>
						<?php 
                wp_register();
                ?>
						<li>
							<?php 
                wp_loginout();
                ?>
						</li>
						<?php 
                wp_meta();
                ?>
					</ul>

				</div>				

			<?php 
            }
        }
    }
Ejemplo n.º 15
0
        } else {
            $sidebar_position = TMM::get_option("sidebar_position");
        }
        if (!$sidebar_position) {
            $sidebar_position = "sbr";
        }
        //*****
    } else {
        $sidebar_position = 'no_sidebar';
    }
}
//***
//is portfolio archive
if (is_archive()) {
    if (is_post_type_archive(TMM_Portfolio::$slug)) {
        $sidebar_position = TMM::get_option('folio_archive_sidebar');
        if (empty($sidebar_position)) {
            $sidebar_position = 'no_sidebar';
        }
    }
}
$_REQUEST['sidebar_position'] = $sidebar_position;
if (is_post_type_archive() == TMM_Portfolio::$slug) {
    if (is_archive()) {
        $_REQUEST['sidebar_position'] = 'sbr';
        $sidebar_position = 'sbr';
    }
}
?>

		<!-- - - - - - - - - - - - - - - - Dynamic Content - - - - - - - - - - - - - - - - -->
Ejemplo n.º 16
0
 public static function add_tracking_code()
 {
     echo TMM::get_option("tracking_code");
 }
Ejemplo n.º 17
0
<?php

$now = current_time('timestamp');
$start = strtotime(date("Y", $now) . '-' . date("m", $now) . '-' . 01, $now);
$end = mktime(0, 0, 0, date("m", $start) + 1, 1, date("Y", $start));
?>

<h3 class="widget-title"><span id="events_listing_month"></span>&nbsp;<span id="events_listing_year"></span></h3>

<?php 
if (TMM::get_option("events_listing_show_categories") == 1) {
    $args = array('orderby' => 'name', 'order' => 'ASC', 'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(), 'fields' => 'all', 'hierarchical' => true);
    $categories = get_terms(array('events-categories'), $args);
    ?>
	<div class="sel">
		<select id="app_event_listing_categories" autocomplete="off">
			<option value="0"><?php 
    _e('All categories', TMM_EVENTS_PLUGIN_TEXTDOMAIN);
    ?>
</option>
				<?php 
    if (!empty($categories)) {
        foreach ($categories as $cat) {
            ?>
						<option value="<?php 
            echo $cat->term_taxonomy_id;
            ?>
"><?php 
            echo $cat->name;
            ?>
</option>
Ejemplo n.º 18
0
				<div class="entry-body">
					<p><?php 
        if (TMM::get_option("excerpt_symbols_count")) {
            if (empty($post->post_excerpt)) {
                $txt = do_shortcode($post->post_content);
                $txt = strip_tags($txt);
                if (function_exists('mb_substr')) {
                    echo do_shortcode(mb_substr($txt, 0, TMM::get_option("excerpt_symbols_count")) . " ...");
                } else {
                    echo do_shortcode(substr($txt, 0, TMM::get_option("excerpt_symbols_count")) . " ...");
                }
            } else {
                if (function_exists('mb_substr')) {
                    echo do_shortcode(mb_substr($post->post_excerpt, 0, TMM::get_option("excerpt_symbols_count")) . " ...");
                } else {
                    echo do_shortcode(substr($post->post_excerpt, 0, TMM::get_option("excerpt_symbols_count")) . " ...");
                }
            }
        } else {
            echo do_shortcode($post->post_excerpt);
        }
        ?>
</p>
				</div><!--/ .entry-body-->

			</article><!--/ .entry-->

		</div>

			<?php 
    }
Ejemplo n.º 19
0
        ?>

			<?php 
        the_content();
        ?>
                  

		</div><!--/ .columns-->
		<?php 
    }
}
?>
<div class="divider-solid"></div>

<?php 
if (TMM::get_option('gallery_show_recent_galleries')) {
    $args = array('numberposts' => 8, 'post_type' => TMM_Gallery::$slug, 'exclude' => $current_single_gall_id);
    $posts = get_posts($args);
    if (!empty($posts)) {
        ?>

	<h3 class="section-title"><?php 
        _e("Recent Galleries", 'almera');
        ?>
</h3>

	<section class="recent-projects">

		<?php 
        foreach ($posts as $post) {
            ?>
Ejemplo n.º 20
0
?>
                           
               <?php 
if (TMM::get_option("blog_single_show_fb_comments")) {
    ?>
             
                    <div class="fb-comments" data-href="<?php 
    the_permalink();
    ?>
" data-width="680px"></div>

               <?php 
}
?>
               
<?php 
if (TMM::get_option("blog_single_show_comments")) {
    ?>

	<?php 
    comments_template();
    ?>

<?php 
}
?>
                   


<?php 
get_footer();
Ejemplo n.º 21
0
        if (is_object($post)) {
            switch ($post->post_type) {
                case 'post':
                    $meta_title = TMM::get_option("meta_title_post_listing");
                    $meta_keywords = TMM::get_option("meta_keywords_post_listing");
                    $meta_description = TMM::get_option("meta_description_post_listing");
                    break;
                case TMM_Portfolio::$slug:
                    $meta_title = TMM::get_option("meta_title_portfolio_listing");
                    $meta_keywords = TMM::get_option("meta_keywords_portfolio_listing");
                    $meta_description = TMM::get_option("meta_description_portfolio_listing");
                    break;
                case TMM_Gallery::$slug:
                    $meta_title = TMM::get_option("meta_title_gallery_listing");
                    $meta_keywords = TMM::get_option("meta_keywords_gallery_listing");
                    $meta_description = TMM::get_option("meta_description_gallery_listing");
                    break;
                default:
                    break;
            }
        }
        //***
        global $cat;
        $cat_head_seo_data = TMM_SEO_Group::get_cat_head_seo_data($cat);
        if (!empty($cat_head_seo_data['meta_title'])) {
            $meta_title = $cat_head_seo_data['meta_title'];
            $meta_keywords = $cat_head_seo_data['meta_keywords'];
            $meta_description = $cat_head_seo_data['meta_description'];
        }
    }
}
Ejemplo n.º 22
0
<?php

echo TMM::get_option("custom_css");
Ejemplo n.º 23
0
        } else {
            $video_icon = '';
            $th_url = get_grid_image_url($images[$i]);
        }
    }
    ?>
                    <?php 
    $t = implode('', $title);
    ?>
                                        
                    <figure class="gr-figure">
                        <a class="gr-lightbox single-image <?php 
    echo $video_icon;
    ?>
 plus-icon animTop" title="<?php 
    echo $t = TMM::get_option('hide_image_titles') == '0' ? $t : '';
    ?>
" 
                           href="<?php 
    echo get_grid_image_url($images[$i], true);
    ?>
" data-fancybox-group="grid">
                            <img <?php 
    if ($slideup == '1') {
        ?>
 class="slideup" <?php 
    }
    ?>
 src="<?php 
    echo TMM_Helper::resize_image($th_url, '995*995');
    ?>
Ejemplo n.º 24
0
	<?php 
}
?>

</div><!--/ .row-->	

<?php 
wp_reset_query();
?>

<?php 
if ($show_all_posts_button) {
    $permalink = '';
    if (TMM::get_option('blogpage')) {
        $page_id = TMM::get_option('blogpage');
        if (function_exists('icl_object_id')) {
            $page_id = icl_object_id($page_id, 'page', false, ICL_LANGUAGE_CODE);
        }
        $permalink = get_permalink($page_id);
    } else {
        $permalink = home_url();
    }
    ?>

<div class="align-center <?php 
    if ($animation) {
        echo $animation;
    }
    ?>
">
Ejemplo n.º 25
0
function enqueue_script_ajax()
{
    wp_enqueue_script('tmm_theme_social-likes_js', TMM_THEME_URI . '/js/social-likes.js');
    wp_enqueue_style('tmm_theme_social-likes_css', TMM_THEME_URI . '/css/social-likes.css');
    if (TMM::get_option("enable_ajax")) {
        TMM_OptionsHelper::enqueue_script('stapel');
        TMM_OptionsHelper::enqueue_script('isotope');
        TMM_OptionsHelper::enqueue_style('epic_slider');
        TMM_OptionsHelper::enqueue_style('epic_slider_responsive');
        TMM_OptionsHelper::enqueue_script('epic_slider');
        TMM_OptionsHelper::enqueue_script('mobile_touchswipe');
        wp_enqueue_script('tmm_theme_map_api_js', 'http://maps.google.com/maps/api/js?sensor=false');
        wp_enqueue_script('tmm_theme_markerwithlabel_js', TMM_Ext_Shortcodes::get_application_uri() . '/js/autoshortcodes/markerwithlabel.js');
        wp_enqueue_script("tmm_shortcode_google_map_js", TMM_Ext_Shortcodes::get_application_uri() . '/js/autoshortcodes/google_map.js');
        TMM_OptionsHelper::enqueue_script('masonry');
        TMM_OptionsHelper::enqueue_script('resizegrid');
        TMM_OptionsHelper::enqueue_script('sudoslider');
        wp_enqueue_script("tmm_shortcode_contact_form_js", TMM_Ext_Shortcodes::get_application_uri() . '/js/autoshortcodes/contact_form.js');
        wp_enqueue_style("tmm_flexslider_css", TMM_Ext_Sliders::get_application_uri() . '/items/flex/css/styles.css');
        wp_enqueue_script('tmm_flexslider_js', TMM_Ext_Sliders::get_application_uri() . '/items/flex/js/jquery.flexslider-min.js');
        wp_enqueue_script("tmm_theme_mediaelementplayer_js", TMM_Ext_Shortcodes::get_application_uri() . '/js/autoshortcodes/mediaelement/mediaelement-and-player.min.js');
        wp_enqueue_style("tmm_theme_mediaelementplayer_css", TMM_Ext_Shortcodes::get_application_uri() . '/js/autoshortcodes/mediaelement/jquery.mediaelementplayer.css');
        wp_enqueue_script('tmm_widget_recent_projects', TMM_THEME_URI . '/js/widgets/recent_projects.js');
        TMM_OptionsHelper::enqueue_script('mobile_touchswipe');
        wp_enqueue_script('tmm_widget_jflickrfeed', TMM_THEME_URI . '/js/widgets/jquery.jflickrfeed.min.js');
        wp_enqueue_script('tmm_widget_twitterFetcher', TMM_THEME_URI . '/js/widgets/twitterFetcher.js');
        wp_enqueue_script('tmm_widget_testimonials', TMM_THEME_URI . '/js/widgets/testimonials.js');
        wp_enqueue_script('tmm_theme_js_ajax', TMM_THEME_URI . '/js/theme_ajax.js', array('jquery'));
        wp_enqueue_script('tmm_theme_social-likes_js', TMM_THEME_URI . '/js/social-likes.js');
        wp_enqueue_style('tmm_theme_social-likes_css', TMM_THEME_URI . '/css/social-likes.css');
        add_action('comment_post', 'ajaxify_comments', 20, 2);
        wp_enqueue_script('comment-reply');
    }
}
Ejemplo n.º 26
0
                    </div><!--/ .project-thumb-->

                </article><!--/ .columns-->


                <?php 
        }
    }
    ?>
        <?php 
    wp_reset_query();
    ?>
    </section><!--/ .recent-projects-->
<?php 
}
if (TMM::get_option("folio_single_show_fb_comments")) {
    ?>
             
    <div class="fb-comments" data-href="<?php 
    the_permalink();
    ?>
" data-width="680px"></div>

<?php 
}
if (TMM::get_option("folio_single_show_comments")) {
    ?>
    <?php 
    comments_template();
}
get_footer();
Ejemplo n.º 27
0
 public static function get_slider_js_options($slider_type)
 {
     $options_list = self::$slider_js_options[$slider_type];
     $options = array();
     if (!empty($options_list)) {
         foreach ($options_list as $option_key => $values) {
             $option = TMM::get_option("slider_" . $slider_type . "_" . $option_key);
             if (empty($option) and !is_numeric($option)) {
                 $option = $values['default'];
             }
             $options[$option_key] = $option;
         }
     }
     return $options;
 }
Ejemplo n.º 28
0
    die('No direct access allowed');
}
/*
 Template Name: Folio Layout 1(Grid)
*/
get_header('folio');
$folio_post_id = 0;
?>

<div class="ajax">

	<?php 
if (TMM::get_option('folio_tpl_show_folios_bar')) {
    ?>
		<?php 
    $folios = TMM::get_option('folio_template1_items');
    ?>
		<?php 
    if (!empty($folios)) {
        ?>
			<ul class="scroll-box-nav" id="folio_categories_bar">
				<?php 
        foreach ($folios as $post_id) {
            ?>
					<?php 
            if ($folio_post_id == 0) {
                $folio_post_id = $post_id;
            }
            ?>
					<li><a href="#" data-post-id="<?php 
            echo $post_id;
Ejemplo n.º 29
0
    echo $video_icon;
    ?>
" data-video-youtube="<?php 
    echo $data_youtube;
    ?>
" data-video-vimeo="<?php 
    echo $data_vimeo;
    ?>
" src="<?php 
    echo $th_url;
    ?>
" alt="" data-title="#caption-<?php 
    echo $i;
    ?>
" title="<?php 
    echo $t = TMM::get_option('hide_image_titles') == '0' ? '#caption-' . $i : '';
    ?>
" />
				<?php 
}
?>
			</div><!--/ #slides-->

			<?php 
for ($i = 0; $i < count($images); $i++) {
    ?>
				<?php 
    if (!empty($images[$i]['title'])) {
        ?>
					<div id="caption-<?php 
        echo $i;
Ejemplo n.º 30
0
	<?php 
if ($instance['title'] != '') {
    ?>

		<h3 class="widget-title"><?php 
    echo $instance['title'];
    ?>
</h3>

	<?php 
}
?>

	<div class="widget-container">
                <?php 
$colorscheme = TMM::get_option('dark') == '1' ? 'dark' : 'light';
?>
		<iframe src="http://www.facebook.com/plugins/likebox.php?id=<?php 
echo $instance['pageID'];
?>
&connections=<?php 
echo $instance['connection'];
?>
&width=200&height=<?php 
echo $instance['height'];
?>
&colorscheme=<?php 
echo $colorscheme;
?>
&show_border=false&header=<?php 
echo $instance['header'] ? 1 : 0;