PluginProbe ʕ •ᴥ•ʔ
NitroPack – Performance, Page Speed & Cache Plugin for Core Web Vitals, CDN & Image Optimization / 1.18.9
NitroPack – Performance, Page Speed & Cache Plugin for Core Web Vitals, CDN & Image Optimization v1.18.9
1.19.8 1.19.7 1.19.6 1.19.5 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.11.0 1.12.0 1.13.0 1.14.0 1.15.0 1.15.1 1.15.2 1.15.3 1.16.0 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.16.6 1.16.7 1.16.8 1.17.0 1.17.6 1.17.7 1.17.8 1.17.9 1.18.0 1.18.1 1.18.2 1.18.3 1.18.4 1.18.5 1.18.6 1.18.7 1.18.8 1.18.9 1.19.0 1.19.1 1.19.2 1.19.3 1.19.4 1.3.19 1.3.20 1.4.0 1.4.1 1.5.0 1.5.1 1.5.10 1.5.11 1.5.12 1.5.13 1.5.14 1.5.15 1.5.16 1.5.17 1.5.18 1.5.19 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.8.1 1.8.3 1.9.0 1.9.1 1.9.2
nitropack / view / dashboard-oneclick.php
nitropack / view Last commit date
animations 7 months ago images 7 months ago javascript 5 months ago modals 5 months ago stylesheet 7 months ago templates 1 year ago admin.php 5 months ago connect-oneclick.php 1 year ago connect.php 7 months ago dashboard-oneclick.php 5 months ago dashboard.php 5 months ago oneclick.php 7 months ago preview-site.php 7 months ago system-report.php 1 year ago
dashboard-oneclick.php
164 lines
1 <?php
2 $settings = new \NitroPack\WordPress\Settings();
3 $notifications = new \NitroPack\WordPress\Notifications\Notifications();
4 $usage = '0 MB';
5 $max_usage = '1 GB';
6 $page_views = '0';
7 $max_page_views = '10000';
8
9 $conflictingPlugins = \NitroPack\WordPress\ConflictingPlugins::getInstance();
10 $conflictingPlugins_list = $conflictingPlugins->nitropack_get_conflicting_plugins();
11 if ( $conflictingPlugins_list ) {
12 require_once NITROPACK_PLUGIN_DIR . 'view/modals/modal-plugin-deactivate.php';
13 }
14
15 $notifications->nitropack_display_admin_notices();
16 $dismissed_notices = get_option( 'nitropack-dismissed-notices' );
17
18 $nitro = get_nitropack_sdk();
19 $cache_warmup_stats = $nitro->getApi()->getWarmupStats();
20 $cache_warmup_enabled = ! empty( $cache_warmup_stats['status'] ) && $cache_warmup_stats['status'] === 1 ? true : false;
21 ?>
22 <div class="grid grid-cols-2 gap-6 grid-col-1-tablet items-start nitropack-dashboard">
23 <div class="col-span-1">
24 <!-- Optimized Pages Card -->
25 <?php $settings->optimizations->render(); ?>
26 <!-- Optimized Pages Card End -->
27 <!-- Optimization Mode Card -->
28 <?php $settings->optimization_level->render(); ?>
29 <!-- Optimization Mode Card End -->
30 <!-- Automated Behavior Card -->
31 <div class="card card-automated-behavior">
32 <div class="card-header">
33 <h3><?php esc_html_e( 'Automated Behavior', 'nitropack' ); ?></h3>
34 </div>
35 <div class="card-body">
36 <div class="options-container">
37 <div class="nitro-option" id="purge-cache-widget">
38 <div class="nitro-option-main">
39 <div class="text-box">
40 <h6><?php esc_html_e( 'Purge cache', 'nitropack' ); ?></h6>
41 <p><?php esc_html_e( 'Purge affected cache when content is updated or published', 'nitropack' ); ?>
42 </p>
43 </div>
44 <label class="inline-flex items-center cursor-pointer ml-auto">
45 <input type="checkbox" value="" class="sr-only peer" name="purge_cache"
46 id="auto-purge-status" <?php if ( $autoCachePurge )
47 echo "checked"; ?>>
48 <div class="toggle"></div>
49 </label>
50 </div>
51 </div>
52 <div class="nitro-option" id="page-optimization-widget">
53 <div class="nitro-option-main">
54 <div class="text-box">
55 <h6><?php esc_html_e( 'Page optimization', 'nitropack' ); ?></h6>
56 <p><?php esc_html_e( 'Select what post/page types get optimized', 'nitropack' ); ?></p>
57 </div>
58 <a data-modal-target="modal-posttypes" data-modal-toggle="modal-posttypes"
59 class="btn btn-secondary btn-icon">
60 <img src="<?php echo plugin_dir_url( __FILE__ ); ?>images/setting-icon.svg">
61 </a>
62 </div>
63 <?php require_once NITROPACK_PLUGIN_DIR . 'view/modals/modal-posttypes.php'; ?>
64 </div>
65 </div>
66 </div>
67 </div>
68 <!-- Automated Behavior Card End -->
69 <!-- Go to app Card -->
70 <div class="card exclusion-card">
71 <div class="card-header">
72 <h3><?php esc_html_e( 'Exclusions', 'nitropack' ); ?></h3>
73 </div>
74 <div class="card-body">
75 <div class="options-container">
76 <div class="nitro-option" id="ajax-shortcodes-widget">
77 <?php $settings->render_ajax_shortcodes_setting(); ?>
78 </div>
79 </div>
80 </div>
81 </div>
82 <!-- Go to app card End -->
83 </div>
84 <div class="col-span-1">
85 <!-- Basic Settings Card -->
86 <div class="card card-basic-settings">
87 <div class="card-header">
88 <h3><?php esc_html_e( 'Basic Settings', 'nitropack' ); ?></h3>
89 </div>
90 <div class="card-body">
91 <div class="options-container">
92
93 <?php $settings->cache_warmup->render();
94 $settings->test_mode->render(); ?>
95
96 <div class="nitro-option" id="compression-widget">
97 <div class="nitro-option-main">
98 <div class="text-box">
99 <h6><span
100 id="detected-compression"><?php esc_html_e( 'HTML Compression', 'nitropack' ); ?>
101 </span></h6>
102 <p>
103 <?php esc_html_e( 'Compressing the structure of your HTML, ensures faster page rendering and an optimized browsing experience for your users.', 'nitropack' ); ?>
104 <a href="https://support.nitropack.io/en/articles/8390333-nitropack-plugin-settings-in-wordpress#h_29b7ab4836"
105 class="text-blue"
106 target="_blank"><?php esc_html_e( 'Learn more', 'nitropack' ); ?></a>
107 </p>
108 </div>
109 <label class="inline-flex items-center cursor-pointer ml-auto">
110 <input type="checkbox" id="compression-status" class="sr-only peer" <?php echo (int) $enableCompression === 1 ? "checked" : ""; ?>>
111 <div class="toggle"></div>
112 </label>
113 </div>
114 <div class="mt-4 text-primary">
115 <a href="javascript:void(0);" id="compression-test-btn"
116 class="text-primary"><?php esc_html_e( 'Run compression test', 'nitropack' ); ?></a>
117 <div class="flex items-start msg-container hidden">
118 <span class="msg"></span>
119 </div>
120 </div>
121 </div>
122 <?php if ( \NitroPack\Integration\Plugin\BeaverBuilder::isActive() ) { ?>
123 <div class="nitro-option" id="beaver-builder-widget">
124 <div class="nitro-option-main">
125 <div class="text-box">
126 <h6><span
127 id="detected-compression"><?php esc_html_e( 'Sync NitroPack Purge with Beaver Builder', 'nitropack' ); ?>
128 </span></h6>
129 <p>
130 <?php esc_html_e( 'When Beaver Builder cache is purged, NitroPack will perform a full cache purge keeping your site\'s content up-to-date.', 'nitropack' ); ?>
131 </p>
132 </div>
133 <label class="inline-flex items-center cursor-pointer ml-auto">
134 <input type="checkbox" class="sr-only peer" id="bb-purge-status" <?php if ( $bbCacheSyncPurge )
135 echo "checked"; ?>>
136 <div class="toggle"></div>
137 </label>
138 </div>
139 </div>
140 <?php } ?>
141 <div class="nitro-option" id="can-editor-clear-cache-widget">
142 <div class="nitro-option-main">
143 <div class="text-box">
144 <h6><?php esc_html_e( 'Allow Editors to purge cache', 'nitropack' ); ?></h6>
145 <p><?php esc_html_e( 'Give Editors the right to purge cache when content is updated.', 'nitropack' ); ?>
146 </p>
147 </div>
148 <label class="inline-flex items-center cursor-pointer ml-auto">
149 <input type="checkbox" id="can-editor-clear-cache" class="sr-only peer" <?php echo (int) $canEditorClearCache === 1 ? "checked" : ""; ?>>
150 <div class="toggle"></div>
151 </label>
152 </div>
153 </div>
154 </div>
155 </div>
156 </div>
157 </div>
158 <?php $notOptimizedCPTs = nitropack_filter_non_optimized();
159 $notices = get_option( 'nitropack-dismissed-notices', [] );
160 $optimizedCPT_notice = in_array( 'OptimizeCPT', $notices, true ) ? true : false;
161 if ( ! $optimizedCPT_notice && ! empty( $notOptimizedCPTs ) )
162 require_once NITROPACK_PLUGIN_DIR . 'view/modals/modal-not-optimized-CPT.php'; ?>
163 </div>
164 <?php require_once NITROPACK_PLUGIN_DIR . 'view/modals/modal-unsaved-changes.php'; ?>