| @@ -127,9 +127,9 @@ | ||
| 127 | 127 | if ( empty( $text ) ) { |
| 128 | 128 | $text = get_the_title( $id ); |
| 129 | 129 | } |
| 130 | 130 | } elseif ( taxonomy_exists( $type ) ) { |
| 131 | - $link = get_term_link( $id, $type ); | |
| 131 | + $link = wpcom_vip_get_term_link( $id, $type ); | |
| 132 | 132 | if ( empty( $text ) && ( $term = get_term( $id, $type ) ) && ! empty( $term ) && ! is_wp_error( $term ) ) { |
| 133 | 133 | $text = $term->name; |
| 134 | 134 | } |
| 135 | 135 | } |
| @@ -173,9 +173,9 @@ | ||
| 173 | 173 | |
| 174 | 174 | if ( 'nav_menu' === $type ) { |
| 175 | 175 | $theme = get_option( 'stylesheet' ); |
| 176 | 176 | if ( isset( PLL()->options['nav_menus'][ $theme ] ) ) { |
| 177 | - foreach ( PLL()->options['nav_menus'][ $theme ] as $menu ) { | |
| 177 | + foreach ( PLL()->options['nav_menus'][ $theme ] as $loc => $menu ) { | |
| 178 | 178 | if ( array_search( $id, $menu ) && ! empty( $menu[ $lang ] ) ) { |
| 179 | 179 | $tr_id = $menu[ $lang ]; |
| 180 | 180 | break; |
| 181 | 181 | } |
| @@ -328,9 +328,9 @@ | ||
| 328 | 328 | if ( empty( $_GET['from_post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification |
| 329 | 329 | return array(); |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | - $arr = array( 'original_post_id' => (int) $_GET['from_post'] ); // phpcs:ignore WordPress.Security.NonceVerification | |
| 332 | + $arr['original_post_id'] = (int) $_GET['from_post']; // phpcs:ignore WordPress.Security.NonceVerification | |
| 333 | 333 | |
| 334 | 334 | // Don't know what WPML does but Polylang does copy all public meta keys by default |
| 335 | 335 | foreach ( $keys = array_unique( array_keys( get_post_custom( $arr['original_post_id'] ) ) ) as $k => $meta_key ) { |
| 336 | 336 | if ( is_protected_meta( $meta_key ) ) { |