403Webshell
Server IP : 198.54.115.198  /  Your IP : 216.73.216.142
Web Server : LiteSpeed
System : Linux server192.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : seatpheu ( 1569)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/seatpheu/public_html/wp-content/plugins/translatepress-multilingual/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/seatpheu/public_html/wp-content/plugins/translatepress-multilingual/index.php
<?php
/*
Plugin Name: TranslatePress - Multilingual
Plugin URI: https://translatepress.com/
Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders.
Version: 3.2.3
Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
Author URI: https://cozmoslabs.com/
Text Domain: translatepress-multilingual
Domain Path: /languages
License: GPL2
WC requires at least: 2.5.0
WC tested up to: 10.9.1

== Copyright ==
Copyright 2017 Cozmoslabs (www.cozmoslabs.com)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/


// Exit if accessed directly
if ( !defined('ABSPATH' ) )
    exit();


function trp_enable_translatepress(){
	$enable_translatepress = true;
	$current_php_version = apply_filters( 'trp_php_version', phpversion() );

	// 5.6.20 is the minimum version supported by WordPress
	if ( $current_php_version !== false && version_compare( $current_php_version, '5.6.20', '<' ) ){
		$enable_translatepress = false;
		add_action( 'admin_menu', 'trp_translatepress_disabled_notice' );
	}

	return apply_filters( 'trp_enable_translatepress', $enable_translatepress );
}

if ( trp_enable_translatepress() ) {
	require_once plugin_dir_path( __FILE__ ) . 'class-translate-press.php';
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-ai-api-key.php';
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-ai-api-key-check.php';

	/* make sure we execute our plugin before other plugins so the changes we make apply across the board */
	add_action( 'plugins_loaded', 'trp_run_translatepress_hooks', 1 );
}
function trp_run_translatepress_hooks(){
	$trp = TRP_Translate_Press::get_trp_instance();
	$trp->run();
}

function trp_translatepress_disabled_notice(){
	echo '<div class="notice notice-error"><p>' . wp_kses( sprintf( __( '<strong>TranslatePress</strong> requires at least PHP version 5.6.20+ to run. It is the <a href="%s">minimum requirement of the latest WordPress version</a>. Please contact your server administrator to update your PHP version.','translatepress-multilingual' ), 'https://wordpress.org/about/requirements/' ), array( 'a' => array( 'href' => array() ), 'strong' => array() ) ) . '</p></div>';
}

/**
 * Redirect users to the settings page on plugin activation
 */
add_action( 'activated_plugin', 'trp_plugin_activation_redirect' );
function trp_plugin_activation_redirect( $plugin ){

    $trp_instance_for_tp_product_name = TRP_Translate_Press::get_trp_instance();

    // redirect on free plugin activation - keep simple for now, more conditions to be added

    if ( !wp_doing_ajax() && $plugin == plugin_basename( __FILE__ ) ) {

        if (get_option('trp_onboarding_started') === false ){

        //    this could be used after we make the save settings function in onboarding to check onboarding completion
        //    || get_option('trp_onboarding_completed') === 'false' || get_option('trp_onboarding_completed') == 'no' ) {
            add_option('trp_onboarding_started', 'yes');
            wp_safe_redirect(admin_url('admin.php?page=trp-onboarding&step=welcome') );
            exit();

        } else {

            wp_safe_redirect(admin_url('options-general.php?page=translate-press'));
            exit();

        }
    }
}

//This is for the DEV version
if( file_exists(plugin_dir_path( __FILE__ ) . '/index-dev.php') ){
   if(!array_key_exists('translatepress-multilingual', TRP_Translate_Press::set_tp_product_name_static() )){
        // we only include this in instances where we simulate the business/developer version
        include_once( plugin_dir_path( __FILE__ ) . '/index-dev.php');
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit