PluginProbe ʕ •ᴥ•ʔ
Gallery : FooGallery / 3.2.6
Gallery : FooGallery v3.2.6
3.3.2 3.3.3 3.3.0 3.1.31 3.1.32 3.1.34 3.1.36 3.2.0 3.2.6 trunk 1.10.3 2.0.24 2.1.34 2.2.44 2.3.3 2.4.32 3.0.6 3.1.11 3.1.12 3.1.13 3.1.20 3.1.25 3.1.26 3.1.26.1 3.1.26.2
foogallery / freemius / templates / contact.php
foogallery / freemius / templates Last commit date
account 4 weeks ago checkout 4 weeks ago connect 4 weeks ago debug 4 weeks ago forms 4 weeks ago js 4 weeks ago partials 4 weeks ago plugin-info 4 weeks ago account.php 4 weeks ago add-ons.php 4 weeks ago add-trial-to-pricing.php 4 weeks ago admin-notice.php 4 weeks ago ajax-loader.php 4 weeks ago api-connectivity-message-js.php 4 weeks ago auto-installation.php 4 weeks ago checkout.php 4 weeks ago clone-resolution-js.php 4 weeks ago connect.php 4 weeks ago contact.php 4 weeks ago debug.php 4 weeks ago email.php 4 weeks ago gdpr-optin-js.php 4 weeks ago index.php 4 weeks ago plugin-icon.php 4 weeks ago pricing.php 4 weeks ago secure-https-header.php 4 weeks ago sticky-admin-notice-js.php 4 weeks ago tabs-capture-js.php 4 weeks ago tabs.php 4 weeks ago
contact.php
104 lines
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 * @since 1.0.3
7 */
8
9 /**
10 * Update (October 9, 2024 by @swashata):
11 * Following request from the wp.org plugin review team, we have stopped
12 * embedding the contact form inside an i-frame for wp.org hosted free version
13 * of plugins. Now they will be opened in a new tab.
14 *
15 * Note for WordPress.org Theme/Plugin reviewer:
16 * Freemius is an SDK for plugin and theme developers. Since the core
17 * of the SDK is relevant both for plugins and themes, for obvious reasons,
18 * we only develop and maintain one code base.
19 *
20 * This code (and page) will not run for wp.org themes or plugins. It will
21 * run only for premium version of the plugin/theme that is using the SDK.
22 *
23 * In addition, when this page loads an i-frame. We intentionally named it 'frame'
24 * so it will pass the "Theme Check" that is looking for the string "i" . "frame".
25 *
26 * UPDATE:
27 * After ongoing conversations with the WordPress.org TRT we received
28 * an official approval for including i-frames in the theme's WP Admin setting's
29 * page tab (the SDK will never add any i-frames on the sitefront). i-frames
30 * were never against the guidelines, but we wanted to get the team's blessings
31 * before we move forward. For the record, I got the final approval from
32 * Ulrich Pogson (@grapplerulrich), a team lead at the TRT during WordCamp
33 * Europe 2017 (June 16th, 2017).
34 *
35 * If you have any questions or need clarifications, please don't hesitate
36 * pinging me on slack, my username is @svovaf.
37 *
38 * @author Vova Feldman (@svovaf)
39 * @since 1.2.2
40 */
41
42 if ( ! defined( 'ABSPATH' ) ) {
43 exit;
44 }
45
46 wp_enqueue_script( 'jquery' );
47 fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.js' );
48 fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
49 fs_enqueue_local_style( 'fs_checkout', '/admin/common.css' );
50
51 /**
52 * @var array $VARS
53 * @var Freemius $fs
54 */
55 $fs = freemius( $VARS['id'] );
56 $slug = $fs->get_slug();
57
58 $query_params = FS_Contact_Form_Manager::instance()->get_query_params( $fs );
59
60 $view_params = array(
61 'id' => $VARS['id'],
62 'page' => strtolower( $fs->get_text_inline( 'Contact', 'contact' ) ),
63 );
64 fs_require_once_template('secure-https-header.php', $view_params);
65
66 $has_tabs = $fs->_add_tabs_before_content();
67
68 if ( $has_tabs ) {
69 $query_params['tabs'] = 'true';
70 }
71 ?>
72 <div id="fs_contact" class="wrap fs-section fs-full-size-wrapper">
73 <div id="fs_frame"></div>
74 <script type="text/javascript">
75 (function ($) {
76 $(function () {
77
78 var
79 // Keep track of the i-frame height.
80 frame_height = 800,
81 base_url = '<?php echo WP_FS__ADDRESS ?>',
82 src = base_url + '/contact/?<?php echo http_build_query($query_params) ?>#' + encodeURIComponent(document.location.href),
83
84 // Append the i-frame into the DOM.
85 frame = $('<i' + 'frame " src="' + src + '" width="100%" height="' + frame_height + 'px" scrolling="no" frameborder="0" style="background: transparent; width: 1px; min-width: 100%;"><\/i' + 'frame>')
86 .appendTo('#fs_frame');
87
88 FS.PostMessage.init(base_url);
89 FS.PostMessage.receive('height', function (data) {
90 var h = data.height;
91 if (!isNaN(h) && h > 0 && h != frame_height) {
92 frame_height = h;
93 $('#fs_frame i' + 'frame').height(frame_height + 'px');
94 }
95 });
96 });
97 })(jQuery);
98 </script>
99 </div>
100 <?php
101 if ( $has_tabs ) {
102 $fs->_add_tabs_after_content();
103 }
104