Example #1
0
 /**
  * Return an instance of this class.
  *
  * @since     1.0.0
  *
  * @return    object    A single instance of this class.
  */
 public static function get_instance()
 {
     // If the single instance hasn't been set, set it now.
     if (null == self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Example #2
0
 public static function render_rows_choose($post_id)
 {
     $html_rows = '';
     if (is_int($post_id)) {
         $args = array('post_parent' => $post_id, 'post_type' => DLN_SLUG_CHOOSE, 'post_status' => 'publish', 'orderby' => 'ID', 'order' => 'ASC');
         $posts = get_posts($args);
         foreach ($posts as $i => $item) {
             $multiple = get_post_meta($item->ID, 'choose_multiple', true);
             $html_rows .= DLN_Choose::render_row_choose_html($item->ID, $item->post_title, $multiple);
         }
     }
     return $html_rows;
 }