PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.1.6.9.3
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.1.6.9.3
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / databases / class-lp-section-items-db.php

class-lp-section-items-db.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.1.6.9.3, at inc/databases/class-lp-section-items-db.php

52 lines 1008 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7 /**
8 * Class LP_Section_Items_DB
9 */
10
11 class LP_Section_Items_DB extends LP_Database {
12 public static $_instance;
13
14 public function __construct() {
15 parent::__construct();
16 }
17
18 public static function getInstance() {
19 if ( is_null( self::$_instance ) ) {
20 self::$_instance = new self();
21 }
22
23 return self::$_instance;
24 }
25
26 /**
27 * Get section items
28 *
29 * @throws Exception
30 * @since 4.1.6
31 * @version 1.0.0
32 * @return array|null|int|string
33 */
34 public function get_section_items( LP_Section_Items_Filter $filter ) {
35 $default_fields = $this->get_cols_of_table( $this->tb_lp_section_items );
36 $filter->fields = array_merge( $default_fields, $filter->fields );
37
38 if ( empty( $filter->collection ) ) {
39 $filter->collection = $this->tb_lp_section_items;
40 }
41
42 if ( empty( $filter->collection_alias ) ) {
43 $filter->collection_alias = 'si';
44 }
45
46 return $this->execute( $filter );
47 }
48 }
49
50 LP_Section_DB::getInstance();
51
52