= 3.0.0 of ADBC, we are using files to store scan data instead of database * In version >= 3.1.0, we've added a unique security code to the end of the folder * **************************************************************************************************************/ if ( ADBC_PLUGIN_PLAN == "pro" ) { $aDBc_security_folder_code = get_option( 'aDBc_security_folder_code' ); // If the security code does not exist, generate a new one if ( empty( $aDBc_security_folder_code ) ) { $permitted_chars = '00112233445566778899abcdefghijklmnopqrstuvwxyz'; $aDBc_security_folder_code = substr( str_shuffle( $permitted_chars ), 0, 12 ); update_option( 'aDBc_security_folder_code', $aDBc_security_folder_code, "no" ); } // Define ADBC upload folder name with the security code if ( ! defined( "ADBC_UPLOAD_DIR_PATH_TO_ADBC" ) ) { define( "ADBC_UPLOAD_DIR_PATH_TO_ADBC", ADBC_UPLOAD_DIR_PATH . '/adbc_uploads_' . $aDBc_security_folder_code ); } // Test of the old folder "/adbc_uploads" exists. If so, rename it by adding new security code if ( file_exists( ADBC_UPLOAD_DIR_PATH . '/adbc_uploads' ) ) { rename( ADBC_UPLOAD_DIR_PATH . '/adbc_uploads', ADBC_UPLOAD_DIR_PATH . '/adbc_uploads_' . $aDBc_security_folder_code ); } else { // Create the new folder with the security code if ( ! file_exists( ADBC_UPLOAD_DIR_PATH_TO_ADBC ) ) { aDBc_create_folder_plus_index_file( ADBC_UPLOAD_DIR_PATH_TO_ADBC ); } } } // Define & increase timeout if ( ! defined( "ADBC_ORIGINAL_TIMEOUT" ) ) { define( "ADBC_ORIGINAL_TIMEOUT", ini_get( 'max_execution_time' ) ); } if ( ADBC_PLUGIN_PLAN == "pro" && function_exists( 'set_time_limit' ) && ADBC_ORIGINAL_TIMEOUT < 300 ) { // xxx do this only before scanning @set_time_limit( 300 ); } // Add plugin menu to Wordpress menus add_action('admin_menu', array($this, 'aDBc_add_admin_menu')); // Load text-domain load_plugin_textdomain('advanced-database-cleaner', false, dirname(plugin_basename(__FILE__)) . '/languages'); // If plugin get updated, make changes to old version $this->aDBc_update_plugin_check(); } // Show notice if conflict detected between free and pro versions function aDBc_conflict_notice_free() { echo '
'; _e( 'The free version of Advanced DB Cleaner has been de-activated since the pro version is active.', 'advanced-database-cleaner' ); echo "
'; _e( 'The old pro of Advanced DB Cleaner has been de-activated since the new pro version is active.', 'advanced-database-cleaner' ); echo "
'; printf(__('Awesome! You have been using Advanced DB Cleaner for more than 1 week. Would you mind taking a few seconds to give it a 5-star rating on WordPress? Thank you in advance :) Ok, you deserved it | I already did | No, not good enough', 'advanced-database-cleaner'), esc_url( $aDBc_new_URI ), 'https://wordpress.org/support/plugin/advanced-database-cleaner/reviews/?filter=5'); echo "
'; echo __( 'Please activate your license key to get lifetime automatic updates and support.', 'advanced-database-cleaner' ); echo ' ' . __( 'Activate now', 'advanced-database-cleaner' ) . ""; echo '