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');
         }
     }
 }