PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 1.6.3
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v1.6.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 6 years ago plugin-updates 8 years ago settings 6 years ago views 6 years ago class-evf-admin-addons.php 6 years ago class-evf-admin-assets.php 6 years ago class-evf-admin-builder.php 7 years ago class-evf-admin-editor.php 6 years ago class-evf-admin-entries-table-list.php 6 years ago class-evf-admin-entries.php 6 years ago class-evf-admin-forms-table-list.php 6 years ago class-evf-admin-forms.php 6 years ago class-evf-admin-import-export.php 6 years ago class-evf-admin-menus.php 6 years ago class-evf-admin-notices.php 6 years ago class-evf-admin-settings.php 6 years ago class-evf-admin-tools.php 6 years ago class-evf-admin-welcome.php 6 years ago class-evf-admin.php 6 years ago evf-admin-functions.php 6 years ago
class-evf-admin-addons.php
95 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' );
23
24 if ( false === $addon_sections ) {
25 $raw_sections = wp_safe_remote_get( 'https://raw.githubusercontent.com/wpeverest/extensions-json/master/everest-forms/addon-sections.json' );
26
27 if ( ! is_wp_error( $raw_sections ) ) {
28 $addon_sections = json_decode( wp_remote_retrieve_body( $raw_sections ) );
29
30 if ( $addon_sections ) {
31 set_transient( 'evf_addons_sections', $addon_sections, WEEK_IN_SECONDS );
32 }
33 }
34 }
35
36 return apply_filters( 'everest_forms_extensions_sections', $addon_sections );
37 }
38
39 /**
40 * Get section content for the extensions screen.
41 *
42 * @return array
43 */
44 public static function get_extension_data() {
45 $extension_data = get_transient( 'evf_extensions_section' );
46
47 if ( false === $extension_data ) {
48 $raw_extensions = wp_safe_remote_get( 'https://raw.githubusercontent.com/wpeverest/extensions-json/master/everest-forms/sections/all_extensions.json' );
49
50 if ( ! is_wp_error( $raw_extensions ) ) {
51 $extension_data = json_decode( wp_remote_retrieve_body( $raw_extensions ) );
52
53 if ( ! empty( $extension_data->products ) ) {
54 set_transient( 'evf_extensions_section', $extension_data, WEEK_IN_SECONDS );
55 }
56 }
57 }
58
59 return apply_filters( 'everest_forms_extensions_section_data', $extension_data->products );
60 }
61
62 /**
63 * Handles output of the addons page in admin.
64 */
65 public static function output() {
66 $addons = array();
67 $sections = self::get_sections();
68 $refresh_url = add_query_arg(
69 array(
70 'page' => 'evf-addons',
71 'action' => 'evf-addons-refresh',
72 'evf-addons-nonce' => wp_create_nonce( 'refresh' ),
73 ),
74 admin_url( 'admin.php' )
75 );
76 $license_plan = evf_get_license_plan();
77 $current_section = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : '_all'; // phpcs:ignore WordPress.Security.NonceVerification
78
79 if ( '_featured' !== $current_section ) {
80 $category = isset( $_GET['section'] ) ? sanitize_text_field( wp_unslash( $_GET['section'] ) ) : null; // phpcs:ignore WordPress.Security.NonceVerification
81 $addons = self::get_extension_data( $category );
82 }
83
84 /**
85 * Addon page view.
86 *
87 * @uses $addons
88 * @uses $sections
89 * @uses $refresh_url
90 * @uses $current_section
91 */
92 include_once dirname( __FILE__ ) . '/views/html-admin-page-addons.php';
93 }
94 }
95