- deprecated Is Account Page, Is User page for WPML integration (because default translations works properly);

This commit is contained in:
nikitasinelnikov
2019-04-02 11:10:12 +03:00
parent b7555b75ab
commit 8d53e2ea34
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -45,7 +45,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
/**
* @todo remove these options
*/
add_filter( 'um_admin_access_settings_fields', array( &$this, 'wpml_post_options' ), 10, 2 );
//add_filter( 'um_admin_access_settings_fields', array( &$this, 'wpml_post_options' ), 10, 2 );
}
@@ -57,7 +57,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
*
* @return array
*/
function wpml_post_options( $fields, $data ) {
/*function wpml_post_options( $fields, $data ) {
global $post;
if ( ! function_exists( 'icl_get_current_language' ) ) {
@@ -83,7 +83,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
);
return $fields;
}
}*/
/**
@@ -151,11 +151,11 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
if ( ! $this->is_wpml_active() )
return $profile_url;
if ( function_exists( 'icl_get_current_language' ) && icl_get_current_language() != icl_get_default_language() ) {
/*if ( function_exists( 'icl_get_current_language' ) && icl_get_current_language() != icl_get_default_language() ) {
if ( get_the_ID() > 0 && get_post_meta( get_the_ID(), '_um_wpml_user', true ) == 1 ) {
$profile_url = get_permalink( get_the_ID() );
}
}
}*/
// WPML compatibility
if ( function_exists( 'icl_object_id' ) ) {
@@ -286,12 +286,12 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
if ( function_exists( 'icl_get_current_language' ) && icl_get_current_language() != icl_get_default_language() ) {
$url = $this->get_url_for_language( UM()->config()->permalinks[ $slug ], icl_get_current_language() );
if ( get_post_meta( get_the_ID(), '_um_wpml_account', true ) == 1 ) {
/*if ( get_post_meta( get_the_ID(), '_um_wpml_account', true ) == 1 ) {
$url = get_permalink( get_the_ID() );
}
if ( get_post_meta( get_the_ID(), '_um_wpml_user', true ) == 1 ) {
$url = $this->get_url_for_language( UM()->config()->permalinks[ $slug ], icl_get_current_language() );
}
}*/
if ( $updated ) {
$url = add_query_arg( 'updated', esc_attr( $updated ), $url );