PluginProbe
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment / 3.1.7
FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment v3.1.7
3.1.14 3.1.13 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 All 123 releases
firebox / Inc / Framework / Inc / Helpers / PagesHelper.php

PagesHelper.php in FireBox – WooCommerce Popup Builder, Exit Intent Popup, Email Optin & Cart Abandonment 3.1.7, at Inc/Framework/Inc/Helpers/PagesHelper.php

92 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package FirePlugins Framework
4 * @version 1.1.146
5 *
6 * @author FirePlugins <[email protected]>
7 * @link https://www.fireplugins.com
8 * @copyright Copyright © 2026 FirePlugins All Rights Reserved
9 * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
10 */
11
12 namespace FPFramework\Helpers;
13
14 if (!defined('ABSPATH'))
15 {
16 exit; // Exit if accessed directly.
17 }
18
19 class PagesHelper
20 {
21 /**
22 * Posts Base Helper
23 *
24 * @var PostsBaseHelper
25 */
26 private $helper;
27
28 public function __construct($helper = null)
29 {
30 if (!$helper)
31 {
32 $helper = new PostsBaseHelper();
33 }
34
35 $this->helper = $helper;
36 }
37
38 /**
39 * Parses given data to a key,value array
40 *
41 * @param array $items
42 *
43 * @return array
44 */
45 public static function parseData($items)
46 {
47 return PostsBaseHelper::parseData($items);
48 }
49
50 /**
51 * Returns items based on offset and limit
52 *
53 * @param integer $offset
54 * @param integer $limit
55 * @param String $post_type
56 *
57 * @return array
58 */
59 public function getItems($offset = 0, $limit = SearchDropdownHelper::SELECTION_ITEMS, $post_type = 'page')
60 {
61 return $this->helper->getItems($offset, $limit, $post_type);
62 }
63
64 /**
65 * Gets Pages from the Selected Items
66 *
67 * @param array $items
68 * @param String $post_type
69 *
70 * @return array
71 */
72 public function getSelectedItems($items, $post_type = 'page')
73 {
74 $post_type = !is_string($post_type) ? 'page' : $post_type;
75
76 return $this->helper->getSelectedItems($items, $post_type);
77 }
78
79 /**
80 * Searches the pages and returns an array of items
81 *
82 * @param String $name
83 * @param array $no_ids List of already added items
84 * @param String $post_type
85 *
86 * @return array
87 */
88 public function getSearchItems($name, $no_ids = null, $post_type = 'page')
89 {
90 return $this->helper->getSearchItems($name, $no_ids, $post_type);
91 }
92 }