mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- deprecated Is Account Page, Is User page for WPML integration (because default translations works properly);
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user