| 1 |
<?php |
| 2 |
|
| 3 |
namespace LearnPress\Filters; |
| 4 |
|
| 5 |
defined( 'ABSPATH' ) || exit(); |
| 6 |
|
| 7 |
/** |
| 8 |
* Class PostFilter |
| 9 |
* |
| 10 |
* Filter post type of LP |
| 11 |
* |
| 12 |
* @version 1.0.0 |
| 13 |
* @since 4.2.9.3 |
| 14 |
*/ |
| 15 |
class PostFilter extends FilterBase { |
| 16 |
const COL_ID = 'ID'; |
| 17 |
const COL_POST_AUTHOR = 'post_author'; |
| 18 |
const COL_POST_DATE = 'post_date'; |
| 19 |
const COL_POST_DATE_GMT = 'post_date_gmt'; |
| 20 |
const COL_POST_CONTENT = 'post_content'; |
| 21 |
const COL_POST_TITLE = 'post_title'; |
| 22 |
const COL_POST_EXCERPT = 'post_excerpt'; |
| 23 |
const COL_POST_STATUS = 'post_status'; |
| 24 |
const COL_COMMENT_STATUS = 'comment_status'; |
| 25 |
const COL_PING_STATUS = 'ping_status'; |
| 26 |
const COL_POST_PASSWORD = 'post_password'; |
| 27 |
const COL_POST_NAME = 'post_name'; |
| 28 |
const COL_TO_PING = 'to_ping'; |
| 29 |
const COL_PINGED = 'pinged'; |
| 30 |
const COL_POST_MODIFIED = 'post_modified'; |
| 31 |
const COL_POST_MODIFIED_GMT = 'post_modified_gmt'; |
| 32 |
const COL_POST_CONTENT_FILTERED = 'post_content_filtered'; |
| 33 |
const COL_POST_PARENT = 'post_parent'; |
| 34 |
const COL_GUID = 'guid'; |
| 35 |
const COL_MENU_ORDER = 'menu_order'; |
| 36 |
const COL_POST_TYPE = 'post_type'; |
| 37 |
const COL_POST_MIME_TYPE = 'post_mime_type'; |
| 38 |
const COL_COMMENT_COUNT = 'comment_count'; |
| 39 |
/** |
| 40 |
* @var string[] |
| 41 |
*/ |
| 42 |
public $all_fields = [ |
| 43 |
self::COL_ID, |
| 44 |
self::COL_POST_AUTHOR, |
| 45 |
self::COL_POST_DATE, |
| 46 |
self::COL_POST_DATE_GMT, |
| 47 |
self::COL_POST_CONTENT, |
| 48 |
self::COL_POST_TITLE, |
| 49 |
self::COL_POST_EXCERPT, |
| 50 |
self::COL_POST_STATUS, |
| 51 |
self::COL_COMMENT_STATUS, |
| 52 |
self::COL_PING_STATUS, |
| 53 |
self::COL_POST_PASSWORD, |
| 54 |
self::COL_POST_NAME, |
| 55 |
self::COL_TO_PING, |
| 56 |
self::COL_PINGED, |
| 57 |
self::COL_POST_MODIFIED, |
| 58 |
self::COL_POST_MODIFIED_GMT, |
| 59 |
self::COL_POST_CONTENT_FILTERED, |
| 60 |
self::COL_POST_PARENT, |
| 61 |
self::COL_GUID, |
| 62 |
self::COL_MENU_ORDER, |
| 63 |
self::COL_POST_TYPE, |
| 64 |
self::COL_POST_MIME_TYPE, |
| 65 |
self::COL_COMMENT_COUNT, |
| 66 |
]; |
| 67 |
/** |
| 68 |
* @var int |
| 69 |
*/ |
| 70 |
public $ID; |
| 71 |
/** |
| 72 |
* @var string |
| 73 |
*/ |
| 74 |
public $post_type = 'post'; |
| 75 |
/** |
| 76 |
* @var string |
| 77 |
*/ |
| 78 |
public $post_title; |
| 79 |
/** |
| 80 |
* @var string |
| 81 |
*/ |
| 82 |
public $post_name; |
| 83 |
/** |
| 84 |
* @var string[] |
| 85 |
*/ |
| 86 |
public array $post_status = []; |
| 87 |
/** |
| 88 |
* @var int |
| 89 |
*/ |
| 90 |
public $post_author; |
| 91 |
/** |
| 92 |
* @var int[] |
| 93 |
*/ |
| 94 |
public $post_authors = []; |
| 95 |
/** |
| 96 |
* @var array |
| 97 |
*/ |
| 98 |
public $term_ids = []; |
| 99 |
/** |
| 100 |
* @var array |
| 101 |
*/ |
| 102 |
public $tag_ids = []; |
| 103 |
/** |
| 104 |
* @var array |
| 105 |
*/ |
| 106 |
public $post_ids = []; |
| 107 |
/** |
| 108 |
* @var string |
| 109 |
*/ |
| 110 |
public $taxonomy; |
| 111 |
/** |
| 112 |
* @var int @since 4.3.9 |
| 113 |
*/ |
| 114 |
public $post_parent; |
| 115 |
|
| 116 |
public function __construct() {} |
| 117 |
} |
| 118 |
|