403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/d2m/sofident_cz/wp-content/plugins/acfml/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/d2m/sofident_cz/wp-content/plugins/acfml/classes/class-wpml-acf-field-groups.php
<?php


class WPML_ACF_Field_Groups {
	private $sitepress;
	const POST_TYPE = 'acf-field-group';
	const DEFAULT_EDITOR_OPTION_NAME = 'acfml_field_groups_default_editor';

	public function __construct( SitePress $sitepress ) {
		$this->sitepress = $sitepress;
	}

	public function register_hooks() {
		if ( ! get_option( self::DEFAULT_EDITOR_OPTION_NAME ) ) {
			add_action( 'wpml_tm_loaded', array( $this, 'translate_field_groups_with_wp_editor' ) );
		}

		// ATE/CTE wizard resets this option so cover the case when it is run long after activating TM and ACFML plugins
		add_filter( 'wp_ajax_wpml_tm_wizard_done', array( $this, 'translate_field_groups_with_wp_editor' ), 1 );
	}

	/**
	 * Set translation mode for acf-field-group post type to 'native editor'
	 * but do it only once so user can change this if really must
	 */
	public function translate_field_groups_with_wp_editor() {
		$tm_settings = $this->sitepress->get_setting( 'translation-management', [] );
		$tm_settings[ WPML_TM_Post_Edit_TM_Editor_Mode::TM_KEY_FOR_POST_TYPE_USE_NATIVE ][ self::POST_TYPE ] = true;
		$this->sitepress->set_setting( 'translation-management', $tm_settings, true );
		WPML_TM_Post_Edit_TM_Editor_Mode::delete_all_posts_option( self::POST_TYPE );
		update_option( self::DEFAULT_EDITOR_OPTION_NAME, true );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit