C:\xampp\htdocs\landing\wp-content\plugins\imagify\views\part-settings-account.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
defined
'ABSPATH' ) || die( 'Cheatin’ uh?' );

if ( 
defined'IMAGIFY_HIDDEN_ACCOUNT' ) && IMAGIFY_HIDDEN_ACCOUNT ) {
    if ( ! 
defined'IMAGIFY_API_KEY' ) || ! IMAGIFY_API_KEY ) {
        
$options Imagify_Options::get_instance();
        
?>
        <input type="hidden" value="<?php echo esc_attr$options->get'api_key' ) ); ?>" name="<?php echo $options->get_option_name(); ?>[api_key]">
        <?php
    
}
    return;
}

if ( 
Imagify_Requirements::is_api_key_valid() ) {
    
$user             imagify_get_cached_user();
    
$unconsumed_quota $user $user->get_percent_unconsumed_quota false;
    
$hidden_class     '';

    if ( ! 
$user ) {
        
// Lazyload user.
        
Imagify_Assets::get_instance()->localize_script'options''imagifyUser', array(
            
'action'   => 'imagify_get_user_data',
            
'_wpnonce' => wp_create_nonce'imagify_get_user_data' ),
        ) );
    }
} else {
    
$hidden_class ' hidden';
}
?>
<div class="imagify-settings-section">

    <?php
    
if ( Imagify_Requirements::is_api_key_valid() ) {
        
?>
        <div class="imagify-col-content imagify-block-secondary imagify-mt2">
            <?php
            
/**
             * Best plan.
             */
            
?>
            <div class="best-plan<?php echo $hidden_class?>">
                <h3 class="imagify-user-best-plan-title">
                    <?php
                    
if ( $user && ! $unconsumed_quota ) {
                        
esc_html_e'Oops, It\'s Over!''imagify' );
                    } elseif ( 
$user && $unconsumed_quota <= 20 ) {
                        
esc_html_e'Oops, It\'s almost over!''imagify' );
                    } else {
                        
esc_html_e'You\'re new to Imagify?''imagify' );
                    }
                    
?>
                </h3>

                <p><?php esc_html_e'Let us help you by analyzing your existing images and determine the best plan for you.''imagify' ); ?></p>

                <button id="imagify-get-pricing-modal" data-nonce="<?php echo wp_create_nonce'imagify_get_pricing_' get_current_user_id() ); ?>" data-target="#imagify-pricing-modal" type="button" class="imagify-modal-trigger imagify-button imagify-button-light imagify-full-width">
                    <i class="dashicons dashicons-dashboard" aria-hidden="true"></i>
                    <span class="button-text"><?php esc_html_e'What plan do I need?''imagify' ); ?></span>
                </button>
            </div>
        </div><!-- .imagify-col-content -->
        <?php
    
}
    
?>

    <?php
    
if ( ! defined'IMAGIFY_API_KEY' ) || ! IMAGIFY_API_KEY ) {
        if ( 
Imagify_Requirements::is_api_key_valid() ) {
            
?>
            <h2 class="imagify-options-title">
                <?php esc_html_e'Account Type''imagify' ); ?>
                <strong class="imagify-user-plan-label"><?php echo $user esc_html$user->plan_label ) : ''?></strong>
            </h2>
            <?php
        
} else {
            
?>
            <h2 class="imagify-options-title"><?php esc_html_e'Your Account''imagify' ); ?></h2>
            <p class="imagify-options-subtitle"><?php esc_html_e'Options page isn’t available until you enter your API Key''imagify' ); ?></p>
            <?php
        
}
        
?>

        <?php
        
/**
         * API key field.
         */
        
$options Imagify_Options::get_instance();

        if ( ! 
$options->get'api_key' ) ) {
            
?>
            <p class="imagify-api-key-invite"><?php esc_html_e'Don\'t have an API Key yet?''imagify' ); ?></p>

            <p><a id="imagify-signup" class="button imagify-button-secondary" href="<?php echo esc_urlimagify_get_external_url'register' ) ); ?>" target="_blank"><?php esc_html_e'Create a Free API Key''imagify' ); ?></a></p>
            <?php
        
}
        
?>

        <div class="imagify-api-line">
            <label for="api_key"><?php echo $options->get'api_key' ) ? esc_html__'API Key''imagify' ) : esc_html__'Enter Your API Key Below''imagify' ); ?></label>
            <input type="text" size="35" value="<?php echo esc_attr$options->get'api_key' ) ); ?>" name="<?php echo $options->get_option_name(); ?>[api_key]" id="api_key">
            <?php
            
if ( Imagify_Requirements::is_api_key_valid() ) {
                
?>

                <span id="imagify-check-api-container" class="imagify-valid">
                    <span class="imagify-icon">✓</span> <?php esc_html_e'Your API key is valid.''imagify' ); ?>
                </span>

                <?php
            
} elseif ( ! Imagify_Requirements::is_api_key_valid() && $options->get'api_key' ) ) {
                
?>

                <span id="imagify-check-api-container">
                    <span class="dashicons dashicons-no"></span> <?php esc_html_e'Your API key isn\'t valid!''imagify' ); ?>
                </span>

                <?php
            
}
            
?>
            <input id="check_api_key" type="hidden" value="<?php echo esc_attr$options->get'api_key' ) ); ?>" name="check_api_key">
        </div><!-- .imagify-api-line -->
        <?php
    
}
    
?>
</div>
<?php
x

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