PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 3.5.2
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v3.5.2
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 3 weeks ago form-migrator 3 weeks ago plugin-updates 8 years ago settings 3 weeks ago views 3 weeks ago class-evf-admin-addons.php 4 months ago class-evf-admin-assets.php 4 days ago class-evf-admin-builder.php 2 months ago class-evf-admin-dashboard.php 3 weeks ago class-evf-admin-editor.php 4 years ago class-evf-admin-embed-wizard.php 2 years ago class-evf-admin-entries-table-list.php 2 months ago class-evf-admin-entries.php 2 months ago class-evf-admin-form-templates.php 3 weeks ago class-evf-admin-forms-table-list.php 4 months ago class-evf-admin-forms.php 4 months ago class-evf-admin-import-export.php 3 weeks ago class-evf-admin-menus.php 3 weeks ago class-evf-admin-notices.php 4 months ago class-evf-admin-preview-confirmation.php 11 months ago class-evf-admin-settings.php 3 weeks ago class-evf-admin-tools.php 2 months ago class-evf-admin-welcome.php 2 years ago class-evf-admin.php 2 months ago class-evf-base-list-table.php 4 months ago evf-admin-functions.php 3 weeks ago
class-evf-admin-addons.php
86 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 if ( false === $extension_data ) {
43 $extension_data = evf_get_json_file_contents( 'assets/extensions-json/sections/all_extensions.json' );
44
45 if ( ! empty( $extension_data->products ) ) {
46 set_transient( 'evf_extensions_section_list', $extension_data, WEEK_IN_SECONDS );
47 }
48 }
49
50 return apply_filters( 'everest_forms_extensions_section_data', $extension_data->products );
51 }
52
53 /**
54 * Handles output of the addons page in admin.
55 */
56 public static function output() {
57 $addons = array();
58 $sections = self::get_sections();
59 $refresh_url = add_query_arg(
60 array(
61 'page' => 'evf-addons',
62 'action' => 'evf-addons-refresh',
63 'evf-addons-nonce' => wp_create_nonce( 'refresh' ),
64 ),
65 admin_url( 'admin.php' )
66 );
67 $license_plan = evf_get_license_plan();
68 $current_section = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : '_all'; // phpcs:ignore WordPress.Security.NonceVerification
69
70 if ( '_featured' !== $current_section ) {
71 $category = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification
72 $addons = self::get_extension_data( $category );
73 }
74
75 /**
76 * Addon page view.
77 *
78 * @uses $addons
79 * @uses $sections
80 * @uses $refresh_url
81 * @uses $current_section
82 */
83 include_once dirname( __FILE__ ) . '/views/html-admin-page-addons.php'; // phpcs:ignore
84 }
85 }
86