function form($instance)
 {
     //Defaults
     $defaults = array('title' => __('Upcoming Events', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'count' => 3, 'month_deep' => 1);
     $instance = wp_parse_args((array) $instance, $defaults);
     $args = array();
     $args['instance'] = $instance;
     $args['widget'] = $this;
     echo TMM::draw_free_page(TMM_EVENTS_PLUGIN_PATH . 'views/widgets/upcoming_events_form.php', $args);
 }
 function form($instance)
 {
     //Defaults
     $defaults = array('boxtitle' => __('Soonest Event', TMM_EVENTS_PLUGIN_TEXTDOMAIN), 'show_title' => 0, 'month_deep' => 1, 'show_time_zone' => 1);
     $instance = wp_parse_args((array) $instance, $defaults);
     $args = array();
     $args['instance'] = $instance;
     $args['widget'] = $this;
     echo TMM::draw_free_page(TMM_EVENTS_PLUGIN_PATH . 'views/widgets/soonest_event_form.php', $args);
 }
 function form($instance)
 {
     //Defaults
     $defaults = array('title' => __('Events Calendar', TMM_EVENTS_PLUGIN_TEXTDOMAIN));
     $instance = wp_parse_args((array) $instance, $defaults);
     $args = array();
     $args['instance'] = $instance;
     $args['widget'] = $this;
     echo TMM::draw_free_page(TMM_EVENTS_PLUGIN_PATH . 'views/widgets/calendar_form.php', $args);
 }
Example #4
0
/**
 * Add Settings tab.
 */
function tmm_migrate_add_settings_tab()
{
    if (current_user_can('manage_options')) {
        if (class_exists('TMM_OptionsHelper')) {
            $content = array();
            $tmpl_path = TMM_MIGRATE_PATH . '/views/theme_options_tab.php';
            $content[TMM_MIGRATE_TEXTDOMAIN] = array('title' => '', 'type' => 'custom', 'custom_html' => TMM::draw_free_page($tmpl_path), 'show_title' => false);
            $sections = array('name' => __("Import / Export", TMM_MIGRATE_TEXTDOMAIN), 'css_class' => 'shortcut-plugins', 'show_general_page' => true, 'content' => $content, 'child_sections' => array(), 'menu_icon' => 'dashicons-admin-tools');
            TMM_OptionsHelper::$sections[TMM_MIGRATE_TEXTDOMAIN] = $sections;
        }
    }
}
 public static function draw_front($post_id, $row_displaying)
 {
     $tmm_layout_constructor = get_post_meta($post_id, 'thememakers_layout_constructor', true);
     if (!empty($tmm_layout_constructor)) {
         $data = array();
         $data['row_displaying'] = $row_displaying;
         $data['tmm_layout_constructor'] = $tmm_layout_constructor;
         $data['tmm_layout_constructor_row'] = get_post_meta($post_id, 'thememakers_layout_constructor_row', true);
         if (!is_array($data['tmm_layout_constructor_row'])) {
             $data['tmm_layout_constructor_row'] = array();
         }
         echo TMM::draw_free_page(TMM_CC_DIR . '/views/front_output.php', $data);
     }
 }
Example #6
0
 public static function draw_group_slider($post_id, $page_slider_type, $alias = 0)
 {
     if (!isset(self::$slider_options[$page_slider_type])) {
         return "";
     }
     $data = array();
     $data['post_id'] = $post_id;
     $data['slides'] = self::get_page_slides($post_id);
     $data['options'] = self::get_slider_js_options($page_slider_type);
     $data['alias'] = $alias;
     $_REQUEST['page_slider_activated'] = TRUE;
     //if I need to know is page slider activated
     return TMM::draw_free_page(self::get_application_path() . '/items/' . $page_slider_type . '/views/page_output.php', $data);
 }
Example #7
0
/**
 * Add Settings tab.
 */
function tmm_addthis_add_settings_tab()
{
    if (current_user_can('manage_options')) {
        if (class_exists('TMM_OptionsHelper')) {
            $content = array();
            $tmpl_path = TMM_AddThis_Controller::get_application_path() . '/views/theme_options_tab.php';
            $content['tmm_addthis'] = array('title' => '', 'type' => 'custom', 'custom_html' => TMM::draw_free_page($tmpl_path), 'show_title' => false);
            $sections = array('name' => __("Add This Share", 'tmm_addthis'), 'css_class' => 'shortcut-plugins', 'show_general_page' => true, 'content' => $content, 'child_sections' => array(), 'menu_icon' => 'dashicons-share');
            TMM_OptionsHelper::$sections['tmm_addthis'] = $sections;
        }
    }
}
 public static function event_attributes()
 {
     global $post;
     $now = date('d-m-Y');
     $data = array();
     $custom = get_post_custom($post->ID);
     $data['event_date'] = !empty($custom) ? $custom['event_date'][0] : $now;
     $data['event_end_date'] = !empty($custom) ? $custom['event_end_date'][0] : $now;
     $data['event_hh'] = !empty($custom) ? $custom['event_hh'][0] : 12;
     $data['event_mm'] = !empty($custom) && isset($custom['event_mm']) ? $custom['event_mm'][0] : 0;
     $data['event_end_hh'] = !empty($custom) ? $custom['event_end_hh'][0] : 12;
     $data['event_end_mm'] = !empty($custom) && isset($custom['event_end_mm']) ? $custom['event_end_mm'][0] : 0;
     $data['event_repeating'] = !empty($custom) ? $custom['event_repeating'][0] : 'no';
     $data['event_repeating_week'] = !empty($custom) && isset($custom['event_repeating_week'][0]) ? $custom['event_repeating_week'][0] : '';
     $data['hide_event_place'] = !empty($custom) && isset($custom['hide_event_place']) ? $custom['hide_event_place'][0] : 1;
     $data['event_allday'] = !empty($custom) && isset($custom['event_allday']) ? $custom['event_allday'][0] : 0;
     $data['event_place_address'] = !empty($custom) && isset($custom['event_place_address']) ? $custom['event_place_address'][0] : '';
     $data['event_map_zoom'] = !empty($custom) ? $custom['event_map_zoom'][0] : 14;
     $data['event_map_latitude'] = !empty($custom) ? $custom['event_map_latitude'][0] : '40.714623';
     $data['event_map_longitude'] = !empty($custom) ? $custom['event_map_longitude'][0] : '-74.006605';
     wp_enqueue_script('jquery-ui-datepicker');
     echo TMM::draw_free_page(TMM_EVENTS_PLUGIN_PATH . '/views/admin/event_attributes.php', $data);
 }
Example #9
0
<?php

if (!defined('ABSPATH')) {
    die('No direct access allowed');
}
?>
<input type="hidden" value="1" name="tmm_meta_saving" />
<p><a href="#" class="js_add_slide button button-primary"><?php 
_e('Add slides', 'almera');
?>
</a></p>

<div id="tmm_slide_group">
	<?php 
if (!empty($slides_group)) {
    ?>
		<?php 
    foreach ($slides_group as $group) {
        ?>
			<?php 
        echo TMM::draw_free_page(TMM_Ext_Sliders::get_application_path() . '/views/meta_slide_item.php', array('group' => $group));
        ?>
		<?php 
    }
    ?>
	<?php 
}
?>
</div>

<div class="clear"></div>
Example #10
0
function tmm_theme_admin()
{
    echo TMM::draw_free_page(TMM_THEME_PATH . '/admin/theme_options/theme_options.php');
}
Example #11
0
 public static function draw_front($post_id)
 {
     $tmm_layout_constructor = get_post_meta($post_id, 'thememakers_layout_constructor', true);
     if (!empty($tmm_layout_constructor)) {
         $data = array();
         $data['tmm_layout_constructor'] = $tmm_layout_constructor;
         $data['tmm_layout_constructor_row'] = get_post_meta($post_id, 'thememakers_layout_constructor_row', true);
         if (!is_array($data['tmm_layout_constructor_row'])) {
             $data['tmm_layout_constructor_row'] = array();
         }
         echo trim(TMM::draw_free_page(self::get_application_path() . '/views/front_output.php', $data));
         return;
     }
     echo "";
     return;
 }
 public static function get_events_listing()
 {
     $request_start = 0;
     $request_end = 0;
     $category = 0;
     $is_ajax = 0;
     if (isset($_REQUEST['is_ajax'])) {
         $is_ajax = (int) $_REQUEST['is_ajax'];
     }
     if (isset($_REQUEST['start'])) {
         $request_start = (int) $_REQUEST['start'];
     }
     if (isset($_REQUEST['end'])) {
         $request_end = (int) $_REQUEST['end'];
     }
     if (isset($_REQUEST['category'])) {
         $category = (int) $_REQUEST['category'];
     }
     $now = current_time('timestamp');
     $start = $request_start != 0 ? $request_start : $now;
     $days_in_curr_month = date('t', @mktime(0, 0, 0, date("m", $start), 1, date("Y", $start)));
     $distance = 60 * 60 * 24 * $days_in_curr_month - 1;
     if ($request_end == 0) {
         $end = $start + $distance;
     } else {
         $end = $request_end;
     }
     if ($request_start == 0) {
         //current month
         $distance = $end - $start;
     }
     $events = self::get_events($start, $end, $category);
     //events filtering
     $filtered_events = array();
     if (!empty($events)) {
         foreach ($events as $key => $value) {
             if ($value['end_mktime'] < $start) {
                 unset($events[$key]);
                 continue;
             }
             if ($_REQUEST['end'] > 0 && $value['start_mktime'] > $_REQUEST['end']) {
                 unset($events[$key]);
                 continue;
             }
             $filtered_events[] = $value;
         }
     }
     usort($filtered_events, function ($a, $b) {
         return $a['start_mktime'] < $b['start_mktime'] ? -1 : 1;
     });
     $events = $filtered_events;
     $args = array();
     $args['events'] = $events;
     $result = array();
     $result['html'] = TMM::draw_free_page(TMM_EVENTS_PLUGIN_PATH . '/views/templates/events_list_part.php', $args);
     $result['count'] = count($events);
     $result['year'] = date("Y", $start);
     $result['month'] = TMM_Helper::get_monts_names(date("m", $start) - 1);
     $result['month_num'] = date("m", $start);
     $result['next_time'] = $end + 1;
     $result['prev_time'] = $end - $distance - 1;
     if ($result['prev_time'] < $now) {
         $result['prev_time'] = $now;
     }
     $result['prev_time'] = strtotime(date("Y", $result['prev_time']) . '-' . date("m", $result['prev_time']) . '-' . 1 . " " . 00 . ":" . 00 . ":" . 00, $now);
     if ($is_ajax) {
         echo json_encode($result);
         exit;
     } else {
         return $result['html'];
     }
 }