C:\xampp\htdocs\landing\wp-content\plugins\wp-smushit\app\views\integrations\meta-box.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
 * Integrations meta box
 *
 * @package WP_Smush
 *
 * @var Dashboard $this
 *
 * @var array  $basic_features    Basic features array.
 * @var bool   $is_pro            Is PRO user or not.
 * @var array  $integration_group Integration group.
 * @var array  $settings          Settings array.
 * @var array  $settings_data     Settings descriptions and labels.
 * @var string $upsell_url        Upsell URL.
 */

use Smush\App\Pages\Dashboard;

if ( ! 
defined'WPINC' ) ) {
    die;
}

?>

<form id="wp-smush-settings-form" method="post">
    <input type="hidden" name="setting_form" id="setting_form" value="integrations">
    <?php if ( is_multisite() && is_network_admin() ) : ?>
        <input type="hidden" name="setting-type" value="network">
    <?php endif; ?>

    <?php
    wp_nonce_field
'save_wp_smush_options''wp_smush_options_nonce'''true );

    foreach ( 
$integration_group as $name ) {
        
// Settings key.
        
$setting_m_key WP_SMUSH_PREFIX $name;
        
// Disable setting.
        
$disable apply_filters'wp_smush_integration_status_' $namefalse );
        
// Gray out row, disable setting.
        
$upsell = ( ! in_array$name$basic_featurestrue ) && ! $is_pro );
        
// Current setting value.
        
$setting_val = ( $upsell || empty( $settings$name ] ) || $disable ) ? $settings$name ];
        
// Current setting label.
        
$label = ! empty( $settings_data$name ]['short_label'] ) ? $settings_data$name ]['short_label'] : $settings_data$name ]['label'];

        
// Show settings option.
        
$this->settings_row$setting_m_key$label$name$setting_val$disable$upsell );

    }
    
// Hook after showing integration settings.
    
do_action'wp_smush_after_integration_settings' );
    
?>
</form>

<?php if ( ! $is_pro ) : ?>
    <div class="sui-box-settings-row sui-upsell-row">
        <img class="sui-image sui-upsell-image sui-upsell-image-smush integrations-upsell-image" alt="" style="width: 80px"
            src="<?php echo esc_urlWP_SMUSH_URL 'app/assets/images/smush-graphic-integrations-upsell.png' ); ?>"
            srcset="<?php echo esc_urlWP_SMUSH_URL 'app/assets/images/smush-graphic-integrations-upsell@2x.png' ); ?> 2x">
        <div class="sui-notice sui-notice-purple smush-upsell-notice">
            <div class="sui-notice-content">
                <div class="sui-notice-message">
                    <p>
                        <?php
                        printf
(
                            
/* translators: %1$s - a href tag, %2$s - a href closing tag */
                            
esc_html__'Smush Pro supports hosting images on Amazon S3 and optimizing NextGen Gallery images directly through NextGen Gallery settings. %1$sTry it free%2$s with a WPMU DEV membership today!''wp-smushit' ),
                            
'<a href="' esc_url$upsell_url ) . '" target="_blank" title="' esc_html__'Try Smush Pro for FREE''wp-smushit' ) . '">',
                            
'</a>'
                        
);
                        
?>
                    </p>
                    <p>
                        <a href="<?php echo esc_url$upsell_url ); ?>" target="_blank" class="sui-button sui-button-purple">
                            <?php esc_html_e'Try Smush Pro for Free''wp-smushit' ); ?>
                        </a>
                    </p>
                </div>
            </div>
        </div>
    </div>
<?php endif; ?>
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586