' . esc_html( sprintf( __( 'Translangated requires PHP 7.4 or newer. This server runs PHP %s. Please ask your host to update PHP.', 'translangated' ), PHP_VERSION ) ) . '
'; } function translangated_conflicting_plugin_active() { // Another plugin built on the same engine shares our class and function names, so loading // both would fatal. Detect it by its file layout (it may load after us, so check the list too). if ( class_exists( 'TRP_Settings' ) ) return true; $active = array_merge( (array) get_option( 'active_plugins', array() ), array_keys( (array) get_site_option( 'active_sitewide_plugins', array() ) ) ); foreach ( $active as $plugin ) { $dir = dirname( __DIR__ ) . '/' . dirname( $plugin ); if ( $dir !== __DIR__ && dirname( $plugin ) !== '.' && file_exists( $dir . '/includes/class-url-converter.php' ) && file_exists( $dir . '/includes/queries/class-query.php' ) ) return true; } return false; } if ( translangated_conflicting_plugin_active() ) { add_action( 'admin_notices', function () { echo '' . esc_html__( 'Translangated cannot run while another multilingual plugin built on the same engine is active. Deactivate that plugin first.', 'translangated' ) . '