예제 #1
0
    private function show_atts_table()
    {
        require_once EL_PATH . 'includes/sc_event-list.php';
        $shortcode =& SC_Event_List::get_instance();
        $shortcode->load_sc_eventlist_helptexts();
        $atts = $shortcode->get_atts();
        $out = '
			<table class="el-atts-table">
				<tr>
					<th class="el-atts-table-name">' . __('Attribute name', 'event-list') . '</th>
					<th class="el-atts-table-options">' . __('Value options', 'event-list') . '</th>
					<th class="el-atts-table-default">' . __('Default value', 'event-list') . '</th>
					<th class="el-atts-table-desc">' . __('Description', 'event-list') . '</th>
				</tr>';
        foreach ($atts as $aname => $a) {
            $out .= '
				<tr>
					<td>' . $aname . '</td>
					<td>' . $a['val'] . '</td>
					<td>' . $a['std_val'] . '</td>
					<td>' . $a['desc'] . '</td>
				</tr>';
        }
        $out .= '
			</table>';
        return $out;
    }
예제 #2
0
 public function shortcode_event_list($atts)
 {
     if (NULL == $this->shortcode) {
         require_once EL_PATH . 'includes/sc_event-list.php';
         $this->shortcode = SC_Event_List::get_instance();
     }
     return $this->shortcode->show_html($atts);
 }
 public static function &get_instance()
 {
     // Create class instance if required
     if (!isset(self::$instance)) {
         self::$instance = new SC_Event_List();
     }
     // Return class instance
     return self::$instance;
 }
예제 #4
0
 public function shortcode_event_list($atts)
 {
     if (null == $this->shortcode) {
         require_once EL_PATH . 'includes/sc_event-list.php';
         $this->shortcode = SC_Event_List::get_instance();
         if (!$this->styles_loaded) {
             // normally styles are loaded with wp_print_styles action in head
             // but if the shortcode is not in post content (e.g. included in a theme) it must be loaded here
             $this->enqueue_styles();
         }
     }
     return $this->shortcode->show_html($atts);
 }