PluginProbe
E2Pdf – Export Pdf Tool for WordPress / 1.32.23
E2Pdf – Export Pdf Tool for WordPress v1.32.23
1.32.49 1.32.48 1.32.43 1.32.40 1.32.34 1.32.32 1.32.31 1.32.26 1.32.22 1.32.23 1.32.18 1.32.17 1.32.15 trunk 1.00.00 1.00.13 1.01.01 1.02.02 1.03.07 1.04.07 1.05.03 1.06.02 1.07.11 1.08.00 1.08.06 All 72 releases
e2pdf / classes / helper / e2pdf-get.php

e2pdf-get.php in E2Pdf – Export Pdf Tool for WordPress 1.32.23, at classes/helper/e2pdf-get.php

44 lines 905 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * File: /helper/e2pdf-get.php
5 *
6 * @package E2Pdf
7 * @license GPLv3
8 * @link https://e2pdf.com
9 */
10 if (!defined('ABSPATH')) {
11 die('Access denied.');
12 }
13
14 class Helper_E2pdf_Get {
15
16 private $get = [];
17 private $page;
18
19 // construct
20 public function __construct($url) {
21 // phpcs:ignore WordPress.Security.NonceVerification.Recommended
22 $args = array_merge(wp_parse_args($url), $_GET);
23 if (isset($args['page'])) {
24 $this->page = $args['page'];
25 unset($args['page']);
26 }
27 $this->get = $args;
28 }
29
30 // get
31 public function get($key = false) {
32 if (!$key) {
33 return !empty($this->get) ? $this->get : [];
34 } else {
35 return isset($this->get[$key]) ? $this->get[$key] : null;
36 }
37 }
38
39 // get page
40 public function get_page() {
41 return $this->page;
42 }
43 }
44