????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.16.24.18 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/www.astacus.se/wp-content/plugins/Temp-Hold/ubermenu/includes/ |
Upload File : |
<?php add_action( 'admin_notices', 'ubermenu_item_limit_notice' ); function ubermenu_count_menu_post_vars() { if( isset( $_POST['save_menu'] ) ){ $count = 0; foreach( $_POST as $key => $arr ){ $count+= count( $arr ); } update_option( 'ubermenu-post-var-count' , $count ); } else{ $count = get_option( 'ubermenu-post-var-count' , 0 ); } return $count; } function ubermenu_item_limit_notice(){ $screen = get_current_screen(); if( $screen->id != 'nav-menus' ) return; $var_count = ubermenu_count_menu_post_vars(); //$var_count = 4900; $r = array(); //restrictors $r['suhosin_post_maxvars'] = ini_get( 'suhosin.post.max_vars' ); $r['suhosin_request_maxvars'] = ini_get( 'suhosin.request.max_vars' ); $r['max_input_vars'] = ini_get( 'max_input_vars' ); //$r['max_input_vars'] = 1355; if( $r['suhosin_post_maxvars'] != '' || $r['suhosin_request_maxvars'] != '' || $r['max_input_vars'] != '' ){ $message = array(); if( ( $r['suhosin_post_maxvars'] != '' && $r['suhosin_post_maxvars'] != 0 && $r['suhosin_post_maxvars'] < 1000 ) || ( $r['suhosin_request_maxvars']!= '' && $r['suhosin_request_maxvars']!= 0 && $r['suhosin_request_maxvars'] < 1000 ) ){ $message[] = __( "Your server is running Suhosin, and your current maxvars settings may limit the number of menu items you can save." , 'ubermenu' ); } //150 ~ 10 left foreach( $r as $key => $val ){ if( $val > 0 ){ if( $val - $var_count < 150 ){ $message[] = __( "You are approaching the post variable limit imposed by your server configuration. Exceeding this limit may automatically delete menu items when you save. Please increase your <strong>$key</strong> directive in php.ini. <a href='http://goo.gl/8taSli'>More information</a>" , 'ubermenu' ); } } } if( !empty( $message ) ): ?> <div class="ubermenu-admin-notice ubermenu-admin-notice-warning ubermenu-admin-notice-menu-item-limit"> <div class="ubermenu-admin-notice-icon"><i class="fa fa-warning"></i></div> <h3><a href="http://goo.gl/vttchn"><?php _e( 'Menu Item Limit Warning' , 'ubermenu' ); ?> <i class="fa fa-question-circle"></i></a></h3> <ul> <?php foreach( $message as $m ): ?> <li><?php echo $m; ?></li> <?php endforeach; ?> </ul> <table> <?php if( $r['max_input_vars'] != '' ): ?> <tr> <td>max_input_vars</td> <td><?php echo $r['max_input_vars']; ?></td> </tr> <?php endif; ?> <?php if( $r['suhosin_post_maxvars'] != '' ): ?> <tr> <td>suhosin.post.max_vars</td><td><?php echo $r['suhosin_post_maxvars']; ?></td> </tr> <?php endif; ?> <?php if( $r['suhosin_request_maxvars'] != '' ): ?> <tr> <td>suhosin.request.max_vars</td> <td><?php echo $r['suhosin_request_maxvars']; ?></td> </tr> <?php endif; ?> <tr> <td><?php _e( 'Last saved Item Variable Count' , 'ubermenu' ); ?></td> <td><?php echo $var_count; ?></td> </tr> <?php if( $r['max_input_vars'] != '' ){ $estimate = ( $r['max_input_vars'] - $var_count ) / 15; if( $estimate < 0 ) $estimate = 0; ?> <tr> <td><?php _e( 'Percent of Item Limit' , 'ubermenu' ); ?></td> <td><?php echo 100 * ( $var_count / $r['max_input_vars'] ); ?>%</td> </tr> <tr> <td><strong><?php _e( 'Estimated remaining menu items' , 'ubermenu' ); ?></strong></td><td><?php echo floor( $estimate ); ?></td> </tr> <?php }; ?> </table> <br/>Loaded configuration file on your server: <strong><?php echo php_ini_loaded_file(); ?></strong> </div> <?php endif; } }