PluginProbe ʕ •ᴥ•ʔ
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN / 3.15.3
Smush – Image Optimization, Compression, Lazy Load, WebP & CDN v3.15.3
4.1.0 4.0.3 4.0.2 2.8.1 2.9.1 3.0.0 3.0.1 3.0.2 3.1.1 3.10.1 3.10.2 3.10.3 3.11.1 3.12.3 3.12.4 3.12.5 3.12.6 3.13.0 3.13.1 3.13.2 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.2 3.16.4 3.16.5 3.16.6 3.17.0 3.17.1 3.18.0 3.18.1 3.2.0.1 3.2.1 3.2.2.1 3.2.4 3.20.0 3.21.1 3.22.1 3.22.3 3.23.0 3.23.1 3.23.2 3.23.3 3.23.4 3.24.0 3.24.0-beta.2 3.3.0 3.3.1 3.3.2 3.4.1 3.4.2 3.6.1 3.6.3 3.7.0 3.7.1 3.7.2 3.7.3 3.8.2 3.8.3 3.8.4 3.8.5 3.8.7 3.8.8 3.9.0 3.9.1 3.9.11 3.9.2 3.9.4 3.9.5 3.9.8 3.9.9 trunk 1.0.0 1.0.1 1.0.2 1.1 1.1.1 1.1.2 1.1.3 1.2 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 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.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.5.1 1.6.5.2 1.6.5.3 1.6.5.4 1.7 1.7.1 1.7.1.1 2.0 2.0.1 2.0.3 2.0.4 2.0.5 2.0.6 2.0.6.2 2.0.6.3 2.0.6.5 2.0.7 2.0.7.1 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2 2.2.1 2.2.2 2.3 2.3.1 2.4 2.4.2 2.4.3 2.4.4 2.4.5 2.5.2 2.5.3 2.6.1 2.6.2 2.6.3 2.7 2.7.1 2.7.4 2.7.4.1 2.7.5 2.7.6 2.7.8 2.7.8.1 2.7.9.1 2.8.0 2.8.0.1
wp-smushit / app / pages / class-integrations.php
wp-smushit / app / pages Last commit date
class-bulk.php 2 years ago class-cdn.php 2 years ago class-dashboard.php 2 years ago class-directory.php 2 years ago class-integrations.php 2 years ago class-lazy.php 2 years ago class-nextgen.php 2 years ago class-settings.php 2 years ago class-tutorials.php 2 years ago class-upgrade.php 2 years ago class-webp.php 2 years ago
class-integrations.php
93 lines
1 <?php
2 /**
3 * Integrations page.
4 *
5 * @package Smush\App\Pages
6 */
7
8 namespace Smush\App\Pages;
9
10 use Smush\App\Abstract_Page;
11 use Smush\App\Interface_Page;
12 use Smush\Core\Settings;
13 use WP_Smush;
14
15 if ( ! defined( 'WPINC' ) ) {
16 die;
17 }
18
19 /**
20 * Class Integrations
21 */
22 class Integrations extends Abstract_Page implements Interface_Page {
23 /**
24 * Function triggered when the page is loaded before render any content.
25 */
26 public function on_load() {
27 add_action( 'smush_setting_column_right_inside', array( $this, 'settings_desc' ), 10, 2 );
28 }
29
30 /**
31 * Register meta boxes.
32 */
33 public function register_meta_boxes() {
34 $class = WP_Smush::is_pro() ? 'smush-integrations-wrapper wp-smush-pro' : 'smush-integrations-wrapper';
35
36 $this->add_meta_box(
37 'integrations',
38 __( 'Integrations', 'wp-smushit' ),
39 array( $this, 'integrations_meta_box' ),
40 null,
41 array( $this, 'common_meta_box_footer' ),
42 'main',
43 array(
44 'box_class' => "sui-box {$class}",
45 'box_content_class' => 'sui-box-body sui-upsell-items',
46 )
47 );
48 }
49
50 /**
51 * Common footer meta box.
52 *
53 * @since 3.2.0
54 */
55 public function common_meta_box_footer() {
56 $this->view( 'meta-box-footer', array(), 'common' );
57 }
58
59 /**
60 * Integrations meta box.
61 *
62 * Free and pro version settings are shown in same section. For free users, pro settings won't be shown.
63 * To print full size smush, resize and backup in group, we hook at `smush_setting_column_right_end`.
64 */
65 public function integrations_meta_box() {
66 $this->view(
67 'integrations/meta-box',
68 array(
69 'basic_features' => Settings::$basic_features,
70 'is_pro' => WP_Smush::is_pro(),
71 'integration_group' => $this->settings->get_integrations_fields(),
72 'settings' => $this->settings->get(),
73 )
74 );
75 }
76
77 /**
78 * Show additional descriptions for settings.
79 *
80 * @param string $setting_key Setting key.
81 */
82 public function settings_desc( $setting_key = '' ) {
83 if ( empty( $setting_key ) || 's3' !== $setting_key ) {
84 return;
85 }
86 ?>
87 <span class="sui-description sui-toggle-description" id="s3-desc">
88 <?php esc_html_e( 'Note: For this process to happen automatically you need automatic smushing enabled.', 'wp-smushit' ); ?>
89 </span>
90 <?php
91 }
92 }
93