8889841cwww.appmysite.com * Version: 3.13.3 * Author: AppMySite * Text Domain: appmysite * Author URI: https://appmysite.com * Tested up to: 6.8.2 * WC tested up to: 10.0.2 * WC requires at least: 7.5 * License: GPL v2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html **/ // If this file is called directly, abort. if ( ! defined( 'WPINC' ) ) { die( 'No script kiddies please!' ); } if ( ! defined( 'AMS_PLUGIN_DIR' ) ) { define( 'AMS_PLUGIN_DIR', __FILE__ ); } /******************************************************************************* * Show warning to all where WordPress version is below minimum requirement. */ global $wp_version; if ( $wp_version <= 4.9 ) { function wo_incompatibility_with_wp_version() { ?>
update( 'constant', 'AMS_SAFE_MODE', "off", array( 'normalize' => true ) ); //'raw' => true } catch ( \Exception $e ) { $messsage = 'Unable to update AMS_SAFE_MODE in wp-config. ' . $e->getMessage(); wp_die( esc_html( $messsage ) ); } } function ams_deactivate() { try { $config_transformer = new WPConfigTransformer( get_config_path() ); if ( $config_transformer->exists( 'constant', 'AMS_SAFE_MODE' ) ) { // update constant $config_transformer->remove( 'constant', 'AMS_SAFE_MODE', array( 'normalize' => true ) ); //'raw' => true } } catch ( \Exception $e ) { $messsage = 'Unable to update AMS_SAFE_MODE in wp-config. - ' . $e->getMessage(); wp_die( esc_html( $messsage ) ); } if(file_exists(WP_CONTENT_DIR . '/mu-plugins/safe-mode-loader.php')) @unlink(WP_CONTENT_DIR . '/mu-plugins/safe-mode-loader.php'); } function get_config_path() { $config_path = ABSPATH . 'wp-config.php'; if ( ! file_exists( $config_path ) ) { if ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) { $config_path = dirname( ABSPATH ) . '/wp-config.php'; } } return apply_filters( 'wp_debugging_config_path', $config_path ); }