PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 2.0.3
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v2.0.3
3.5.2 3.5.1 3.5.0 3.4.8 3.4.7 3.4.6 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.6.1 1.6.7 1.7.0 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.2 1.7.2.1 1.7.2.2 1.7.3 1.7.4 1.7.5 1.7.5.1 1.7.5.2 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.8.0 1.8.0.1 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.0.1 1.9.1 1.9.2 1.9.3 1.9.4 1.9.4.1 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.0.1 2.0.1 2.0.2 2.0.3 2.0.3.1 2.0.4 2.0.4.1 2.0.5 2.0.6 2.0.7 2.0.8 2.0.8.1 2.0.9 3.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.3.1 3.0.4 3.0.4.1 3.0.4.2 3.0.5 3.0.5.1 3.0.5.2 3.0.6 3.0.6.1 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.0.9.1 3.0.9.2 3.0.9.3 3.0.9.4 3.0.9.5 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.2.1 3.4.3 3.4.4 3.4.5 trunk 1.0 1.0.1 1.0.2 1.0.3
everest-forms / includes / admin / class-evf-admin-addons.php
everest-forms / includes / admin Last commit date
builder 2 years ago plugin-updates 8 years ago settings 2 years ago views 2 years ago class-evf-admin-addons.php 4 years ago class-evf-admin-assets.php 2 years ago class-evf-admin-builder.php 7 years ago class-evf-admin-deactivation-feedback.php 3 years ago class-evf-admin-editor.php 4 years ago class-evf-admin-entries-table-list.php 3 years ago class-evf-admin-entries.php 4 years ago class-evf-admin-form-templates.php 3 years ago class-evf-admin-forms-table-list.php 3 years ago class-evf-admin-forms.php 3 years ago class-evf-admin-import-export.php 4 years ago class-evf-admin-menus.php 2 years ago class-evf-admin-notices.php 3 years ago class-evf-admin-settings.php 2 years ago class-evf-admin-tools.php 4 years ago class-evf-admin-welcome.php 2 years ago class-evf-admin.php 2 years ago evf-admin-functions.php 3 years ago
class-evf-admin-addons.php
87 lines
1 <?php
2 /**
3 * Addons Page
4 *
5 * @package EverestForms/Admin
6 * @version 1.6.0
7 */
8
9 defined( 'ABSPATH' ) || exit;
10
11 /**
12 * Addons Class.
13 */
14 class EVF_Admin_Addons {
15
16 /**
17 * Get sections for the addons screen.
18 *
19 * @return array of objects
20 */
21 public static function get_sections() {
22 $addon_sections = get_transient( 'evf_addons_sections_list' );
23
24 if ( false === $addon_sections ) {
25 $addon_sections = evf_get_json_file_contents( 'assets/extensions-json/addon-sections.json' );
26
27 if ( $addon_sections ) {
28 set_transient( 'evf_addons_sections_list', $addon_sections, WEEK_IN_SECONDS );
29 }
30 }
31
32 return apply_filters( 'everest_forms_extensions_sections', $addon_sections );
33 }
34
35 /**
36 * Get section content for the extensions screen.
37 *
38 * @return array
39 */
40 public static function get_extension_data() {
41 $extension_data = get_transient( 'evf_extensions_section_list' );
42
43 if ( false === $extension_data ) {
44 $extension_data = evf_get_json_file_contents( 'assets/extensions-json/sections/all_extensions.json' );
45
46 if ( ! empty( $extension_data->products ) ) {
47 set_transient( 'evf_extensions_section_list', $extension_data, WEEK_IN_SECONDS );
48 }
49 }
50
51 return apply_filters( 'everest_forms_extensions_section_data', $extension_data->products );
52 }
53
54 /**
55 * Handles output of the addons page in admin.
56 */
57 public static function output() {
58 $addons = array();
59 $sections = self::get_sections();
60 $refresh_url = add_query_arg(
61 array(
62 'page' => 'evf-addons',
63 'action' => 'evf-addons-refresh',
64 'evf-addons-nonce' => wp_create_nonce( 'refresh' ),
65 ),
66 admin_url( 'admin.php' )
67 );
68 $license_plan = evf_get_license_plan();
69 $current_section = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : '_all'; // phpcs:ignore WordPress.Security.NonceVerification
70
71 if ( '_featured' !== $current_section ) {
72 $category = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification
73 $addons = self::get_extension_data( $category );
74 }
75
76 /**
77 * Addon page view.
78 *
79 * @uses $addons
80 * @uses $sections
81 * @uses $refresh_url
82 * @uses $current_section
83 */
84 include_once dirname( __FILE__ ) . '/views/html-admin-page-addons.php';
85 }
86 }
87