| @@ 684-696 (lines=13) @@ | ||
| 681 | * |
|
| 682 | * @return array The waiting to be processed post ids queue. |
|
| 683 | */ |
|
| 684 | public function waiting_for_analysis() { |
|
| 685 | ||
| 686 | return get_posts( array( |
|
| 687 | 'posts_per_page' => - 1, |
|
| 688 | 'fields' => 'ids', |
|
| 689 | 'post_status' => 'any', |
|
| 690 | 'meta_key' => self::STATE_META_KEY, |
|
| 691 | 'meta_value' => self::STATE_SUBMIT, |
|
| 692 | 'orderby' => 'ID', |
|
| 693 | 'post_type' => 'any', |
|
| 694 | // Add any because posts from multiple posts types may be waiting. |
|
| 695 | ) ); |
|
| 696 | } |
|
| 697 | ||
| 698 | /** |
|
| 699 | * Get the array of post IDS waiting for response. |
|
| @@ 706-718 (lines=13) @@ | ||
| 703 | * |
|
| 704 | * @return array The waiting for response post ids queue. |
|
| 705 | */ |
|
| 706 | public function waiting_for_response() { |
|
| 707 | ||
| 708 | return get_posts( array( |
|
| 709 | 'posts_per_page' => - 1, |
|
| 710 | 'fields' => 'ids', |
|
| 711 | 'post_status' => 'any', |
|
| 712 | 'meta_key' => self::STATE_META_KEY, |
|
| 713 | 'meta_value' => self::STATE_REQUEST, |
|
| 714 | 'orderby' => 'ID', |
|
| 715 | 'post_type' => 'any', |
|
| 716 | // Add any because posts from multiple posts types may be waiting. |
|
| 717 | ) ); |
|
| 718 | } |
|
| 719 | ||
| 720 | /** |
|
| 721 | * Request the analysis for the specified {@link WP_Post}. |
|
| @@ 814-825 (lines=12) @@ | ||
| 811 | * |
|
| 812 | * @return array An array of {@link WP_Post}s' ids. |
|
| 813 | */ |
|
| 814 | public function get_warnings() { |
|
| 815 | ||
| 816 | return get_posts( array( |
|
| 817 | 'fields' => 'ids', |
|
| 818 | 'numberposts' => - 1, |
|
| 819 | 'post_status' => 'any', |
|
| 820 | 'meta_key' => self::WARNING_META_KEY, |
|
| 821 | 'meta_value' => 'yes', |
|
| 822 | 'post_type' => 'any', |
|
| 823 | // Add any because posts from multiple posts types may be waiting. |
|
| 824 | ) ); |
|
| 825 | } |
|
| 826 | ||
| 827 | /** |
|
| 828 | * Check whether the term has entity type associated and set default term if it hasn't. |
|