PluginProbe ʕ •ᴥ•ʔ
Strong Testimonials / 3.3.6
Strong Testimonials v3.3.6
3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.0.1 2.30.9 2.31.10 2.32 2.32.1 2.32.2 2.32.3 2.32.4 2.33 2.34 2.35 2.36 2.37 2.38 2.38.1 2.39 2.39.1 2.39.2 2.39.3 2.40.0 2.40.1 2.40.2 2.40.3 2.40.4 2.40.5 2.40.6 2.40.7 2.41.0 2.41.1 2.50.0 2.50.1 2.50.2 2.50.3 2.50.4 2.51.0 2.51.1 2.51.2 2.51.3 2.51.4 2.51.5 2.51.6 2.51.7 2.51.8 2.51.9 3.0.0 3.0.1 3.0.2 3.0.3 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 3.1.19 3.1.2 3.1.20 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 3.2.19 3.2.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0
strong-testimonials / admin / wpchill / class-wpchill-about-us.php
strong-testimonials / admin / wpchill Last commit date
apps 9 months ago assets 1 year ago icons 1 year ago scripts 9 months ago class-wpchill-about-us.php 1 year ago class-wpchill-notifications.php 9 months ago class-wpchill-rest-api.php 1 year ago class-wpchill-upsells.php 2 months ago
class-wpchill-about-us.php
281 lines
1 <?php
2
3 class WPChill_About_Us {
4
5 private $plugin_cpt;
6 private $plugin_term;
7
8 public function __construct( $plugin_cpt, $plugin_term = '' ) {
9
10 $this->plugin_cpt = $plugin_cpt;
11 $this->plugin_term = $plugin_term;
12
13 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 20 );
14
15 add_filter( 'admin_menu', array( $this, 'add_menu_item' ), 99, 1 );
16
17 // Clear all notices
18 add_action( 'in_admin_header', array( $this, 'clear_admin_notices' ), 99 );
19
20 new WPChill_Rest_Api();
21 }
22
23
24 /**
25 * Adds dashboard to addon's admin menu
26 *
27 * @return void
28 *
29 * @since 2.7.5
30 */
31 public function add_menu_item() {
32 add_submenu_page(
33 'edit.php?post_type=' . $this->plugin_cpt,
34 esc_html__( 'About Us', 'strong-testimonials' ),
35 esc_html__( 'About Us', 'strong-testimonials' ),
36 'manage_options',
37 'wpchill-about-us',
38 array(
39 $this,
40 'dashboard_view',
41 ),
42 999
43 );
44 }
45
46 public function clear_admin_notices() {
47
48 if ( $this->is_about_us() ) {
49 remove_all_actions( 'user_admin_notices' );
50 remove_all_actions( 'admin_notices' );
51 }
52 }
53
54 public function render_content() {
55 ?>
56 <div class="wpchill_container">
57 <h1 class="wpchill_title"><?php esc_html_e( 'About WPChill', 'strong-testimonials' ); ?></h1>
58 <img src="<?php echo esc_attr( plugin_dir_url( __FILE__ ) . 'icons/wpchill-logo.jpg' ); ?>" alt="WPChill Logo" class="wpchill_logo">
59 <p class="wpchill_tagline"><?php esc_html_e( 'Reliable WordPress Solutions Tailored for You', 'strong-testimonials' ); ?></p>
60 <p class="wpchill_description"><?php esc_html_e( 'At WPChill, our commitment goes beyond just creating WordPress solutions—we\'re dedicated to delivering user-friendly products that help people save time, money, and effort. Every product we offer is built with care, shaped by our experience, and backed by our promise to support our users every step of the way. When you choose WPChill, you\'re not just purchasing a product; you\'re gaining a reliable partner.', 'strong-testimonials' ); ?></p>
61
62 <table class="wpchill_table">
63 <thead>
64 <tr>
65 <th><?php esc_html_e( 'Product', 'strong-testimonials' ); ?></th>
66 <th><?php esc_html_e( 'Description', 'strong-testimonials' ); ?></th>
67 <th><?php esc_html_e( 'Website', 'strong-testimonials' ); ?></th>
68 <th><?php esc_html_e( 'Try plugin', 'strong-testimonials' ); ?></th>
69 </tr>
70 </thead>
71 <tbody>
72 <?php $this->render_rows(); ?>
73 </tbody>
74 </table>
75 </div>
76 <?php
77 }
78
79 private function render_rows() {
80
81 $addons = array(
82 array(
83 'name' => 'Modula',
84 'slug' => 'modula',
85 'path' => 'modula-best-grid-gallery/Modula.php',
86 'description' => 'Easily create stunning, customizable photo galleries and albums with Modula’s powerful features.',
87 'url' => 'https://wp-modula.com/?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
88 ),
89 array(
90 'name' => 'Download Monitor',
91 'slug' => 'download-monitor',
92 'path' => 'download-monitor/download-monitor.php',
93 'description' => 'Manage, track, and control file downloads on your WordPress site with ease.',
94 'url' => 'https://download-monitor.com/?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
95 ),
96 array(
97 'name' => 'Strong Testimonials',
98 'slug' => 'strong-testimonials',
99 'path' => 'strong-testimonials/strong-testimonials.php',
100 'description' => 'Collect, manage, and showcase customer reviews beautifully with this flexible testimonial plugin.',
101 'url' => 'https://strongtestimonials.com/?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
102 ),
103 array(
104 'name' => 'Kali Forms',
105 'slug' => 'kali-forms',
106 'path' => 'kali-forms/kali-forms.php',
107 'description' => 'Build powerful and user-friendly forms quickly with Kali Forms’ intuitive drag-and-drop builder.',
108 'url' => 'https://kaliforms.com/?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
109 ),
110 array(
111 'name' => 'Passster',
112 'slug' => 'content-protector',
113 'path' => 'content-protector/content-protector.php',
114 'description' => 'Increase website and content protection with easy-to-use features like password, CAPTCHA, and user role restrictions.',
115 'url' => 'https://passster.com/?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
116 ),
117 array(
118 'name' => 'Filr',
119 'slug' => 'filr-protection',
120 'path' => 'filr-protection/filr-protection.php',
121 'description' => 'Easily build and manage a document library with secure file sharing and advanced access controls.',
122 'url' => 'https://wpdocumentlibrary.com//?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
123 ),
124 array(
125 'name' => 'ImageSEO',
126 'slug' => 'imageseo',
127 'path' => 'imageseo/imageseo.php',
128 'description' => 'Optimize images automatically for better SEO and accessibility with AI-powered metadata and alt text generation.',
129 'url' => 'https://imageseo.io/?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
130 ),
131 array(
132 'name' => 'RSVP and Event Management',
133 'slug' => 'rsvp',
134 'path' => 'rsvp/wp-rsvp.php',
135 'description' => 'Easily create and manage RSVPs, events, and guest lists with this event management solution.',
136 'url' => 'https://rsvpproplugin.com/?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
137 ),
138 array(
139 'name' => 'Htaccess File Editor',
140 'slug' => 'htaccess-file-editor',
141 'path' => 'htaccess-file-editor/htaccess-file-editor.php',
142 'description' => 'Safely edit your .htaccess file directly from WordPress to improve site performance and security.',
143 'url' => 'https://wpchill.com/?utm_source=' . $this->plugin_cpt . '&utm_medium=link&utm_campaign=about-us&utm_term=' . $this->plugin_term . '+website+link',
144 ),
145 );
146
147 foreach ( $addons as $addon ) {
148 ?>
149 <tr>
150 <td><?php echo isset( $addon['name'] ) ? esc_html( $addon['name'] ) : ''; ?></td>
151 <td><?php echo isset( $addon['description'] ) ? wp_kses_post( $addon['description'] ) : ''; ?></td>
152 <td><a target="_BLANK" href="<?php echo isset( $addon['url'] ) ? esc_html( $addon['url'] ) : '#'; ?>"><?php esc_html_e( 'Details', 'strong-testimonials' ); ?></a></td>
153 <td>
154 <?php
155 $addon_status = $this->is_addon_installed( $addon['path'] );
156 if ( 'false' !== $addon_status ) :
157
158 ?>
159 <button class="button wpchill_install_partener_addon"
160 data-slug="<?php echo esc_attr( $addon['slug'] ); ?>"
161 data-action="<?php echo( 'install' === $addon_status ? 'install' : 'activate' ); ?>"
162 data-plugin="<?php echo esc_attr( $addon['path'] ); ?>">
163 <?php 'install' === $addon_status ? esc_html_e( 'Install', 'strong-testimonials' ) : esc_html_e( 'Activate', 'strong-testimonials' ); ?>
164 </button>
165 <?php else : ?>
166 <button class="button"
167 disabled="disabled"><?php esc_html_e( 'Active', 'strong-testimonials' ); ?> </button>
168 <?php endif; ?>
169 </td>
170 </tr>
171 <?php
172 }
173 }
174
175 /**
176 * Checks if WP.org addon is installed and/or active
177 * @return string
178 * @since 2.11.12
179 */
180
181 private function is_addon_installed( $plugin_path ) {
182 if ( ! function_exists( 'get_plugins' ) ) {
183 require_once ABSPATH . 'wp-admin/includes/plugin.php';
184 }
185
186 $all_plugins = get_plugins();
187
188 if ( empty( $all_plugins[ $plugin_path ] ) ) {
189 return 'install';
190 } elseif ( ! is_plugin_active( $plugin_path ) ) {
191 return 'activate';
192 } else {
193 return 'false';
194 }
195 }
196
197 /**
198 * Remove Add New link from menu item
199 *
200 * @param $submenu_file
201 *
202 * @return mixed
203 *
204 * @since 2.11.12
205 */
206 public function dashboard_view() {
207
208 echo '<div id="wpchill_about_us_container">';
209 $this->render_content();
210 echo '</div>';
211 }
212
213 /**
214 * Check if about us page
215 *
216 * @param $return
217 *
218 * @return bool|mixed
219 * @since 2.11.12
220 */
221
222 private function is_about_us() {
223
224 if ( isset( $_GET['page'] ) && 'wpchill-about-us' === $_GET['page'] ) {
225 return true;
226 }
227
228 return false;
229 }
230
231
232 public function enqueue_scripts() {
233
234 // only load assets on about us page
235 if ( ! $this->is_about_us() ) {
236 return;
237 }
238
239 wp_enqueue_style( 'wpchill-about-us-style', plugin_dir_url( __FILE__ ) . 'assets/css/about-us.css', array(), '1.0.0' );
240 wp_enqueue_script(
241 'wpmtst-about-us-script',
242 plugin_dir_url( __FILE__ ) . 'assets/js/about-us.js',
243 array(
244 'wp-api-fetch',
245 'updates',
246 ),
247 '1.0.0',
248 true
249 );
250 }
251
252 public static function activate_plugin( $plugin_slug ) {
253
254 if ( ! $plugin_slug ) {
255 return array(
256 'success' => false,
257 'message' => 'Plugin slug is missing.',
258 );
259 }
260
261 if ( ! function_exists( 'activate_plugin' ) ) {
262 require_once ABSPATH . 'wp-admin/includes/plugin.php';
263 }
264
265 $result = activate_plugin( $plugin_slug );
266
267 if ( is_wp_error( $result ) ) {
268 return array(
269 'success' => false,
270 'message' => $result->get_error_message(),
271 );
272 }
273
274 return array(
275 'success' => true,
276 'message' => 'Plugin activated.',
277 );
278 }
279 }
280
281