diff --git a/includes/class-sp-wpml.php b/includes/class-sp-wpml.php index c5c075b1..461d1252 100644 --- a/includes/class-sp-wpml.php +++ b/includes/class-sp-wpml.php @@ -51,7 +51,7 @@ class SP_WPML { return $title; } - public static function post_type_link( $url, $post = null, $leavename = false ) { + public static function post_type_link( $url, $post = null, $leavename = false, $sample = false ) { if ( self::can_localize( $post ) ): if ( ! $post ) global $post; @@ -62,7 +62,7 @@ class SP_WPML { $translated_id = icl_object_id( $id, 'any', false, ICL_LANGUAGE_CODE ); if ( $translated_id && $translated_id != $id && get_the_ID() != $translated_id ): - return get_permalink( $translated_id, $leavename ); + return get_post_permalink( $translated_id, $leavename, $sample ); endif; endif; @@ -88,7 +88,7 @@ class SP_WPML { // Get URL $translated_id = icl_object_id( $id, 'any', false, $code ); if ( ! $translated_id ) continue; - $url = get_permalink( $translated_id ); + $url = get_post_permalink( $translated_id, false, true ); // Get native name; $native_name = sp_array_value( $v, 'native_name' ); diff --git a/templates/countdown.php b/templates/countdown.php index 2a91ef88..12c998b3 100644 --- a/templates/countdown.php +++ b/templates/countdown.php @@ -32,7 +32,7 @@ extract( $defaults, EXTR_SKIP ); if ( ! isset( $post ) ) return; $title = $post->post_title; -if ( $link_events ) $title = '' . $title . ''; +if ( $link_events ) $title = '' . $title . ''; ?>