PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 1.4.2
Shortcodes and extra features for Phlox theme v1.4.2
2.17.22 2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / admin / includes / admin-the-functions.php
auxin-elements / admin / includes Last commit date
classes 9 years ago compatibility 9 years ago metaboxes 9 years ago modules 10 years ago admin-ajax.php 9 years ago admin-hooks.php 9 years ago admin-the-functions.php 9 years ago index.php 9 years ago
admin-the-functions.php
238 lines
1 <?php
2 // admin related functions
3
4 // Include advanced metabox tab
5 require_once( 'metaboxes/metabox-fields-general-advanced.php' );
6
7
8 /**
9 * Content for status tab in welcome-about page in admin panel
10 *
11 * @return void
12 */
13 function auxin_get_about_system_status(){
14 ?>
15 <div class="aux-status-wrapper">
16 <table class="widefat" cellspacing="0">
17 <thead>
18 <tr>
19 <th colspan="3" data-export-label="WordPress Environment"><?php _e( 'WordPress Environment', 'auxin-elements' ); ?></th>
20 </tr>
21 </thead>
22 <tbody>
23 <tr>
24 <td data-export-label="Home URL"><?php _e( 'Home URL', 'auxin-elements' ); ?>:</td>
25 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The URL of your site\'s homepage.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
26 <td><?php echo home_url(); ?></td>
27 </tr>
28 <tr>
29 <td data-export-label="Site URL"><?php _e( 'Site URL', 'auxin-elements' ); ?>:</td>
30 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The root URL of your site.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
31 <td><?php echo site_url(); ?></td>
32 </tr>
33 <tr>
34 <td data-export-label="WP Version"><?php _e( 'WP Version', 'auxin-elements' ); ?>:</td>
35 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The version of WordPress installed on your site.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
36 <td><?php bloginfo('version'); ?></td>
37 </tr>
38 <tr>
39 <td data-export-label="WP Multisite"><?php _e( 'WP Multisite', 'auxin-elements' ); ?>:</td>
40 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'Whether or not you have WordPress Multisite enabled.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
41 <td><?php if ( is_multisite() ) echo '&#10004;'; else echo '&#10005;'; ?></td>
42 </tr>
43 <tr>
44 <td data-export-label="WP Memory Limit"><?php _e( 'WP Memory Limit', 'auxin-elements' ); ?>:</td>
45 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The maximum amount of memory (RAM) that your site can use at one time.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
46 <td><?php
47 // This field need to make some changes
48 $server_memory = 0;
49 if( function_exists( 'ini_get' ) ) {
50 echo ( ini_get( 'memory_limit') );
51 }
52 ?></td>
53 </tr>
54 <tr>
55 <td data-export-label="WP Permalink"><?php _e( 'WP Permalink', 'auxin-elements' ); ?>:</td>
56 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The WordPress permalink structer.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
57 <td><?php echo get_option( 'permalink_structure' ); ?></td>
58 </tr>
59 <tr>
60 <td data-export-label="WP Debug Mode"><?php _e( 'WP Debug Mode', 'auxin-elements' ); ?>:</td>
61 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'Displays whether or not WordPress is in Debug Mode.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
62 <td><?php if ( defined('WP_DEBUG') && WP_DEBUG ) echo '<mark class="yes">' . '&#10004;' . '</mark>'; else echo '<mark class="no">' . '&#10005;' . '</mark>'; ?></td>
63 </tr>
64 <tr>
65 <td data-export-label="Language"><?php _e( 'Language', 'auxin-elements' ); ?>:</td>
66 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The current language used by WordPress. Default = English', 'auxin-elements' ) . '"> ? </a>'; ?></td>
67 <td><?php echo get_locale() ?></td>
68 </tr>
69 </tbody>
70 </table>
71
72 <table class="widefat" cellspacing="0">
73 <thead>
74 <tr>
75 <th colspan="3" data-export-label="Server Environment"><?php _e( 'Server Environment', 'auxin-elements' ); ?></th>
76 </tr>
77 </thead>
78 <tbody>
79 <tr>
80 <td data-export-label="Server Info"><?php _e( 'Server Info', 'auxin-elements' ); ?>:</td>
81 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'Information about the web server that is currently hosting your site.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
82 <td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
83 </tr>
84 <tr>
85 <td data-export-label="PHP Version"><?php _e( 'PHP Version', 'auxin-elements' ); ?>:</td>
86 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The version of PHP installed on your hosting server.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
87 <td><?php
88 // should add the cpmparsion check for version_compare(PHP_VERSION, '5.0.0', '<')
89 if ( function_exists( 'phpversion' ) ) echo esc_html( phpversion() ); ?></td>
90 </tr>
91 <tr>
92 <td data-export-label="Server Info"><?php _e( 'Server Info', 'auxin-elements' ); ?>:</td>
93 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'Information about the web server that is currently hosting your site.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
94 <td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
95 </tr>
96 <?php if ( function_exists( 'ini_get' ) ) : ?>
97 <tr>
98 <td data-export-label="PHP Post Max Size"><?php _e( 'PHP Post Max Size', 'auxin-elements' ); ?>:</td>
99 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The largest file size that can be contained in one post.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
100 <td></td>
101 </tr>
102 <tr>
103 <td data-export-label="PHP Time Limit"><?php _e( 'PHP Time Limit', 'auxin-elements' ); ?>:</td>
104 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups)', 'auxin-elements' ) . '"> ? </a>'; ?></td>
105 <td><?php
106 $time_limit = ini_get('max_execution_time');
107 //should add the condition
108 if ( $time_limit < 180 && $time_limit != 0 ) {
109 echo '<mark class="error">' . sprintf( __( '%s - We recommend setting max execution time to at least 180. See: <a href="%s" target="_blank">Increasing max execution to PHP</a>', 'auxin-elements' ), $time_limit, 'http://codex.wordpress.org/Common_WordPress_Errors#Maximum_execution_time_exceeded' ) . '</mark>';
110 } else {
111 echo '<mark class="yes">' . $time_limit . '</mark>';
112 }
113 ?>
114 </td>
115 </tr>
116 <tr>
117 <td data-export-label="PHP Max Input Vars"><?php _e( 'PHP Max Input Vars', 'auxin-elements' ); ?>:</td>
118 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
119 <td><?php echo ini_get('max_input_vars'); ?></td>
120 </tr>
121 <tr>
122 <td data-export-label="SUHOSIN Installed"><?php _e( 'SUHOSIN Installed', 'auxin-elements' ); ?>:</td>
123 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
124 <td><?php echo extension_loaded( 'suhosin' ) ? '&#10004;' : '&#10005;'; ?></td>
125 </tr>
126 <?php endif; ?>
127 <tr>
128 <td data-export-label="MySQL Version"><?php _e( 'MySQL Version', 'auxin-elements' ); ?>:</td>
129 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The version of MySQL installed on your hosting server.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
130 <td>
131 <?php
132 /** @global wpdb $wpdb */
133 global $wpdb;
134 echo $wpdb->db_version();
135 ?>
136 </td>
137 </tr>
138 <tr>
139 <td data-export-label="Max Upload Size"><?php _e( 'Max Upload Size', 'auxin-elements' ); ?>:</td>
140 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The largest file size that can be uploaded to your WordPress installation.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
141 <td><?php echo size_format( wp_max_upload_size() ); ?></td>
142 </tr>
143 <tr>
144 <td data-export-label="Default Timezone is UTC"><?php _e( 'Default Timezone is UTC', 'auxin-elements' ); ?>:</td>
145 <td class="help"><?php echo '<a href="#" class="help-tip" original-title="' . esc_attr__( 'The default timezone for your server.', 'auxin-elements' ) . '"> ? </a>'; ?></td>
146 <td><?php
147 $default_timezone = date_default_timezone_get();
148 if ( 'UTC' !== $default_timezone ) {
149 echo '<mark class="error">' . '&#10005; ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'auxin-elements' ), $default_timezone ) . '</mark>';
150 } else {
151 echo '<mark class="yes">' . '&#10004;' . '</mark>';
152 } ?>
153 </td>
154 </tr>
155 </tbody>
156 </table>
157
158 <table class="widefat active-plugins" cellspacing="0" id="status">
159 <thead>
160 <tr>
161 <th colspan="3" data-export-label="Active Plugins (<?php echo count( (array) get_option( 'active_plugins' ) ); ?>)"><?php _e( 'Active Plugins', 'auxin-elements' ); ?> (<?php echo count( (array) get_option( 'active_plugins' ) ); ?>)</th>
162 </tr>
163 </thead>
164 <tbody>
165 <?php
166 $active_plugins = (array) get_option( 'active_plugins', array() );
167
168 if ( is_multisite() ) {
169 $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
170 }
171 foreach ( $active_plugins as $plugin ) {
172 $plugin_data = @get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
173 $dirname = dirname( $plugin );
174 $version_string = '';
175 $network_string = '';
176 if ( ! empty( $plugin_data['Name'] ) ) {
177 // link the plugin name to the plugin url if available
178 $plugin_name = esc_html( $plugin_data['Name'] );
179 if ( ! empty( $plugin_data['PluginURI'] ) ) {
180 $plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . __( 'Visit plugin homepage' , 'auxin-elements' ) . '" target="_blank">' . $plugin_name . '</a>';
181 }
182 ?>
183 <tr>
184 <td><?php echo $plugin_name; ?></td>
185 <td><?php echo sprintf( _x( 'by %s', 'by author', 'auxin-elements' ), $plugin_data['Author'] ) . ' Version &ndash; ' . esc_html( $plugin_data['Version'] ) . $version_string . $network_string; ?></td>
186 </tr>
187 <?php
188 }
189 }
190 ?>
191 </tbody>
192 </table>
193
194 </div>
195 <?php
196 }
197
198
199
200 /**
201 * Retrieves the changelog remotely
202 *
203 * @param string $item_name The name of the project that we intend to get the info of
204 * @return string The changelog context
205 */
206 function auxin_get_remote_changelog( $item_name = '' ){
207
208 if( empty( $item_name ) ){
209 $item_name = THEME_ID;
210 }
211
212 global $wp_version;
213
214 $args = array(
215 'user-agent' => 'WordPress/'. $wp_version.'; '. get_site_url(),
216 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 10 ),
217 'body' => array(
218 'action' => 'text',
219 'cat' => 'changelog',
220 'item-name' => 'phlox',
221 'context' => 'full',
222 'format' => 'json',
223 'latest' => ''
224 )
225 );
226
227 $request = wp_remote_get( 'http://api.averta.net/envato/items/', $args );
228
229 if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) !== 200 ) {
230 return new WP_Error( 'no_response', 'Error while receiving remote data' );
231 }
232
233 $response = $request['body'];
234
235 return $response;
236 }
237
238