Custom Facebook Feed - Version 2.14

Version Description

  • New: Email alerts for critical issues. If there's an issue with a Facebook feed on your website which hasn't been resolved yet then you'll receive an email notification to let you know. This is sent once per week until the issue is resolved. These emails can be disabled by using the following setting: Facebook Feed > Customize > Misc > Feed Issue Email Report.
  • New: Admin notifications for critical issues. If there is an error with the feed, admins will see notices in the dashboard and on the front-end of the site along with instructions on how to resolve the issue. Front-end admin notifications can be disabled by using the following setting: Facebook Feed > Customize > Misc > Disable Admin Error Notice.
  • New: Added a WordPress 'Site Health' integration. If there is a critical error with your feeds, it will now be flagged in the site health page.
  • New: Added "About Us" page for those who would like to learn more about Smash Balloon and our other products. Go to Facebook Feed -> About Us in the dashboard.
Download this release

Release Info

Developer smashballoon
Plugin Icon 128x128 Custom Facebook Feed
Version 2.14
Comparing to
See all releases

Code changes from version 2.13 to 2.14

README.txt CHANGED
@@ -4,7 +4,7 @@ Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook page
4
Requires at least: 3.0
5
Requires PHP: 5.2
6
Tested up to: 5.4
7
- Stable tag: 2.13
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -255,6 +255,12 @@ The most common reason for this is that an add-on or extension you have installe
255
9. It's super easy to display your Facebook feed in any page or post
256
257
== Changelog ==
258
= 2.13 =
259
* New: Added a “Custom Facebook Feed” Gutenberg block to use in the block editor, allowing you to easily add a feed to posts and pages.
260
* New: Added support for translations.
4
Requires at least: 3.0
5
Requires PHP: 5.2
6
Tested up to: 5.4
7
+ Stable tag: 2.14
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
255
9. It's super easy to display your Facebook feed in any page or post
256
257
== Changelog ==
258
+ = 2.14 =
259
+ * New: Email alerts for critical issues. If there's an issue with a Facebook feed on your website which hasn't been resolved yet then you'll receive an email notification to let you know. This is sent once per week until the issue is resolved. These emails can be disabled by using the following setting: Facebook Feed > Customize > Misc > Feed Issue Email Report.
260
+ * New: Admin notifications for critical issues. If there is an error with the feed, admins will see notices in the dashboard and on the front-end of the site along with instructions on how to resolve the issue. Front-end admin notifications can be disabled by using the following setting: Facebook Feed > Customize > Misc > Disable Admin Error Notice.
261
+ * New: Added a WordPress 'Site Health' integration. If there is a critical error with your feeds, it will now be flagged in the site health page.
262
+ * New: Added "About Us" page for those who would like to learn more about Smash Balloon and our other products. Go to Facebook Feed -> About Us in the dashboard.
263
+
264
= 2.13 =
265
* New: Added a “Custom Facebook Feed” Gutenberg block to use in the block editor, allowing you to easily add a feed to posts and pages.
266
* New: Added support for translations.
admin/PluginSilentUpgrader.php ADDED
@@ -0,0 +1,576 @@
1
+ <?php
2
+
3
+ namespace CFF\Helpers;
4
+
5
+ use WP_Error;
6
+ use WP_Upgrader;
7
+ use WP_Filesystem_Base;
8
+
9
+ /** \WP_Upgrader class */
10
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
11
+
12
+ /** \Plugin_Upgrader class */
13
+ require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader.php';
14
+
15
+ /**
16
+ * In WP 5.3 a PHP 5.6 splat operator (...$args) was added to \WP_Upgrader_Skin::feedback().
17
+ * We need to remove all calls to *Skin::feedback() method, as we can't override it in own Skins
18
+ * without breaking support for PHP 5.3-5.5.
19
+ *
20
+ * @internal Please do not use this class outside of core WPForms development. May be removed at any time.
21
+ *
22
+ * @since 1.5.6.1
23
+ */
24
+ class PluginSilentUpgrader extends \Plugin_Upgrader {
25
+
26
+ /**
27
+ * Run an upgrade/installation.
28
+ *
29
+ * Attempts to download the package (if it is not a local file), unpack it, and
30
+ * install it in the destination folder.
31
+ *
32
+ * @since 1.5.6.1
33
+ *
34
+ * @param array $options {
35
+ * Array or string of arguments for upgrading/installing a package.
36
+ *
37
+ * @type string $package The full path or URI of the package to install.
38
+ * Default empty.
39
+ * @type string $destination The full path to the destination folder.
40
+ * Default empty.
41
+ * @type bool $clear_destination Whether to delete any files already in the
42
+ * destination folder. Default false.
43
+ * @type bool $clear_working Whether to delete the files form the working
44
+ * directory after copying to the destination.
45
+ * Default false.
46
+ * @type bool $abort_if_destination_exists Whether to abort the installation if the destination
47
+ * folder already exists. When true, `$clear_destination`
48
+ * should be false. Default true.
49
+ * @type bool $is_multi Whether this run is one of multiple upgrade/installation
50
+ * actions being performed in bulk. When true, the skin
51
+ * WP_Upgrader::header() and WP_Upgrader::footer()
52
+ * aren't called. Default false.
53
+ * @type array $hook_extra Extra arguments to pass to the filter hooks called by
54
+ * WP_Upgrader::run().
55
+ * }
56
+ * @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error,
57
+ * or false if unable to connect to the filesystem.
58
+ */
59
+ public function run( $options ) {
60
+
61
+ $defaults = array(
62
+ 'package' => '', // Please always pass this.
63
+ 'destination' => '', // And this
64
+ 'clear_destination' => false,
65
+ 'abort_if_destination_exists' => true, // Abort if the Destination directory exists, Pass clear_destination as false please
66
+ 'clear_working' => true,
67
+ 'is_multi' => false,
68
+ 'hook_extra' => array(), // Pass any extra $hook_extra args here, this will be passed to any hooked filters.
69
+ );
70
+
71
+ $options = wp_parse_args( $options, $defaults );
72
+
73
+ /**
74
+ * Filters the package options before running an update.
75
+ *
76
+ * See also {@see 'upgrader_process_complete'}.
77
+ *
78
+ * @since 4.3.0
79
+ *
80
+ * @param array $options {
81
+ * Options used by the upgrader.
82
+ *
83
+ * @type string $package Package for update.
84
+ * @type string $destination Update location.
85
+ * @type bool $clear_destination Clear the destination resource.
86
+ * @type bool $clear_working Clear the working resource.
87
+ * @type bool $abort_if_destination_exists Abort if the Destination directory exists.
88
+ * @type bool $is_multi Whether the upgrader is running multiple times.
89
+ * @type array $hook_extra {
90
+ * Extra hook arguments.
91
+ *
92
+ * @type string $action Type of action. Default 'update'.
93
+ * @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'.
94
+ * @type bool $bulk Whether the update process is a bulk update. Default true.
95
+ * @type string $plugin Path to the plugin file relative to the plugins directory.
96
+ * @type string $theme The stylesheet or template name of the theme.
97
+ * @type string $language_update_type The language pack update type. Accepts 'plugin', 'theme',
98
+ * or 'core'.
99
+ * @type object $language_update The language pack update offer.
100
+ * }
101
+ * }
102
+ */
103
+ $options = apply_filters( 'upgrader_package_options', $options );
104
+
105
+ if ( ! $options['is_multi'] ) { // call $this->header separately if running multiple times
106
+ $this->skin->header();
107
+ }
108
+
109
+ // Connect to the Filesystem first.
110
+ $res = $this->fs_connect( array( WP_CONTENT_DIR, $options['destination'] ) );
111
+ // Mainly for non-connected filesystem.
112
+ if ( ! $res ) {
113
+ if ( ! $options['is_multi'] ) {
114
+ $this->skin->footer();
115
+ }
116
+ return false;
117
+ }
118
+
119
+ $this->skin->before();
120
+
121
+ if ( is_wp_error( $res ) ) {
122
+ $this->skin->error( $res );
123
+ $this->skin->after();
124
+ if ( ! $options['is_multi'] ) {
125
+ $this->skin->footer();
126
+ }
127
+ return $res;
128
+ }
129
+
130
+ /*
131
+ * Download the package (Note, This just returns the filename
132
+ * of the file if the package is a local file)
133
+ */
134
+ $download = $this->download_package( $options['package'], true );
135
+
136
+ // Allow for signature soft-fail.
137
+ // WARNING: This may be removed in the future.
138
+ if ( is_wp_error( $download ) && $download->get_error_data( 'softfail-filename' ) ) {
139
+
140
+ // Don't output the 'no signature could be found' failure message for now.
141
+ if ( 'signature_verification_no_signature' != $download->get_error_code() || WP_DEBUG ) {
142
+ // Outout the failure error as a normal feedback, and not as an error:
143
+ //$this->skin->feedback( $download->get_error_message() );
144
+
145
+ // Report this failure back to WordPress.org for debugging purposes.
146
+ wp_version_check(
147
+ array(
148
+ 'signature_failure_code' => $download->get_error_code(),
149
+ 'signature_failure_data' => $download->get_error_data(),
150
+ )
151
+ );
152
+ }
153
+
154
+ // Pretend this error didn't happen.
155
+ $download = $download->get_error_data( 'softfail-filename' );
156
+ }
157
+
158
+ if ( is_wp_error( $download ) ) {
159
+ $this->skin->error( $download );
160
+ $this->skin->after();
161
+ if ( ! $options['is_multi'] ) {
162
+ $this->skin->footer();
163
+ }
164
+ return $download;
165
+ }
166
+
167
+ $delete_package = ( $download != $options['package'] ); // Do not delete a "local" file
168
+
169
+ // Unzips the file into a temporary directory.
170
+ $working_dir = $this->unpack_package( $download, $delete_package );
171
+ if ( is_wp_error( $working_dir ) ) {
172
+ $this->skin->error( $working_dir );
173
+ $this->skin->after();
174
+ if ( ! $options['is_multi'] ) {
175
+ $this->skin->footer();
176
+ }
177
+ return $working_dir;
178
+ }
179
+
180
+ // With the given options, this installs it to the destination directory.
181
+ $result = $this->install_package(
182
+ array(
183
+ 'source' => $working_dir,
184
+ 'destination' => $options['destination'],
185
+ 'clear_destination' => $options['clear_destination'],
186
+ 'abort_if_destination_exists' => $options['abort_if_destination_exists'],
187
+ 'clear_working' => $options['clear_working'],
188
+ 'hook_extra' => $options['hook_extra'],
189
+ )
190
+ );
191
+
192
+ $this->skin->set_result( $result );
193
+ if ( is_wp_error( $result ) ) {
194
+ $this->skin->error( $result );
195
+ //$this->skin->feedback( 'process_failed' );
196
+ } else {
197
+ // Installation succeeded.
198
+ //$this->skin->feedback( 'process_success' );
199
+ }
200
+
201
+ $this->skin->after();
202
+
203
+ if ( ! $options['is_multi'] ) {
204
+
205
+ /**
206
+ * Fires when the upgrader process is complete.
207
+ *
208
+ * See also {@see 'upgrader_package_options'}.
209
+ *
210
+ * @since 3.6.0
211
+ * @since 3.7.0 Added to WP_Upgrader::run().
212
+ * @since 4.6.0 `$translations` was added as a possible argument to `$hook_extra`.
213
+ *
214
+ * @param WP_Upgrader $this WP_Upgrader instance. In other contexts, $this, might be a
215
+ * Theme_Upgrader, Plugin_Upgrader, Core_Upgrade, or Language_Pack_Upgrader instance.
216
+ * @param array $hook_extra {
217
+ * Array of bulk item update data.
218
+ *
219
+ * @type string $action Type of action. Default 'update'.
220
+ * @type string $type Type of update process. Accepts 'plugin', 'theme', 'translation', or 'core'.
221
+ * @type bool $bulk Whether the update process is a bulk update. Default true.
222
+ * @type array $plugins Array of the basename paths of the plugins' main files.
223
+ * @type array $themes The theme slugs.
224
+ * @type array $translations {
225
+ * Array of translations update data.
226
+ *
227
+ * @type string $language The locale the translation is for.
228
+ * @type string $type Type of translation. Accepts 'plugin', 'theme', or 'core'.
229
+ * @type string $slug Text domain the translation is for. The slug of a theme/plugin or
230
+ * 'default' for core translations.
231
+ * @type string $version The version of a theme, plugin, or core.
232
+ * }
233
+ * }
234
+ */
235
+ do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
236
+
237
+ $this->skin->footer();
238
+ }
239
+
240
+ return $result;
241
+ }
242
+
243
+ /**
244
+ * Toggle maintenance mode for the site.
245
+ *
246
+ * Create/delete the maintenance file to enable/disable maintenance mode.
247
+ *
248
+ * @since 2.8.0
249
+ *
250
+ * @global WP_Filesystem_Base $wp_filesystem Subclass
251
+ *
252
+ * @param bool $enable True to enable maintenance mode, false to disable.
253
+ */
254
+ public function maintenance_mode( $enable = false ) {
255
+ global $wp_filesystem;
256
+ $file = $wp_filesystem->abspath() . '.maintenance';
257
+ if ( $enable ) {
258
+ //$this->skin->feedback( 'maintenance_start' );
259
+ // Create maintenance file to signal that we are upgrading
260
+ $maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
261
+ $wp_filesystem->delete( $file );
262
+ $wp_filesystem->put_contents( $file, $maintenance_string, FS_CHMOD_FILE );
263
+ } elseif ( ! $enable && $wp_filesystem->exists( $file ) ) {
264
+ //$this->skin->feedback( 'maintenance_end' );
265
+ $wp_filesystem->delete( $file );
266
+ }
267
+ }
268
+
269
+ /**
270
+ * Download a package.
271
+ *
272
+ * @since 2.8.0
273
+ *
274
+ * @param string $package The URI of the package. If this is the full path to an
275
+ * existing local file, it will be returned untouched.
276
+ * @param bool $check_signatures Whether to validate file signatures. Default false.
277
+ * @return string|WP_Error The full path to the downloaded package file, or a WP_Error object.
278
+ */
279
+ public function download_package( $package, $check_signatures = false ) {
280
+
281
+ /**
282
+ * Filters whether to return the package.
283
+ *
284
+ * @since 3.7.0
285
+ *
286
+ * @param bool $reply Whether to bail without returning the package.
287
+ * Default false.
288
+ * @param string $package The package file name.
289
+ * @param WP_Upgrader $this The WP_Upgrader instance.
290
+ */
291
+ $reply = apply_filters( 'upgrader_pre_download', false, $package, $this );
292
+ if ( false !== $reply ) {
293
+ return $reply;
294
+ }
295
+
296
+ if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { //Local file or remote?
297
+ return $package; //must be a local file..
298
+ }
299
+
300
+ if ( empty( $package ) ) {
301
+ return new WP_Error( 'no_package', $this->strings['no_package'] );
302
+ }
303
+
304
+ //$this->skin->feedback( 'downloading_package', $package );
305
+
306
+ $download_file = download_url( $package, 300, $check_signatures );
307
+
308
+ if ( is_wp_error( $download_file ) && ! $download_file->get_error_data( 'softfail-filename' ) ) {
309
+ return new WP_Error( 'download_failed', $this->strings['download_failed'], $download_file->get_error_message() );
310
+ }
311
+
312
+ return $download_file;
313
+ }
314
+
315
+ /**
316
+ * Unpack a compressed package file.
317
+ *
318
+ * @since 2.8.0
319
+ *
320
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
321
+ *
322
+ * @param string $package Full path to the package file.
323
+ * @param bool $delete_package Optional. Whether to delete the package file after attempting
324
+ * to unpack it. Default true.
325
+ * @return string|WP_Error The path to the unpacked contents, or a WP_Error on failure.
326
+ */
327
+ public function unpack_package( $package, $delete_package = true ) {
328
+ global $wp_filesystem;
329
+
330
+ //$this->skin->feedback( 'unpack_package' );
331
+
332
+ $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/';
333
+
334
+ //Clean up contents of upgrade directory beforehand.
335
+ $upgrade_files = $wp_filesystem->dirlist( $upgrade_folder );
336
+ if ( ! empty( $upgrade_files ) ) {
337
+ foreach ( $upgrade_files as $file ) {
338
+ $wp_filesystem->delete( $upgrade_folder . $file['name'], true );
339
+ }
340
+ }
341
+
342
+ // We need a working directory - Strip off any .tmp or .zip suffixes
343
+ $working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
344
+
345
+ // Clean up working directory
346
+ if ( $wp_filesystem->is_dir( $working_dir ) ) {
347
+ $wp_filesystem->delete( $working_dir, true );
348
+ }
349
+
350
+ // Unzip package to working directory
351
+ $result = unzip_file( $package, $working_dir );
352
+
353
+ // Once extracted, delete the package if required.
354
+ if ( $delete_package ) {
355
+ unlink( $package );
356
+ }
357
+
358
+ if ( is_wp_error( $result ) ) {
359
+ $wp_filesystem->delete( $working_dir, true );
360
+ if ( 'incompatible_archive' == $result->get_error_code() ) {
361
+ return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $result->get_error_data() );
362
+ }
363
+ return $result;
364
+ }
365
+
366
+ return $working_dir;
367
+ }
368
+
369
+ /**
370
+ * Install a package.
371
+ *
372
+ * Copies the contents of a package form a source directory, and installs them in
373
+ * a destination directory. Optionally removes the source. It can also optionally
374
+ * clear out the destination folder if it already exists.
375
+ *
376
+ * @since 2.8.0
377
+ *
378
+ * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
379
+ * @global array $wp_theme_directories
380
+ *
381
+ * @param array|string $args {
382
+ * Optional. Array or string of arguments for installing a package. Default empty array.
383
+ *
384
+ * @type string $source Required path to the package source. Default empty.
385
+ * @type string $destination Required path to a folder to install the package in.
386
+ * Default empty.
387
+ * @type bool $clear_destination Whether to delete any files already in the destination
388
+ * folder. Default false.
389
+ * @type bool $clear_working Whether to delete the files form the working directory
390
+ * after copying to the destination. Default false.
391
+ * @type bool $abort_if_destination_exists Whether to abort the installation if
392
+ * the destination folder already exists. Default true.
393
+ * @type array $hook_extra Extra arguments to pass to the filter hooks called by
394
+ * WP_Upgrader::install_package(). Default empty array.
395
+ * }
396
+ *
397
+ * @return array|WP_Error The result (also stored in `WP_Upgrader::$result`), or a WP_Error on failure.
398
+ */
399
+ public function install_package( $args = array() ) {
400
+ global $wp_filesystem, $wp_theme_directories;
401
+
402
+ $defaults = array(
403
+ 'source' => '', // Please always pass this
404
+ 'destination' => '', // and this
405
+ 'clear_destination' => false,
406
+ 'clear_working' => false,
407
+ 'abort_if_destination_exists' => true,
408
+ 'hook_extra' => array(),
409
+ );
410
+
411
+ $args = wp_parse_args( $args, $defaults );
412
+
413
+ // These were previously extract()'d.
414
+ $source = $args['source'];
415
+ $destination = $args['destination'];
416
+ $clear_destination = $args['clear_destination'];
417
+
418
+ set_time_limit( 300 );
419
+
420
+ if ( empty( $source ) || empty( $destination ) ) {
421
+ return new WP_Error( 'bad_request', $this->strings['bad_request'] );
422
+ }
423
+ //$this->skin->feedback( 'installing_package' );
424
+
425
+ /**
426
+ * Filters the install response before the installation has started.
427
+ *
428
+ * Returning a truthy value, or one that could be evaluated as a WP_Error
429
+ * will effectively short-circuit the installation, returning that value
430
+ * instead.
431
+ *
432
+ * @since 2.8.0
433
+ *
434
+ * @param bool|WP_Error $response Response.
435
+ * @param array $hook_extra Extra arguments passed to hooked filters.
436
+ */
437
+ $res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
438
+
439
+ if ( is_wp_error( $res ) ) {
440
+ return $res;
441
+ }
442
+
443
+ //Retain the Original source and destinations
444
+ $remote_source = $args['source'];
445
+ $local_destination = $destination;
446
+
447
+ $source_files = array_keys( $wp_filesystem->dirlist( $remote_source ) );
448
+ $remote_destination = $wp_filesystem->find_folder( $local_destination );
449
+
450
+ //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.
451
+ if ( 1 == count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) { //Only one folder? Then we want its contents.
452
+ $source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] );
453
+ } elseif ( count( $source_files ) == 0 ) {
454
+ return new WP_Error( 'incompatible_archive_empty', $this->strings['incompatible_archive'], $this->strings['no_files'] ); // There are no files?
455
+ } else { // It's only a single file, the upgrader will use the folder name of this file as the destination folder. Folder name is based on zip filename.
456
+ $source = trailingslashit( $args['source'] );
457
+ }
458
+
459
+ /**
460
+ * Filters the source file location for the upgrade package.
461
+ *
462
+ * @since 2.8.0
463
+ * @since 4.4.0 The $hook_extra parameter became available.
464
+ *
465
+ * @param string $source File source location.
466
+ * @param string $remote_source Remote file source location.
467
+ * @param WP_Upgrader $this WP_Upgrader instance.
468
+ * @param array $hook_extra Extra arguments passed to hooked filters.
469
+ */
470
+ $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
471
+
472
+ if ( is_wp_error( $source ) ) {
473
+ return $source;
474
+ }
475
+
476
+ // Has the source location changed? If so, we need a new source_files list.
477
+ if ( $source !== $remote_source ) {
478
+ $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
479
+ }
480
+
481
+ /*
482
+ * Protection against deleting files in any important base directories.
483
+ * Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the
484
+ * destination directory (WP_PLUGIN_DIR / wp-content/themes) intending
485
+ * to copy the directory into the directory, whilst they pass the source
486
+ * as the actual files to copy.
487
+ */
488
+ $protected_directories = array( ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes' );
489
+
490
+ if ( is_array( $wp_theme_directories ) ) {
491
+ $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
492
+ }
493
+
494
+ if ( in_array( $destination, $protected_directories ) ) {
495
+ $remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) );
496
+ $destination = trailingslashit( $destination ) . trailingslashit( basename( $source ) );
497
+ }
498
+
499
+ if ( $clear_destination ) {
500
+ // We're going to clear the destination if there's something there.
501
+ //$this->skin->feedback( 'remove_old' );
502
+
503
+ $removed = $this->clear_destination( $remote_destination );
504
+
505
+ /**
506
+ * Filters whether the upgrader cleared the destination.
507
+ *
508
+ * @since 2.8.0
509
+ *
510
+ * @param mixed $removed Whether the destination was cleared. true on success, WP_Error on failure
511
+ * @param string $local_destination The local package destination.
512
+ * @param string $remote_destination The remote package destination.
513
+ * @param array $hook_extra Extra arguments passed to hooked filters.
514
+ */
515
+ $removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] );
516
+
517
+ if ( is_wp_error( $removed ) ) {
518
+ return $removed;
519
+ }
520
+ } elseif ( $args['abort_if_destination_exists'] && $wp_filesystem->exists( $remote_destination ) ) {
521
+ //If we're not clearing the destination folder and something exists there already, Bail.
522
+ //But first check to see if there are actually any files in the folder.
523
+ $_files = $wp_filesystem->dirlist( $remote_destination );
524
+ if ( ! empty( $_files ) ) {
525
+ $wp_filesystem->delete( $remote_source, true ); //Clear out the source files.
526
+ return new WP_Error( 'folder_exists', $this->strings['folder_exists'], $remote_destination );
527
+ }
528
+ }
529
+
530
+ //Create destination if needed
531
+ if ( ! $wp_filesystem->exists( $remote_destination ) ) {
532
+ if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) {
533
+ return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination );
534
+ }
535
+ }
536
+ // Copy new version of item into place.
537
+ $result = copy_dir( $source, $remote_destination );
538
+ if ( is_wp_error( $result ) ) {
539
+ if ( $args['clear_working'] ) {
540
+ $wp_filesystem->delete( $remote_source, true );
541
+ }
542
+ return $result;
543
+ }
544
+
545
+ //Clear the Working folder?
546
+ if ( $args['clear_working'] ) {
547
+ $wp_filesystem->delete( $remote_source, true );
548
+ }
549
+
550
+ $destination_name = basename( str_replace( $local_destination, '', $destination ) );
551
+ if ( '.' == $destination_name ) {
552
+ $destination_name = '';
553
+ }
554
+
555
+ $this->result = compact( 'source', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination' );
556
+
557
+ /**
558
+ * Filters the installation response after the installation has finished.
559
+ *
560
+ * @since 2.8.0
561
+ *
562
+ * @param bool $response Installation response.
563
+ * @param array $hook_extra Extra arguments passed to hooked filters.
564
+ * @param array $result Installation result data.
565
+ */
566
+ $res = apply_filters( 'upgrader_post_install', true, $args['hook_extra'], $this->result );
567
+
568
+ if ( is_wp_error( $res ) ) {
569
+ $this->result = $res;
570
+ return $res;
571
+ }
572
+
573
+ //Bombard the calling function will all the info which we've just used.
574
+ return $this->result;
575
+ }
576
+ }
admin/PluginSilentUpgraderSkin.php ADDED
@@ -0,0 +1,57 @@
1
+ <?php
2
+
3
+ namespace CFF\Helpers;
4
+
5
+ /** \WP_Upgrader_Skin class */
6
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';
7
+
8
+ /**
9
+ * Class PluginSilentUpgraderSkin.
10
+ *
11
+ * @internal Please do not use this class outside of core WPForms development. May be removed at any time.
12
+ *
13
+ * @since 1.5.6.1
14
+ */
15
+ class PluginSilentUpgraderSkin extends \WP_Upgrader_Skin {
16
+
17
+ /**
18
+ * Empty out the header of its HTML content and only check to see if it has
19
+ * been performed or not.
20
+ *
21
+ * @since 1.5.6.1
22
+ */
23
+ public function header() {
24
+ }
25
+
26
+ /**
27
+ * Empty out the footer of its HTML contents.
28
+ *
29
+ * @since 1.5.6.1
30
+ */
31
+ public function footer() {
32
+ }
33
+
34
+ /**
35
+ * Instead of outputting HTML for errors, just return them.
36
+ * Ajax request will just ignore it.
37
+ *
38
+ * @since 1.5.6.1
39
+ *
40
+ * @param array $errors Array of errors with the install process.
41
+ *
42
+ * @return array
43
+ */
44
+ public function error( $errors ) {
45
+ return $errors;
46
+ }
47
+
48
+ /**
49
+ * Empty out JavaScript output that calls function to decrement the update counts.
50
+ *
51
+ * @since 1.5.6.1
52
+ *
53
+ * @param string $type Type of update count to decrement.
54
+ */
55
+ public function decrement_update_count( $type ) {
56
+ }
57
+ }
admin/addon-functions.php ADDED
@@ -0,0 +1,175 @@
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ /**
5
+ * Deactivate addon.
6
+ *
7
+ * @since 1.0.0
8
+ */
9
+ function cff_deactivate_addon() {
10
+
11
+ // Run a security check.
12
+ check_ajax_referer( 'cff-admin', 'nonce' );
13
+
14
+ // Check for permissions.
15
+ if ( ! current_user_can( 'manage_instagram_feed_options' ) ) {
16
+ wp_send_json_error();
17
+ }
18
+
19
+ $type = 'addon';
20
+ if ( ! empty( $_POST['type'] ) ) {
21
+ $type = sanitize_key( $_POST['type'] );
22
+ }
23
+
24
+ if ( isset( $_POST['plugin'] ) ) {
25
+ deactivate_plugins( $_POST['plugin'] );
26
+
27
+ if ( 'plugin' === $type ) {
28
+ wp_send_json_success( esc_html__( 'Plugin deactivated.', 'custom-facebook-feed' ) );
29
+ } else {
30
+ wp_send_json_success( esc_html__( 'Addon deactivated.', 'custom-facebook-feed' ) );
31
+ }
32
+ }
33
+
34
+ wp_send_json_error( esc_html__( 'Could not deactivate the addon. Please deactivate from the Plugins page.', 'custom-facebook-feed' ) );
35
+ }
36
+ add_action( 'wp_ajax_cff_deactivate_addon', 'cff_deactivate_addon' );
37
+
38
+ /**
39
+ * Activate addon.
40
+ *
41
+ * @since 1.0.0
42
+ */
43
+ function cff_activate_addon() {
44
+
45
+ // Run a security check.
46
+ check_ajax_referer( 'cff-admin', 'nonce' );
47
+
48
+ // Check for permissions.
49
+ if ( ! current_user_can( 'manage_options' ) ) {
50
+ wp_send_json_error();
51
+ }
52
+
53
+ if ( isset( $_POST['plugin'] ) ) {
54
+
55
+ $type = 'addon';
56
+ if ( ! empty( $_POST['type'] ) ) {
57
+ $type = sanitize_key( $_POST['type'] );
58
+ }
59
+
60
+ $activate = activate_plugins( $_POST['plugin'] );
61
+
62
+ if ( ! is_wp_error( $activate ) ) {
63
+ if ( 'plugin' === $type ) {
64
+ wp_send_json_success( esc_html__( 'Plugin activated.', 'custom-facebook-feed' ) );
65
+ } else {
66
+ wp_send_json_success( esc_html__( 'Addon activated.', 'custom-facebook-feed' ) );
67
+ }
68
+ }
69
+ }
70
+
71
+ wp_send_json_error( esc_html__( 'Could not activate addon. Please activate from the Plugins page.', 'custom-facebook-feed' ) );
72
+ }
73
+ add_action( 'wp_ajax_cff_activate_addon', 'cff_activate_addon' );
74
+
75
+ /**
76
+ * Install addon.
77
+ *
78
+ * @since 1.0.0
79
+ */
80
+ function cff_install_addon() {
81
+
82
+ // Run a security check.
83
+ check_ajax_referer( 'cff-admin', 'nonce' );
84
+
85
+ // Check for permissions.
86
+ if ( ! current_user_can( 'manage_options' ) ) {
87
+ wp_send_json_error();
88
+ }
89
+
90
+ $error = esc_html__( 'Could not install addon. Please download from smashballoon.com and install manually.', 'custom-facebook-feed' );
91
+
92
+ if ( empty( $_POST['plugin'] ) ) {
93
+ wp_send_json_error( $error );
94
+ }
95
+
96
+ // Set the current screen to avoid undefined notices.
97
+ set_current_screen( 'cff-about' );
98
+
99
+ // Prepare variables.
100
+ $url = esc_url_raw(
101
+ add_query_arg(
102
+ array(
103
+ 'page' => 'cff-about',
104
+ ),
105
+ admin_url( 'admin.php' )
106
+ )
107
+ );
108
+
109
+ $creds = request_filesystem_credentials( $url, '', false, false, null );
110
+
111
+ // Check for file system permissions.
112
+ if ( false === $creds ) {
113
+ wp_send_json_error( $error );
114
+ }
115
+
116
+ if ( ! WP_Filesystem( $creds ) ) {
117
+ wp_send_json_error( $error );
118
+ }
119
+
120
+ /*
121
+ * We do not need any extra credentials if we have gotten this far, so let's install the plugin.
122
+ */
123
+
124
+ require_once CFF_PLUGIN_DIR . 'admin/class-install-skin.php';
125
+
126
+ // Do not allow WordPress to search/download translations, as this will break JS output.
127
+ remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
128
+
129
+ // Create the plugin upgrader with our custom skin.
130
+ $installer = new CFF\Helpers\PluginSilentUpgrader( new CFF_Install_Skin() );
131
+
132
+ // Error check.
133
+ if ( ! method_exists( $installer, 'install' ) || empty( $_POST['plugin'] ) ) {
134
+ wp_send_json_error( $error );
135
+ }
136
+
137
+ $installer->install( $_POST['plugin'] ); // phpcs:ignore
138
+
139
+ // Flush the cache and return the newly installed plugin basename.
140
+ wp_cache_flush();
141
+
142
+ $plugin_basename = $installer->plugin_info();
143
+
144
+ if ( $plugin_basename ) {
145
+
146
+ $type = 'addon';
147
+ if ( ! empty( $_POST['type'] ) ) {
148
+ $type = sanitize_key( $_POST['type'] );
149
+ }
150
+
151
+ // Activate the plugin silently.
152
+ $activated = activate_plugin( $plugin_basename );
153
+
154
+ if ( ! is_wp_error( $activated ) ) {
155
+ wp_send_json_success(
156
+ array(
157
+ 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed & activated.', 'custom-facebook-feed' ) : esc_html__( 'Addon installed & activated.', 'custom-facebook-feed' ),
158
+ 'is_activated' => true,
159
+ 'basename' => $plugin_basename,
160
+ )
161
+ );
162
+ } else {
163
+ wp_send_json_success(
164
+ array(
165
+ 'msg' => 'plugin' === $type ? esc_html__( 'Plugin installed.', 'custom-facebook-feed' ) : esc_html__( 'Addon installed.', 'custom-facebook-feed' ),
166
+ 'is_activated' => false,
167
+ 'basename' => $plugin_basename,
168
+ )
169
+ );
170
+ }
171
+ }
172
+
173
+ wp_send_json_error( $error );
174
+ }
175
+ add_action( 'wp_ajax_cff_install_addon', 'cff_install_addon' );
admin/class-cff-about.php ADDED
@@ -0,0 +1,1351 @@
1
+ <?php
2
+
3
+ /**
4
+ * About Sbi admin page class.
5
+ *
6
+ * @since 2.4/5.5
7
+ */
8
+ class CFF_About {
9
+
10
+ /**
11
+ * Admin menu page slug.
12
+ *
13
+ * @since 2.4/5.5
14
+ *
15
+ * @var string
16
+ */
17
+ const SLUG = 'cff-about';
18
+
19
+ /**
20
+ * Default view for a page.
21
+ *
22
+ * @since 2.4/5.5
23
+ *
24
+ * @var string
25
+ */
26
+ const DEFAULT_TAB = 'about';
27
+
28
+ /**
29
+ * Array of license types, that are considered being top level and has no features difference.
30
+ *
31
+ * @since 2.4/5.5
32
+ *
33
+ * @var array
34
+ */
35
+ public static $licenses_top = array( 'pro', 'agency', 'ultimate', 'elite' );
36
+
37
+ /**
38
+ * List of features that licenses are different with.
39
+ *
40
+ * @since 2.4/5.5
41
+ *
42
+ * @var array
43
+ */
44
+ public static $licenses_features = array();
45
+
46
+ /**
47
+ * The current active tab.
48
+ *
49
+ * @since 2.4/5.5
50
+ *
51
+ * @var string
52
+ */
53
+ public $view;
54
+
55
+ /**
56
+ * The core views.
57
+ *
58
+ * @since 2.4/5.5
59
+ *
60
+ * @var array
61
+ */
62
+ public $views = array();
63
+
64
+ /**
65
+ * Primary class constructor.
66
+ *
67
+ * @since 2.4/5.5
68
+ */
69
+ public function __construct() {
70
+
71
+ // In old PHP we can't define this elsewhere.
72
+ self::$licenses_features = array(
73
+ 'entries' => esc_html__( 'Media Display', 'custom-facebook-feed' ),
74
+ //'fields' => esc_html__( 'Layouts', 'custom-facebook-feed' ),
75
+ // 'templates' => esc_html__( 'Post Display', 'custom-facebook-feed' ),
76
+ //'conditionals' => esc_html__( 'Image and Video Display', 'custom-facebook-feed' ),
77
+ 'addons' => esc_html__( 'Post Source', 'custom-facebook-feed' ),
78
+ 'addons1' => esc_html__( 'Number of Posts', 'custom-facebook-feed' ),
79
+ 'addons2' => esc_html__( 'Filtering', 'custom-facebook-feed' ),
80
+
81
+ //'marketing' => esc_html__( 'Filtering', 'custom-facebook-feed' ),
82
+ //'marketing' => esc_html__( 'Instagram Stories', 'custom-facebook-feed' ),
83
+ 'payments' => esc_html__( 'Feed Layout', 'custom-facebook-feed' ),
84
+ 'surveys' => esc_html__( 'Post Information', 'custom-facebook-feed' ),
85
+ 'advanced' => esc_html__( 'Comments', 'custom-facebook-feed' ),
86
+ 'extensions' => esc_html__( 'Extensions', 'custom-facebook-feed' ),
87
+ 'support' => esc_html__( 'Customer Support', 'custom-facebook-feed' ),
88
+ );
89
+
90
+ // Maybe load tools page.
91
+ add_action( 'admin_init', array( $this, 'init' ) );
92
+ }
93
+
94
+ /**
95
+ * Determining if the user is viewing the our page, if so, party on.
96
+ *
97
+ * @since 2.4/5.5
98
+ */
99
+ public function init() {
100
+
101
+ // Check what page we are on.
102
+ $page = isset( $_GET['page'] ) ? $_GET['page'] : '';
103
+
104
+ // Only load if we are actually on the settings page.
105
+ if ( self::SLUG !== $page ) {
106
+ return;
107
+ }
108
+
109
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueues' ) );
110
+
111
+ /*
112
+ * Define the core views for the our tab.
113
+ */
114
+ $this->views = apply_filters(
115
+ 'cff_admin_about_views',
116
+ array(
117
+ esc_html__( 'About Us', 'custom-facebook-feed' ) => array( 'about' ),
118
+ esc_html__( 'Getting Started', 'custom-facebook-feed' ) => array( 'getting-started' ),
119
+ )
120
+ );
121
+
122
+ $license = $this->get_license_type();
123
+
124
+ if (
125
+ (
126
+ $license === 'pro' ||
127
+ ! in_array( $license, self::$licenses_top, true )
128
+ )
129
+ //cff_debug()
130
+ ) {
131
+ $vs_tab_name = sprintf( /* translators: %1$s - current license type, %2$s - suggested license type. */
132
+ esc_html__( '%1$s vs %2$s', 'custom-facebook-feed' ),
133
+ ucfirst( $license ),
134
+ $this->get_next_license( $license )
135
+ );
136
+
137
+ $this->views[ $vs_tab_name ] = array( 'versus' );
138
+ }
139
+
140
+ // Determine the current active settings tab.
141
+ $this->view = ! empty( $_GET['view'] ) ? esc_html( $_GET['view'] ) : self::DEFAULT_TAB;
142
+
143
+ // If the user tries to load an invalid view - fallback to About Us.
144
+ if (
145
+ ! in_array( $this->view, call_user_func_array( 'array_merge', $this->views ), true ) &&
146
+ ! has_action( 'cff_admin_about_display_tab_' . sanitize_key( $this->view ) )
147
+ ) {
148
+ $this->view = self::DEFAULT_TAB;
149
+ }
150
+
151
+ add_action( 'cff_admin_page', array( $this, 'output' ) );
152
+
153
+ // Hook for addons.
154
+ do_action( 'cff_admin_about_init' );
155
+ }
156
+
157
+ /**
158
+ * Enqueue assets for the the page.
159
+ *
160
+ * @since 2.4/5.5
161
+ */
162
+ public function enqueues() {
163
+
164
+ wp_enqueue_script(
165
+ 'jquery-matchheight',
166
+ CFF_PLUGIN_URL . 'js/jquery.matchHeight-min.js',
167
+ array( 'jquery' ),
168
+ '0.7.0',
169
+ false
170
+ );
171
+ }
172
+
173
+ /**
174
+ * Output the basic page structure.
175
+ *
176
+ * @since 2.4/5.5
177
+ */
178
+ public function output() {
179
+
180
+ $show_nav = false;
181
+ foreach ( $this->views as $view ) {
182
+ if ( in_array( $this->view, (array) $view, true ) ) {
183
+ $show_nav = true;
184
+ break;
185
+ }
186
+ }
187
+ ?>
188
+
189
+ <div id="cff-admin-about" class="wrap cff-admin-wrap">
190
+
191
+ <?php
192
+ if ( $show_nav ) {
193
+ $license = $this->get_license_type();
194
+ $next_license = $this->get_next_license( $license );
195
+ echo '<ul class="cff-admin-tabs">';
196
+ foreach ( $this->views as $label => $view ) {
197
+ $class = in_array( $this->view, $view, true ) ? 'active' : '';
198
+ echo '<li>';
199
+ printf(
200
+ '<a href="%s" class="%s">%s</a>',
201
+ esc_url( admin_url( 'admin.php?page=' . self::SLUG . '&view=' . sanitize_key( $view[0] ) ) ),
202
+ esc_attr( $class ),
203
+ esc_html( $label )
204
+ );
205
+ echo '</li>';
206
+ }
207
+ echo '</ul>';
208
+ }
209
+ ?>
210
+
211
+ <h1 class="cff-h1-placeholder"></h1>
212
+
213
+ <?php
214
+ switch ( $this->view ) {
215
+ case 'about':
216
+ $this->output_about();
217
+ break;
218
+ case 'getting-started':
219
+ $this->output_getting_started();
220
+ break;
221
+ case 'versus':
222
+ $this->output_versus();
223
+ break;
224
+ default:
225
+ do_action( 'cff_admin_about_display_tab_' . sanitize_key( $this->view ) );
226
+ break;
227
+ }
228
+ ?>
229
+
230
+ </div>
231
+
232
+ <?php
233
+ }
234
+
235
+ /**
236
+ * Display the About tab content.
237
+ *
238
+ * @since 2.4/5.5
239
+ */
240
+ protected function output_about() {
241
+
242
+ $this->output_about_info();
243
+ $this->output_about_addons();
244
+ }
245
+
246
+ /**
247
+ * Display the General Info section of About tab.
248
+ *
249
+ * @since 1.5.8
250
+ */
251
+ protected function output_about_info() {
252
+
253
+ ?>
254
+
255
+ <div class="cff-admin-about-section cff-admin-columns">
256
+
257
+ <div class="cff-admin-about-text" style="min-height: 340px;">
258
+ <h3>
259
+ <?php esc_html_e( 'Hello and welcome to the Custom Facebook Feed plugin, the most customizable, clean, and simple Facebook feed plugin in the world. At Smash Balloon, we build software that helps you create beautiful responsive social media feeds for your website in minutes.', 'custom-facebook-feed' ); ?>
260
+ </h3>
261
+
262
+ <p>
263
+ <?php esc_html_e( 'Smash Balloon is a fun-loving WordPress plugin development company birthed into existence in early 2013. We specialize in creating plugins that are not only intuitive and simple to use, but also designed to integrate seamlessly into your website and allow you to display your social media content in powerful and unique ways. Over 1 million awesome people have decided to actively use our plugins, which is an incredible honor that we don’t take lightly. This compels us to try to provide the quickest and most effective customer support that we can, blowing users away with the best customer service they’ve ever experienced.', 'custom-facebook-feed' ); ?>
264
+ </p>
265
+ <p>
266
+ <?php esc_html_e( 'We’re a small, but dedicated, team based in Minnesota in the USA.', 'custom-facebook-feed' ); ?>
267
+ </p>
268
+
269
+ </div>
270
+
271
+ <div class="cff-admin-about-image cff-admin-column-last">
272
+ <figure>
273
+ <img src="<?php echo CFF_PLUGIN_URL; ?>img/about/team.jpg" alt="<?php esc_attr_e( 'The Sbi Team photo', 'custom-facebook-feed' ); ?>">
274
+ <figcaption>
275
+ <?php esc_html_e( 'The Smash Balloon Team', 'custom-facebook-feed' ); ?><br>
276
+ </figcaption>
277
+ </figure>
278
+ </div>
279
+
280
+ </div>
281
+ <?php
282
+ }
283
+
284
+ /**
285
+ * Display the Addons section of About tab.
286
+ *
287
+ * @since 1.5.8
288
+ */
289
+ protected function output_about_addons() {
290
+
291
+ if ( ! current_user_can( 'manage_custom_facebook_feed_options' ) || version_compare( PHP_VERSION, '5.3.0' ) <= 0 ) {
292
+ return;
293
+ }
294
+
295
+ $all_plugins = get_plugins();
296
+ $am_plugins = $this->get_am_plugins();
297
+
298
+ ?>
299
+ <div id="cff-admin-addons">
300
+ <div class="addons-container">
301
+ <h3><?php echo __( 'Our Other Plugins', 'custom-facebook-feed' ); ?></h3>
302
+ <?php
303
+ foreach ( $am_plugins as $plugin => $details ) :
304
+
305
+ $plugin_data = $this->get_plugin_data( $plugin, $details, $all_plugins );
306
+
307
+ if ( $plugin === 'wpforms-lite/wpforms.php' ) {
308
+ echo '<h3>' .__( 'Plugins We Recommend', 'custom-facebook-feed' ). '</h3>';
309
+ }
310
+
311
+ ?>
312
+ <div class="addon-container">
313
+ <div class="addon-item">
314
+ <div class="details cff-clear">
315
+ <img src="<?php echo esc_url( $plugin_data['details']['icon'] ); ?>">
316
+ <h5 class="addon-name">
317
+ <?php echo esc_html( $plugin_data['details']['name'] ); ?>
318
+ </h5>
319
+ <p class="addon-desc">
320
+ <?php echo wp_kses_post( $plugin_data['details']['desc'] ); ?>
321
+ </p>
322
+ </div>
323
+ <div class="actions cff-clear">
324
+ <div class="status">
325
+ <strong>
326
+ <?php
327
+ printf(
328
+ /* translators: %s - addon status label. */
329
+ esc_html__( 'Status: %s', 'custom-facebook-feed' ),
330
+ '<span class="status-label ' . esc_attr( $plugin_data['status_class'] ) . '">' . wp_kses_post( $plugin_data['status_text'] ) . '</span>'
331
+ );
332
+ ?>
333
+ </strong>
334
+ </div>
335
+ <div class="action-button">
336
+ <button class="<?php echo esc_attr( $plugin_data['action_class'] ); ?>" data-plugin="<?php echo esc_attr( $plugin_data['plugin_src'] ); ?>" data-type="plugin">
337
+ <?php echo wp_kses_post( $plugin_data['action_text'] ); ?>
338
+ </button>
339
+ </div>
340
+ </div>
341
+ </div>
342
+ </div>
343
+ <?php endforeach; ?>
344
+ </div>
345
+ </div>
346
+ <?php
347
+ }
348
+
349
+ /**
350
+ * Get AM plugin data to display in the Addons section of About tab.
351
+ *
352
+ * @since 1.5.8
353
+ *
354
+ * @param string $plugin Plugin slug.
355
+ * @param array $details Plugin details.
356
+ * @param array $all_plugins List of all plugins.
357
+ *
358
+ * @return array
359
+ */
360
+ protected function get_plugin_data( $plugin, $details, $all_plugins ) {
361
+
362
+ $have_pro = ( ! empty( $details['pro'] ) && ! empty( $details['pro']['plug'] ) );
363
+ $show_pro = false;
364
+
365
+ $plugin_data = array();
366
+
367
+ if ( $have_pro ) {
368
+ if ( array_key_exists( $plugin, $all_plugins ) ) {
369
+ if ( is_plugin_active( $plugin ) ) {
370
+ $show_pro = true;
371
+ }
372
+ }
373
+ if ( array_key_exists( $details['pro']['plug'], $all_plugins ) ) {
374
+ $show_pro = true;
375
+ }
376
+ if ( $show_pro ) {
377
+ $plugin = $details['pro']['plug'];
378
+ $details = $details['pro'];
379
+ }
380
+ }
381
+
382
+ if ( array_key_exists( $plugin, $all_plugins ) ) {
383
+ if ( is_plugin_active( $plugin ) ) {
384
+ // Status text/status.
385
+ $plugin_data['status_class'] = 'status-active';
386
+ $plugin_data['status_text'] = esc_html__( 'Active', 'custom-facebook-feed' );
387
+ // Button text/status.
388
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary disabled';
389
+ $plugin_data['action_text'] = esc_html__( 'Activated', 'custom-facebook-feed' );
390
+ $plugin_data['plugin_src'] = esc_attr( $plugin );
391
+ } else {
392
+ // Status text/status.
393
+ $plugin_data['status_class'] = 'status-inactive';
394
+ $plugin_data['status_text'] = esc_html__( 'Inactive', 'custom-facebook-feed' );
395
+ // Button text/status.
396
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-secondary';
397
+ $plugin_data['action_text'] = esc_html__( 'Activate', 'custom-facebook-feed' );
398
+ $plugin_data['plugin_src'] = esc_attr( $plugin );
399
+ }
400
+ } else {
401
+ // Doesn't exist, install.
402
+ // Status text/status.
403
+ $plugin_data['status_class'] = 'status-download';
404
+ if ( isset( $details['act'] ) && 'go-to-url' === $details['act'] ) {
405
+ $plugin_data['status_class'] = 'status-go-to-url';
406
+ }
407
+ $plugin_data['status_text'] = esc_html__( 'Not Installed', 'custom-facebook-feed' );
408
+ // Button text/status.
409
+ $plugin_data['action_class'] = $plugin_data['status_class'] . ' button button-primary';
410
+ $plugin_data['action_text'] = esc_html__( 'Install Plugin', 'custom-facebook-feed' );
411
+ $plugin_data['plugin_src'] = esc_url( $details['url'] );
412
+ }
413
+
414
+ $plugin_data['details'] = $details;
415
+
416
+ return $plugin_data;
417
+ }
418
+
419
+ /**
420
+ * Display the Getting Started tab content.
421
+ *
422
+ * @since 2.4/5.5
423
+ */
424
+ protected function output_getting_started() {
425
+
426
+ $license = $this->get_license_type();
427
+ ?>
428
+
429
+ <div class="cff-admin-about-section cff-admin-about-section-first-form" style="display:flex;">
430
+
431
+ <div class="cff-admin-about-section-first-form-text">
432
+
433
+ <h2>
434
+ <?php esc_html_e( 'Creating Your First Feed', 'custom-facebook-feed' ); ?>
435
+ </h2>
436
+
437
+ <p>
438
+ <?php esc_html_e( 'Want to get started creating your first feed with Custom Facebook Feed? By following the step by step instructions in this walkthrough, you can easily publish your first feed on your site.', 'custom-facebook-feed' ); ?>
439
+ </p>
440
+
441
+ <p>
442
+ <?php esc_html_e( 'Navigate to Facebook Feed in the admin sidebar to go the Configure page.', 'custom-facebook-feed' ); ?>
443
+ </p>
444
+
445
+ <p>
446
+ <?php esc_html_e( 'Click on the large blue button to connect your Facebook account.', 'custom-facebook-feed' ); ?>
447
+ </p>
448
+
449
+ <p>
450
+ <?php esc_html_e( 'Once you connect a Facebook account, you can display your feed on any post, page or widget using the shortcode [custom-facebook-feed]. You can also use the Custom Facebook Feed Gutenberg block if your site has the WordPress block editor enabled.', 'custom-facebook-feed' ); ?>
451
+ </p>
452
+
453
+ <ul class="list-plain">
454
+ <li>
455
+ <a href="https://smashballoon.com/can-display-feeds-multiple-facebook-pages/?utm_source=WordPress&utm_medium=cff-about-page&utm_campaign=gettingstarted#multiple-feeds" target="_blank" rel="noopener noreferrer">
456
+ <?php esc_html_e( 'Display Multiple Feeds', 'custom-facebook-feed' ); ?>
457
+ </a>
458
+ </li>
459
+ <li>
460
+ <a href="https://smashballoon.com/using-shortcode-options-customize-facebook-feeds/?utm_source=WordPress&utm_medium=cff-about-page&utm_campaign=gettingstarted#differentaccount" target="_blank" rel="noopener noreferrer">
461
+ <?php esc_html_e( 'Shortcode Settings Guide', 'custom-facebook-feed' ); ?>
462
+ </a>
463
+ </li>
464
+ <li>
465
+ <a href="https://smashballoon.com/find-facebook-page-group-id/?utm_source=WordPress&utm_medium=cff-about-page&utm_campaign=gettingstarted#display-form" target="_blank" rel="noopener noreferrer">
466
+ <?php esc_html_e( 'Find My Page ID', 'custom-facebook-feed' ); ?>
467
+ </a>
468
+ </li>
469
+ </ul>
470
+
471
+ </div>
472
+
473
+ <div class="cff-admin-about-section-first-form-video">
474
+ <iframe src="https://www.youtube-nocookie.com/embed/0gykYq3JSrY?rel=0" width="540" height="304" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
475
+ </div>
476
+
477
+ </div>
478
+
479
+ <?php if ( ! in_array( $license, self::$licenses_top, true ) ) { ?>
480
+ <div class="cff-admin-about-section cff-admin-about-section-hero">
481
+
482
+ <div class="cff-admin-about-section-hero-main">
483
+ <h2>
484
+ <?php esc_html_e( 'Get Custom Facebook Feed Pro and Unlock all the Powerful Features', 'custom-facebook-feed' ); ?>
485
+ </h2>
486
+
487
+ <p class="bigger">
488
+ <?php
489
+ echo wp_kses(
490
+ __( 'Thanks for being a loyal Custom Facebook Feed Lite user. <strong>Upgrade to Custom Facebook Feed Pro</strong> to unlock all the awesome features and experience<br>why Custom Facebook Feed is the most popular Facebook feed plugin.', 'custom-facebook-feed' ),
491
+ array(
492
+ 'br' => array(),
493
+ 'strong' => array(),
494
+ )
495
+ );
496
+ ?>
497
+ </p>
498
+
499
+ <p>
500
+ <?php
501
+ printf(
502
+ wp_kses(
503
+ /* translators: %s - stars. */
504
+ __( 'We know that you will truly love Custom Facebook Feed. It has over <strong>1000+ five star ratings</strong> (%s) and is active on over 200,000 websites.', 'custom-facebook-feed' ),
505
+ array(
506
+ 'strong' => array(),
507
+ )
508
+ ),
509
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
510
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
511
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
512
+ '<i class="fa fa-star" aria-hidden="true"></i>' .
513
+ '<i class="fa fa-star" aria-hidden="true"></i>'
514
+ );
515
+ ?>
516
+ </p>
517
+ </div>
518
+
519
+ <div class="cff-admin-about-section-hero-extra">
520
+ <div class="cff-admin-columns">
521
+ <div class="cff-admin-column-50">
522
+ <ul class="list-features list-plain">
523
+ <li>
524
+ <i class="fa fa-check" aria-hidden="true"></i>
525
+ <?php esc_html_e( 'Display photos, videos, and albums in your posts.', 'custom-facebook-feed' ); ?>
526
+ </li>
527
+ <li>
528
+ <i class="fa fa-check" aria-hidden="true"></i>
529
+ <?php esc_html_e( 'Choose which content type to display; posts, photos, albums, videos, links, or events.', 'custom-facebook-feed' ); ?>
530
+ </li>
531
+ <li>
532
+ <i class="fa fa-check" aria-hidden="true"></i>
533
+ <?php esc_html_e( 'Pop-up lightbox to view images and watch videos.', 'custom-facebook-feed' ); ?>
534
+ </li>
535
+ <li>
536
+ <i class="fa fa-check" aria-hidden="true"></i>
537
+ <?php esc_html_e( 'Show comments, likes, shares, reactions and comment replies.', 'custom-facebook-feed' ); ?>
538
+ </li>
539
+ <li>
540
+ <i class="fa fa-check" aria-hidden="true"></i>
541
+ <?php esc_html_e( 'Filter posts by hashtag or words.', 'custom-facebook-feed' ); ?>
542
+ </li>
543
+ </ul>
544
+ </div>
545
+ <div class="cff-admin-column-50 cff-admin-column-last">
546
+ <ul class="list-features list-plain">
547
+ <li>
548
+ <i class="fa fa-check" aria-hidden="true"></i>
549
+ <?php esc_html_e( 'Infinitely load more posts.', 'custom-facebook-feed' ); ?>
550
+ </li>
551
+ <li>
552
+ <i class="fa fa-check" aria-hidden="true"></i>
553
+ <?php esc_html_e( 'HD, 360 degree, and Live video support.', 'custom-facebook-feed' ); ?>
554
+ </li>
555
+ <li>
556
+ <i class="fa fa-check" aria-hidden="true"></i>
557
+ <?php esc_html_e( 'Support for Facebook Groups.', 'custom-facebook-feed' ); ?>
558
+ </li>
559
+ <li>
560
+ <i class="fa fa-check" aria-hidden="true"></i>
561
+ <?php esc_html_e( 'Multiple post layout options.', 'custom-facebook-feed' ); ?>
562
+ </li>
563
+ <li>
564
+ <i class="fa fa-check" aria-hidden="true"></i>
565
+ <?php esc_html_e( 'Priority Pro support from our team of experts.', 'custom-facebook-feed' ); ?>
566
+ </li>
567
+ </ul>
568
+ </div>
569
+ </div>
570
+
571
+ <hr />
572
+
573
+ <h3 class="call-to-action">
574
+ <?php
575
+ if ( 'lite' === $license ) {
576
+ echo '<a href="https://smashballoon.com/custom-facebook-feed/pricing/?utm_source=plugin-free&utm_campaign=cff" target="_blank" rel="noopener noreferrer">';
577
+ } else {
578
+ echo '<a href="https://smashballoon.com/custom-facebook-feed/pricing/?utm_source=WordPress&utm_medium=cff-about-page&utm_campaign=gettingstarted" target="_blank" rel="noopener noreferrer">';
579
+ }
580
+ esc_html_e( 'Get Custom Facebook Feed Pro Today and Unlock all the Powerful Features', 'custom-facebook-feed' );
581
+ ?>
582
+ </a>
583
+ </h3>
584
+
585
+ <?php if ( 'lite' === $license ) { ?>
586
+ <p>
587
+ <?php
588
+ echo wp_kses(
589
+ __( 'Bonus: Custom Facebook Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'custom-facebook-feed' ),
590
+ array(
591
+ 'span' => array(
592
+ 'class' => array(),
593
+ ),
594
+ )
595
+ );
596
+ ?>
597
+ </p>
598
+ <?php } ?>
599
+ </div>
600
+
601
+ </div>
602
+ <?php } ?>
603
+
604
+
605
+ <div class="cff-admin-about-section cff-admin-about-section-squashed cff-admin-about-section-post cff-admin-columns">
606
+ <div class="cff-admin-column-20">
607
+ <img src="<?php echo CFF_PLUGIN_URL; ?>img/about/steps.png" alt="">
608
+ </div>
609
+ <div class="cff-admin-column-80">
610
+ <h2>
611
+ <?php esc_html_e( 'Detailed Step-By-Step Guide', 'custom-facebook-feed' ); ?>
612
+ </h2>
613
+
614
+ <p>
615
+ <?php esc_html_e( 'View detailed steps with related images on our website. We have a comprehensive guide to getting up and running with Custom Facebook Feed.', 'custom-facebook-feed' ); ?>
616
+ </p>
617
+
618
+ <a href="https://smashballoon.com/custom-facebook-feed/docs/free/?utm_source=WordPress&utm_medium=cff-about-page&utm_campaign=gettingstarted" target="_blank" rel="noopener noreferrer" class="cff-admin-about-section-post-link">
619
+ <?php esc_html_e( 'Read Documentation', 'custom-facebook-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
620
+ </a>
621
+ </div>
622
+ </div>
623
+
624
+ <div class="cff-admin-about-section cff-admin-about-section-squashed cff-admin-about-section-post cff-admin-columns">
625
+ <div class="cff-admin-column-20">
626
+ <img src="<?php echo CFF_PLUGIN_URL; ?>img/about/api-error.png" alt="">
627
+ </div>
628
+ <div class="cff-admin-column-80">
629
+ <h2>
630
+ <?php esc_html_e( 'Troubleshoot Connection and API Errors', 'custom-facebook-feed' ); ?>
631
+ </h2>
632
+
633
+ <p>
634
+ <?php esc_html_e( 'Are you having trouble displaying your feed due to an error connecting an account or a Facebook API error? We have several articles to help you troubleshoot issues and help you solve them.', 'custom-facebook-feed' ); ?>
635
+ </p>
636
+
637
+ <a href="https://smashballoon.com/custom-facebook-feed/docs/errors/?utm_source=WordPress&utm_medium=cff-about-page&utm_campaign=gettingstarted" target="_blank" rel="noopener noreferrer" class="cff-admin-about-section-post-link">
638
+ <?php esc_html_e( 'Read Documentation', 'custom-facebook-feed' ); ?><i class="fa fa-external-link" aria-hidden="true"></i>
639
+ </a>
640
+ </div>
641
+ </div>
642
+
643
+ <?php
644
+ }
645
+
646
+ /**
647
+ * Get the next license type. Helper for Versus tab content.
648
+ *
649
+ * @since 1.5.5
650
+ *
651
+ * @param string $current Current license type slug.
652
+ *
653
+ * @return string Next license type slug.
654
+ */
655
+ protected function get_next_license( $current ) {
656
+
657
+ return 'Pro';
658
+ $current = ucfirst( $current );
659
+ $license_pairs = array(
660
+ 'Lite' => 'Pro',
661
+ 'Basic' => 'Pro',
662
+ 'Plus' => 'Pro',
663
+ 'Pro' => 'Elite',
664
+ );
665
+
666
+ return ! empty( $license_pairs[ $current ] ) ? $license_pairs[ $current ] : 'Elite';
667
+ }
668
+
669
+ /**
670
+ * Display the Versus tab content.
671
+ *
672
+ * @since 2.4/5.5
673
+ */
674
+ protected function output_versus() {
675
+
676
+ //$license = $this->get_license_type();
677
+ //$next_license = $this->get_next_license( $license );
678
+ $license = 'lite';
679
+ $next_license = 'pro';
680
+ ?>
681
+
682
+ <div class="cff-admin-about-section cff-admin-about-section-squashed">
683
+ <h1 class="centered">
684
+ <strong><?php echo esc_html( ucfirst( $license ) ); ?></strong> vs <strong><?php echo esc_html( ucfirst( $next_license ) ); ?></strong>
685
+ </h1>
686
+
687
+ <p class="centered">
688
+ <?php esc_html_e( 'Get the most out of your Custom Facebook Feeds by upgrading to Pro and unlocking all of the powerful features.', 'custom-facebook-feed' ); ?>
689
+ </p>
690
+ </div>
691
+
692
+ <div class="cff-admin-about-section cff-admin-about-section-squashed cff-admin-about-section-hero cff-admin-about-section-table">
693
+
694
+ <div class="cff-admin-about-section-hero-main cff-admin-columns">
695
+ <div class="cff-admin-column-33">
696
+ <h3 class="no-margin">
697
+ <?php esc_html_e( 'Feature', 'custom-facebook-feed' ); ?>
698
+ </h3>
699
+ </div>
700
+ <div class="cff-admin-column-33">
701
+ <h3 class="no-margin">
702
+ <?php echo esc_html( ucfirst( $license ) ); ?>
703
+ </h3>
704
+ </div>
705
+ <div class="cff-admin-column-33">
706
+ <h3 class="no-margin">
707
+ <?php echo esc_html( ucfirst( $next_license ) ); ?>
708
+ </h3>
709
+ </div>
710
+ </div>
711
+ <div class="cff-admin-about-section-hero-extra no-padding cff-admin-columns">
712
+
713
+ <table>
714
+ <?php
715
+ foreach ( self::$licenses_features as $slug => $name ) {
716
+ $current = $this->get_license_data( $slug, $license );
717
+ $next = $this->get_license_data( $slug, strtolower( $next_license ) );
718
+
719
+ if ( empty( $current ) || empty( $next ) ) {
720
+ continue;
721
+ }
722
+ ?>
723
+ <tr class="cff-admin-columns">
724
+ <td class="cff-admin-column-33">
725
+ <p><?php echo esc_html( $name ); ?></p>
726
+ </td>
727
+ <td class="cff-admin-column-33">
728
+ <?php if ( is_array( $current ) ) : ?>
729
+ <p class="features-<?php echo esc_attr( $current['status'] ); ?>">
730
+ <?php echo wp_kses_post( implode( '<br>', $current['text'] ) ); ?>
731
+ </p>
732
+ <?php endif; ?>
733
+ </td>
734
+ <td class="cff-admin-column-33">
735
+ <?php if ( is_array( $current ) ) : ?>
736
+ <p class="features-full">
737
+ <?php echo wp_kses_post( implode( '<br>', $next['text'] ) ); ?>
738
+ </p>
739
+ <?php endif; ?>
740
+ </td>
741
+ </tr>
742
+ <?php
743
+ }
744
+ ?>
745
+ </table>
746
+
747
+ </div>
748
+
749
+ </div>
750
+
751
+ <div class="cff-admin-about-section cff-admin-about-section-hero">
752
+ <div class="cff-admin-about-section-hero-main no-border">
753
+ <h3 class="call-to-action centered">
754
+ <?php
755
+ if ( 'lite' === $license ) {
756
+ echo '<a href="https://smashballoon.com/custom-facebook-feed/pricing/?utm_source=WordPress&utm_medium=cff-about-page&utm_campaign=gettingstarted" target="_blank" rel="noopener noreferrer">';
757
+ } else {
758
+ echo '<a href="https://smashballoon.com/custom-facebook-feed/pricing/?utm_source=WordPress&utm_medium=cff-about-page&utm_campaign=gettingstarted" target="_blank" rel="noopener noreferrer">';
759
+ }
760
+ printf( /* translators: %s - next license level. */
761
+ esc_html__( 'Get Custom Facebook Feed Pro Today and Unlock all the Powerful Features', 'custom-facebook-feed' ),
762
+ esc_html( $next_license )
763
+ );
764
+ ?>
765
+ </a>
766
+ </h3>
767
+
768
+ <?php if ( 'lite' === $license ) { ?>
769
+ <p class="centered">
770
+ <?php
771
+ echo wp_kses(
772
+ __( 'Bonus: Custom Facebook Feed Lite users get <span class="price-20-off">50% off regular price</span>, automatically applied at checkout.', 'custom-facebook-feed' ),
773
+ array(
774
+ 'span' => array(
775
+ 'class' => array(),
776
+ ),
777
+ )
778
+ );
779
+ ?>
780
+ </p>
781
+ <?php } ?>
782
+ </div>
783
+ </div>
784
+
785
+ <?php
786
+ }
787
+
788
+ /**
789
+ * List of AM plugins that we propose to install.
790
+ *
791
+ * @since 2.4/5.5
792
+ *
793
+ * @return array
794
+ */
795
+ protected function get_am_plugins() {
796
+
797
+ $images_url = CFF_PLUGIN_URL . 'img/about/';
798
+
799
+ return array(
800
+ 'instagram-feed/instagram-feed.php' => array(
801
+ 'icon' => $images_url . 'plugin-if.png',
802
+ 'name' => esc_html__( 'Instagram Feed', 'custom-facebook-feed' ),
803
+ 'desc' => esc_html__( 'Instagram Feed is a clean and beautiful way to add your Instagram posts to your website. Grab your visitors attention and keep them engaged with your site longer.', 'custom-facebook-feed' ),
804
+ 'url' => 'https://downloads.wordpress.org/plugin/instagram-feed.zip',
805
+ 'pro' => array(
806
+ 'plug' => 'instagram-feed-pro/instagram-feed.php',
807
+ 'icon' => $images_url . 'plugin-if.png',
808
+ 'name' => esc_html__( 'Instagram Feed Pro', 'custom-facebook-feed' ),
809
+ 'desc' => esc_html__( 'Instagram Feed is a clean and beautiful way to add your Instagram posts to your website. Grab your visitors attention and keep them engaged with your site longer.', 'custom-facebook-feed' ),
810
+ 'url' => 'https://smashballoon.com/instagram-feed/?utm_source=WordPress&utm_campaign=facebook'.$this->get_license_type().'about',
811
+ 'act' => 'go-to-url',
812
+ ),
813
+ ),
814
+
815
+ 'custom-twitter-feeds/custom-twitter-feed.php' => array(
816
+ 'icon' => $images_url . 'plugin-tw.jpg',
817
+ 'name' => esc_html__( 'Custom Twitter Feeds', 'custom-facebook-feed' ),
818
+ 'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'custom-facebook-feed' ),
819
+ 'url' => 'https://downloads.wordpress.org/plugin/custom-twitter-feeds.zip',
820
+ 'pro' => array(
821
+ 'plug' => 'custom-twitter-feeds-pro/custom-twitter-feed.php',
822
+ 'icon' => $images_url . 'plugin-tw.jpg',
823
+ 'name' => esc_html__( 'Custom Twitter Feeds Pro', 'custom-facebook-feed' ),
824
+ 'desc' => esc_html__( 'Custom Twitter Feeds is a highly customizable way to display tweets from your Twitter account. Promote your latest content and update your site content automatically.', 'custom-facebook-feed' ),
825
+ 'url' => 'https://smashballoon.com/custom-twitter-feeds/?utm_source=WordPress&utm_campaign=facebook'.$this->get_license_type().'about',
826
+ 'act' => 'go-to-url',
827
+ ),
828
+ ),
829
+
830
+ 'feeds-for-youtube/youtube-feed.php' => array(
831
+ 'icon' => $images_url . 'plugin-yt.png',
832
+ 'name' => esc_html__( 'Feeds for YouTube', 'custom-facebook-feed' ),
833
+ 'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'custom-facebook-feed' ),
834
+ 'url' => 'https://downloads.wordpress.org/plugin/feeds-for-youtube.zip',
835
+ 'pro' => array(
836
+ 'plug' => 'youtube-feed-pro/youtube-feed.php',
837
+ 'icon' => $images_url . 'plugin-yt.png',
838
+ 'name' => esc_html__( 'Feeds for YouTube Pro', 'custom-facebook-feed' ),
839
+ 'desc' => esc_html__( 'Feeds for YouTube is a simple yet powerful way to display videos from YouTube on your website. Increase engagement with your channel while keeping visitors on your website.', 'custom-facebook-feed' ),
840
+ 'url' => 'https://smashballoon.com/youtube-feed/?utm_source=WordPress&utm_campaign=facebook'.$this->get_license_type().'about',
841
+ 'act' => 'go-to-url',
842
+ ),
843
+ ),
844
+
845
+ 'wpforms-lite/wpforms.php' => array(
846
+ 'icon' => $images_url . 'plugin-wpforms.png',
847
+ 'name' => esc_html__( 'WPForms', 'custom-facebook-feed' ),
848
+ 'desc' => esc_html__( 'The most beginner friendly drag & drop WordPress forms plugin allowing you to create beautiful contact forms, subscription forms, payment forms, and more in minutes, not hours!', 'custom-facebook-feed' ),
849
+ 'url' => 'https://downloads.wordpress.org/plugin/wpforms-lite.zip',
850
+ 'pro' => array(
851
+ 'plug' => 'wpforms/wpforms.php',
852
+ 'icon' => $images_url . 'plugin-wpforms.png',
853
+ 'name' => esc_html__( 'WPForms', 'custom-facebook-feed' ),
854
+ 'desc' => esc_html__( 'The most beginner friendly drag & drop WordPress forms plugin allowing you to create beautiful contact forms, subscription forms, payment forms, and more in minutes, not hours!', 'custom-facebook-feed' ),
855
+ 'url' => 'https://wpforms.com/lite-upgrade/?utm_source=WordPress&utm_campaign=liteplugin&utm_medium=cff-about-page',
856
+ 'act' => 'go-to-url',
857
+ ),
858
+ ),
859
+
860
+ 'google-analytics-for-wordpress/googleanalytics.php' => array(
861
+ 'icon' => $images_url . 'plugin-mi.png',
862
+ 'name' => esc_html__( 'MonsterInsights', 'custom-facebook-feed' ),
863
+ 'desc' => esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'custom-facebook-feed' ),
864
+ 'url' => 'https://downloads.wordpress.org/plugin/google-analytics-for-wordpress.zip',
865
+ 'pro' => array(
866
+ 'plug' => 'google-analytics-premium/googleanalytics-premium.php',
867
+ 'icon' => $images_url . 'plugin-mi.png',
868
+ 'name' => esc_html__( 'MonsterInsights Pro', 'custom-facebook-feed' ),
869
+ 'desc' => esc_html__( 'MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business.', 'custom-facebook-feed' ),
870
+ 'url' => 'https://www.monsterinsights.com/?utm_source=proplugin&utm_medium=cff-about-page&utm_campaign=pluginurl&utm_content=7%2E0%2E0',
871
+ 'act' => 'go-to-url',
872
+ ),
873
+ ),
874
+
875
+ 'optinmonster/optin-monster-wp-api.php' => array(
876
+ 'icon' => $images_url . 'plugin-om.png',
877
+ 'name' => esc_html__( 'OptinMonster', 'custom-facebook-feed' ),
878
+ 'desc' => esc_html__( 'Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers.', 'custom-facebook-feed' ),
879
+ 'url' => 'https://downloads.wordpress.org/plugin/optinmonster.zip',
880
+ ),
881
+
882
+ 'wp-mail-smtp/wp_mail_smtp.php' => array(
883
+ 'icon' => $images_url . 'plugin-smtp.png',
884
+ 'name' => esc_html__( 'WP Mail SMTP', 'custom-facebook-feed' ),
885
+ 'desc' => esc_html__( 'Make sure your website\'s emails reach the inbox. Our goal is to make email deliverability easy and reliable. Trusted by over 1 million websites.', 'custom-facebook-feed' ),
886
+ 'url' => 'https://downloads.wordpress.org/plugin/wp-mail-smtp.zip',
887
+ 'pro' => array(
888
+ 'plug' => 'wp-mail-smtp-pro/wp_mail_smtp.php',
889
+ 'icon' => $images_url . 'plugin-smtp.png',
890
+ 'name' => esc_html__( 'WP Mail SMTP Pro', 'custom-facebook-feed' ),
891
+ 'desc' => esc_html__( 'Make sure your website\'s emails reach the inbox. Our goal is to make email deliverability easy and reliable. Trusted by over 1 million websites.', 'custom-facebook-feed' ),
892
+ 'url' => 'https://wpmailsmtp.com/pricing/',
893
+ 'act' => 'go-to-url',
894
+ ),
895
+ ),
896
+
897
+ 'rafflepress/rafflepress.php' => array(
898
+ 'icon' => $images_url . 'plugin-rp.png',
899
+ 'name' => esc_html__( 'RafflePress', 'custom-facebook-feed' ),
900
+ 'desc' => esc_html__( 'Turn your visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with powerful viral giveaways & contests.', 'custom-facebook-feed' ),
901
+ 'url' => 'https://downloads.wordpress.org/plugin/rafflepress.zip',
902
+ 'pro' => array(
903
+ 'plug' => 'rafflepress-pro/rafflepress-pro.php',
904
+ 'icon' => $images_url . 'plugin-rp.png',
905
+ 'name' => esc_html__( 'RafflePress Pro', 'custom-facebook-feed' ),
906
+ 'desc' => esc_html__( 'Turn your visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with powerful viral giveaways & contests.', 'custom-facebook-feed' ),
907
+ 'url' => 'https://rafflepress.com/pricing/',
908
+ 'act' => 'go-to-url',
909
+ ),
910
+ ),
911
+
912
+ 'all-in-one-seo-pack/all_in_one_seo_pack.php' => array(
913
+ 'icon' => $images_url . 'plugin-seo.png',
914
+ 'name' => esc_html__( 'All In One SEO Pack', 'custom-facebook-feed' ),
915
+ 'desc' => esc_html__( 'Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.', 'custom-facebook-feed' ),
916
+ 'url' => 'https://downloads.wordpress.org/plugin/all-in-one-seo-pack.zip',
917
+ ),
918
+ );
919
+ }
920
+
921
+ /**
922
+ * Get the array of data that compared the license data.